bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #13608] float mismatch in textfield


From: Benhur Stein
Subject: Re: [bug #13608] float mismatch in textfield
Date: Sat, 2 Jul 2005 12:48:34 -0300



if I enter
1234567890
in a textfield
it gives me the following number with the
[myTextField floatValue] method:
1234567936.000000
Is this behaviour is correct?

Yes, it is. A float number has approximately 6 decimal digits of precision (24 bits).
 

Is there a way to do calculations with precision with Foundation/AppKit?

Use double values (you can use the doubleValue method in NSTextField), they are precise up to approx. 16 decimal digits.

Benhur

reply via email to

[Prev in Thread] Current Thread [Next in Thread]