Re: [HACKERS] Warning!!
| От | darcy@druid.net (D'Arcy J.M. Cain) |
|---|---|
| Тема | Re: [HACKERS] Warning!! |
| Дата | |
| Msg-id | m0zb6xO-0000eRC@druid.net обсуждение |
| Ответ на | Re: [HACKERS] Warning!! (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: [HACKERS] Warning!!
|
| Список | pgsql-hackers |
Thus spake Tom Lane
> And hardware-dependent, evidently, because I get the right thing on HP:
>
> play=> select cash_mul_flt8('$1', '123.77');
> cash_mul_flt8
> -------------
> $123.77
> (1 row)
Works fine on NetBSD -current.
> ! *result = floor((*f) * (*c) + 0.5);
Is this correct? What about "select cash_mul_flt8('$1', '123.99')?"
Wouldn't that convert it to 124.00?
> The other cash functions also need to be looked at for rounding
> sloppiness, so I see no point in committing this fix by its lonesome.
>
> Lessee, who's the author of cash.c ... looks like it's D'Arcy ...
> D'Arcy, you wanna put this on your to-do list?
Well, I didn't do those portions but I can look at it at some point I
suppose. I'm just not sure that it is as simple as suggested above.
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.
В списке pgsql-hackers по дате отправления: