main logo
Subject: Re: SQL Query/Method fields
Author: Frank Bitterlich
Posted: 2001/08/31 03:50:52
 
View Entire Thread
New Search


Thanks Ruslan,

okay, that's just the normal issues you have with every floating-point
value. These are already covered in my app.

Thanks,
Frank+++

Ruslan Zasukhin wrote:
>
> on 8/30/01 21:28, john roberts at jarobe01 .AT. athena D.OT louisville.edu wrote:
>
> >> But if I write
> >> myVFloatField.SetString("123.45")
> >> s = myVFloatField.GetString
> >>
> >> and s is "123.46", then I don't find that funny. (Although
> >> "123.45000002563" would be perfectly acceptable, since that's the normal
> >> floating-point arithmethic problem).
> >
> > Hi, Frank.
> >
> > If you can live with the variation in representation then you are OK. I
> > didn't have a problem with it; however, some of the people I am working with
> > got very nervous with it. They don't mind what the computer does internally
> > however they don't want to see it. :)
>
> Exactly,
>
> not so far I have meet this problem once again, self.
>
> when I write TEST project I have write something as:
>
> if( fldDouble = 95.04 )
>
> and this comparison did fail.
> I have track down this to C++ and have to see that 95.04 CAN NOT be stored
> in double value at all. It is always transformed to something close as
> 95.04000002
>
> In fact such restrict languages as Pascal even do not allow us operators =
> and <> for double values. Only operators >, <, >=, <=
>
> This is what about we are talking. If you think this is ok for you then...
>
> Although I have see in past that for Money calculation exists special libs
> that implement special arithmetic that correctly round cents taking in
> account only 2 digits after dot...
>
> --
> Best regards,
> Ruslan Zasukhin


--
Günter Schmidt & Co. oHG
Frank Bitterlich eMail: bitterlich@gsco.de
Schlosserstr. 2-4 WWW: http://www.gsco.de/gsco
D-60322 Frankfurt Tel.: 069 / 156809-29
GERMANY Fax: 069 / 156809-28
 
©2001 Frank Bitterlich
<-- Prior Message New Search Next Message -->