Fabio,
The VFP Numeric variables ('N') are stored either as Long Integers or Double float point numbers. If you want better precison, force VFP to use float arithmetic.
? 1.0*1/200000 = 0
? 1.0/200000 = 0
? 1/200000.0 = 0
>i have understand this:
>vfp numeric variables or litterals is a double with a format.
>
>Then, computations is correct, but value show can change.
>
>Then, why comparison of values can fail ?
>
>
>? 1/1999999 = 0
>* ok : false
>? 1/2000000 = 0
>* NOK : true
>x = 1
>? x/2000000 = 0
>* ok : false
>? 1/2000000.0 = 0
>* ok : false
>? 1/20000000.0 = 0
>* NOK : true
>
>
>For any unknown information, VFP use a ROUND(,5) for litterals interger
>divisions.
>
>For correct computation, is need to add decimals zeros, but the number of
>zero change the values ( not the display format ) !
>
>For me this is a bug.
>
>Fabio
--sb--