bugGNUstep - Bugs: bug #20168, [NSNumber isEqualToValue:] failed...

Group
 
 

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

Submitter:  -Deleted Account- <yjchen>
Submitted:  Wed 13 Jun 2007 10:18:06 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 14 Jun 2007 05:05:32 AM UTC, comment #1: 

You are right ... thanks.
I fixed that in svn stable and trunk

Richard Frith-Macdonald <CaS>
Group Member
Wed 13 Jun 2007 10:18:06 PM UTC, original submission:  

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

-Deleted Account- <yjchen>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by yjchen (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-06-14 CaS Open/ClosedOpen Closed
    2007-06-14 CaS StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code