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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  -Deleted Account- <yjchen>
Submitted on:  Wed 13 Jun 2007 10:18:06 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 14 Jun 2007 05:05:32 AM UTCCaSOpen/ClosedOpen=>Closed
    Thu 14 Jun 2007 05:05:31 AM UTCCaSStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1