bug-gnustep
[Top][All Lists]
Advanced

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

[bug #20168] [NSNumber isEqualToValue:] failed on float number


From: Yen-Ju Chen
Subject: [bug #20168] [NSNumber isEqualToValue:] failed on float number
Date: Wed, 13 Jun 2007 22:18:07 +0000
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.8.1.4) Gecko/20060601 Firefox/2.0.0.4 (Ubuntu-edgy)

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/





reply via email to

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