[SOLVED...but] Re: Storing NaN in NSMutableArray ?
[SOLVED...but] Re: Storing NaN in NSMutableArray ?
- Subject: [SOLVED...but] Re: Storing NaN in NSMutableArray ?
- From: "Kubernan @ 10191 Tec." <email@hidden>
- Date: Wed, 10 Mar 2004 21:23:11 +0100
Re,
I'm sorry to say that
[anArray addObject:[NSDecimalNumber notANumber]];
was never called :-(
Now it works : NSLog prints NaN. But the test below :
"if ([[anArray objectAtIndex:0] isEqualTo:[NSDecimalNumber
notANumber]])"
always returns TRUE even if the the value at the index 0 is a NSNumber
equal to +0.0 (that is not NaN value).
(same result with "isEqual" instead of "isEqualTo").
I also tried :
"if ([[anArray objectAtIndex:0] compare:[NSDecimalNumber notANumber]]
...)"
With no success.
Why +0.0 is equal to NaN ??
Le 10 mars 04, ` 19:59, Kubernan @ 10191 Tec. a icrit :
Hello,
I'm looking for a way to store a NaN value in a NSMutableArray.
When i :
[anArray addObject:[NSDecimalNumber notANumber]];
The values seems become +0.0 :
NSLog(@"Array contains : %@", anArray); gives :
{type = mutable-small, count = 1, values = (
0 : <CFNumber 0x310e80 [0xa01900e0]>{value = +0.0, type =
kCFNumberFloat64Type}
)}
Why NaN becomes +0.0 ?
How to store NaN in my array ?
Thx a lot.
Chris.
_______________________________________________
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.
_______________________________________________
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.