| От | Gregory Stark |
|---|---|
| Тема | Re: Question about the TODO, numerics, and division |
| Дата | |
| Msg-id | 87fy7yhhxk.fsf@stark.xeocode.com обсуждение исходный текст |
| Ответ на | Re: Question about the TODO, numerics, and division (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
"Tom Lane" <tgl@sss.pgh.pa.us> writes: > but I wouldn't want to defend the details of the rule about how many > fractional digits out given so many fractional digits in. In particular it seems to me this is poor: postgres=# select 1::numeric/10; ?column? ------------------------0.10000000000000000000 (1 row) In an ideal world it seems to me that if you're dividing by a number with only factors of 2 and 5 you should only gain as many digits as necessary to represent the result exactly. At the very least if you're dividing by a power of ten we should just move the decimal place and keep the same overall precision. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера