Re: Pure newbie :(
Re: Pure newbie :(
- Subject: Re: Pure newbie :(
- From: lbland <email@hidden>
- Date: Tue, 11 Nov 2003 14:40:28 -0500
On Tuesday, November 11, 2003, at 01:45 PM, Denis Vaillant wrote:
I do not understand why the comparison does not work :
rxNext1 = 0.400000;
if(rxNext1==0.400000)
{
NSLog(@"Should work :(");
}
PS : rxNext1 is a float.
constants are compiled in static as double type.
make rxNext1 a double type.
when you compare double against float the truncation error is different.
use:
double rxNext1;
and it will work.
-lance
Lance Bland
mailto:email@hidden
VVI
888-VVI-PLOT
http://www.vvi.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.