main logo
Subject: Re: [V4RB] VFloat - strange behavior
Author: Francois Van Lerberghe
Posted: 2001/08/30 07:43:38
 
View Entire Thread
New Search


john roberts wrote :
> =

> on 8/30/01 6:12 AM, Francois Van Lerberghe at fvanlerberghe .at. freegates DOT b=
e
> wrote:
> =

> > I see some strange behavior with VFloat field :
> >
> > I store -18592.01 in it (with SetString or Value, no matter)
> > When I get the value, I see different values in the EditField with
> > GetString and Value :
> >
> > FloatField.GetString -> -18592 (same in VApp)
> > FloatField.Value -> -18592.0097656
> >
> > With the value 12394.68, I get :
> >
> > FloatField.GetString -> 12394.7 (same in VApp)
> > FloatField.Value -> 12394.6796875
> >
> > Using VDouble, I get the same value that I store.
> =

> Maybe in the examples you looked at; however, there will be others wher=
e
> this is not the case.
> >
> > 1/ Is there
> > - a mathematical issue
> > - a Valentina issue
> > - a RealBasic issue
> =

> Sort of all three. Basically the problem is representation of decimal
> numbers within the computer. Certain fractional forms are not precisely=

> representable as a number.

Ok, I agree with you.
But don't you think that you should retrieve the same value using
FloatField.GetString or FloatField.Value ?

Fran=E7ois Van Lerberghe
Thier Monty, 15A
B-4570 Marchin
Belgique
 
©2001 Francois Van Lerberghe
<-- Prior Message New Search Next Message -->