URL:
<http://savannah.gnu.org/bugs/?20168>
Summary: [NSNumber isEqualToValue:] failed on float number
Project: GNUstep
Submitted by: yjchen
Submitted on: Wednesday 06/13/2007 at 18:18
Category: Base/Foundation
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This statement raises an exception:
[[NSNumber numberWithFloat: 2.12] isEqualToValue: [NSNumber numberWithFloat:
2.12]]);
: Uncaught exception NSGenericException, reason: subclass
NSFloatNumber(instance) should override isEqualToValue:
I know it is unreliable to compare float number since 3.0 can be 2.999999,
but it should return NO instead raising exception.
Yen-Ju
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?20168>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep