Subject | Re: [ib-support] Strange roundings in IB-5.6 |
---|---|
Author | Entrebytes S.L. |
Post date | 2002-04-03T11:37:56Z |
First , many thanks to you and the others that has replied so promptly.
Next , go to bussines :)
Your first statement seems to me a little confussing. I cannot belive that
rounding 8200.14 can result in 8200.139999..
I can have faith in the other way arround , that rounding 8200.1399999999
could or could not be rounded to 8200.14 , depending on such a esoteric
thing as the way doubles are stored an represented (that fancy m*2^n).
Really what i needed was what you suggested next , the typecasting to
another type. I was just missing the point that i could do that in SQL.
Thank you a lot. "Operation SET" works fine now :)
Javi
EntreBytes S.L.
Ontenient , Spain
ERP Development.
Next , go to bussines :)
Your first statement seems to me a little confussing. I cannot belive that
rounding 8200.14 can result in 8200.139999..
I can have faith in the other way arround , that rounding 8200.1399999999
could or could not be rounded to 8200.14 , depending on such a esoteric
thing as the way doubles are stored an represented (that fancy m*2^n).
Really what i needed was what you suggested next , the typecasting to
another type. I was just missing the point that i could do that in SQL.
Thank you a lot. "Operation SET" works fine now :)
Javi
EntreBytes S.L.
Ontenient , Spain
ERP Development.
----- Original Message -----
From: "Svein Erling Tysvær" <svein.erling.tysvaer@...>
To: <ib-support@yahoogroups.com>
Sent: Wednesday, April 03, 2002 1:13 PM
Subject: Re: [ib-support] Strange roundings in IB-5.6
> Javi,
> double precision will always be approximate - and obviously 8200.14
"rounds
> to" 8200.13999999999999999! Try making your C function (or do it directly
> in SQL) return a DECIMAL rather than DOUBLE PRECISION. I'm not certain if
> it will work, but you could try something like
>
> select nombre , orden_carga , CAST(importe AS DECIMAL(15,2)) from
v_excel_oc
>