Numeric variable

Numeric variable

Postby MarcoBoschi » Mon Dec 27, 2010 2:10 pm

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

marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Numeric variable

Postby Enrico Maria Giordano » Mon Dec 27, 2010 3:30 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Numeric variable

Postby Enrico Maria Giordano » Mon Dec 27, 2010 10:11 pm

The following sample demonstrates that the precision is 15 significant digits:

Code: Select all  Expand view
FUNCTION MAIN()

    LOCAL n

    n = 0.9999999999999999

    ? n

    n = 0.999999999999999

    ? n

    INKEY( 0 )

    RETURN NIL


The result is:

1.0000000000000000
0.999999999999999

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Numeric variable

Postby MarcoBoschi » Tue Dec 28, 2010 1:46 pm

Thank you Emg

marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 95 guests