Re: BUG #6217: to_char() gives incorrect output for very small float values
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #6217: to_char() gives incorrect output for very small float values |
| Дата | |
| Msg-id | 12259.1316545519@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: BUG #6217: to_char() gives incorrect output for very small float values ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>) |
| Ответы |
Re: BUG #6217: to_char() gives incorrect output for
very small float values
|
| Список | pgsql-bugs |
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Christopher Gernon <kabigon@gmail.com> wrote:
>> to_char() should be able to convert 5.6e-32 to text just as easily
>> as it can convert 5.6e-3. For some reason, it doesn't.
> Oh, I see your point now, and I agree with you.
> We should probably at least put this on the TODO list, I think. Any
> objections?
If we're gonna fix it, we should just fix it, I think. I was
considering taking a stab at it, but if someone else would like to,
that's fine too.
One other thing I notice in the same area is that the handling of NaNs
and infinities seems a bit incomplete. There's an explicit special case
for them in the EEEE-format code path, but not otherwise, and I think
that the results you get for other formats will vary depending on what
the local implementation of snprintf does. What *should* the output be,
if the input is NaN or Inf?
regards, tom lane
В списке pgsql-bugs по дате отправления: