FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Numeric variable
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Numeric variable
Posted: Mon Dec 27, 2010 02:10 PM

a strange question: what is the highest value that I can associate to a numeric value?

marco

Marco Boschi
info@marcoboschi.it
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Numeric variable
Posted: Mon Dec 27, 2010 03:30 PM

If I remember correctly, you have 15 significant digits available. You'd better ask to comp.lang.xharbour, though.

EMG

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Numeric variable
Posted: Mon Dec 27, 2010 10:11 PM
The following sample demonstrates that the precision is 15 significant digits:

Code (fw): Select all Collapse
FUNCTION MAIN()

    LOCAL n

    n = 0.9999999999999999

    ? n

    n = 0.999999999999999

    ? n

    INKEY( 0 )

    RETURN NIL


The result is:

1.0000000000000000
0.999999999999999

EMG
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Numeric variable
Posted: Tue Dec 28, 2010 01:46 PM

Thank you Emg

marco

Marco Boschi
info@marcoboschi.it

Continue the discussion