| От | Tom Lane |
|---|---|
| Тема | Re: float conversion / presentation problem ? |
| Дата | |
| Msg-id | 13756.1112850170@sss.pgh.pa.us обсуждение |
| Ответ на | Re: float conversion / presentation problem ? (John R Pierce <pierce@hogranch.com>) |
| Ответы |
Re: float conversion / presentation problem ?
|
| Список | pgsql-bugs |
John R Pierce <pierce@hogranch.com> writes:
> Tom Lane wrote:
>> You do realize that float4/real is only good to six decimal places
>> on most platforms?
> and importantly, are stored as binary fractions. 0.10000 decimal is a
> repeating fraction in binary, its like .1100110011.... x 2^-2 or
> something as a FLOAT.
Right, and conversely a fraction that's cut off at a certain number of
base-2 digits often corresponds to a repeating pattern of base-10
digits. I once had a clue about the exact laws for this, but it was
many years ago :-(
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера