Re: floating point representation
От | Robert Schrem |
---|---|
Тема | Re: floating point representation |
Дата | |
Msg-id | 01022110201801.17287@pc-robert обсуждение исходный текст |
Ответ на | floating point representation (Hiroshi Inoue <Inoue@tpf.co.jp>) |
Ответы |
Re: Re: floating point representation
|
Список | pgsql-hackers |
I think a formating mode where only the relevant digits are written to the output would be great as an alternative to the discussed fixed formatting strings. In this context i think of 'relevant' as in the following: 'Output as few characters as possible but ensure that scanf is still able to rebuild the binary reprressentation of the floating point number exactly.' To make this happen we would need to compute a seperate formatting string for each floating point value: E.g. if the binary value is exactly '1.00000E00' then we just write '1' to the output, because the rest is just 'ASCII noise' and not neccessary for rebuilding the identical binary value for the given floating point value. The advantage would be, that we only generate as much ASCII data as absolutly neccessary to rebuild the original data exactly. At least this is what I would expect from pg_dump. robert schrem
В списке pgsql-hackers по дате отправления: