Re: NSNumber Bug I can't fix

2011-02-18 Thread Marcus Müller
Hi Richard, > Thanks, I added a quick hack to try to fix this and put a few very simple > tests in > svn://svn.gna.org/svn/gnustep/libs/base/trunk/Tests/base/NSNumber/test01.m thanks for the quick response & hotfix. I can confirm that it works here (FreeBSD 8.2rc3 amd64). Cheers, Marcus

Re: NSNumber Bug I can't fix

2011-02-17 Thread Richard Frith-Macdonald
On 17 Feb 2011, at 16:01, Marcus Müller wrote: > >> As you can see above, asking an NSIntNumber instance for its doubleValue >> works properly, however, it fails at NSNumber.m:165. I don't know the >> reason, but I also don't understand the implications of the macros used. Can >> somebody ela

Re: NSNumber Bug I can't fix

2011-02-17 Thread Jens Ayton
For reference, under Mac OS X 10.6.6: 2 compare: nan = NSOrderedDescending nan compare: 2 = NSOrderedAscending nan compare: nan = NSOrderedSame 2 isEqual: nan = NO nan isEqual: n = NO nan isEqual: nan = YES Just for fun, I tried it with [NSNumber numberWithDouble:INFINITY] instead of 2: inf comp

Re: NSNumber Bug I can't fix

2011-02-17 Thread Marcus Müller
> As you can see above, asking an NSIntNumber instance for its doubleValue > works properly, however, it fails at NSNumber.m:165. I don't know the reason, > but I also don't understand the implications of the macros used. Can somebody > elaborate? Please note that I'm on a 64-bit (amd64) system

NSNumber Bug I can't fix

2011-02-17 Thread Marcus Müller
Hi, I just stumbled across a bug in NSNumber that I can't fix as I don't understand the NSNumber code. The problem is easy to see, though: #import int main(int argc, char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSNumber *n = [NSNumber numberWit