bugGNUstep - Bugs: bug #13608, float mismatch in textfield

 
 

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

bug #13608: float mismatch in textfield

Submitted by:  reandras <reandras>
Submitted on:  Sat 02 Jul 2005 02:32:35 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

Sun 02 Sep 2007 08:28:38 AM UTC, comment #2:

I think the GNUstep behaviour is correct. You cannot expect a higher precision when converting between float and string representation back and fro. You could try o your NSDecimal or double for higher precision.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Sat 02 Jul 2005 02:52:48 PM UTC, comment #1:

2005-07-02 16:52:21.000 Program[5601] before float 123456792.000000
2005-07-02 16:52:21.000 Program[5601] before string 123456789
2005-07-02 16:52:21.000 Program[5601] after float 123456800.000000
2005-07-02 16:52:21.000 Program[5601] after string 1.234568e+08
Between the two I updated the celle with:
[myTextField setFloatValue: [myTextField floatValue]];
I think this value fits in the float limits, thought they are changed. Am I in mistake? (the before string is the value entered and it is somewhat misinterpreted, isn't it?).
BTW, there is a way to use not scientific number representation without NSNumberFormatter?

reandras <reandras>
Sat 02 Jul 2005 02:32:35 PM UTC, original submission:

if I enter
1234567890
in a textfield
it gives me the following number with the
[myTextField floatValue] method:
1234567936.000000
Is this behaviour is correct?
Is there a way to do calculations with precision with Foundation/AppKit?
BTW., I see someone put last year a patch with nsnumberformatter implementation, but I can't see it in the /Source...

reandras <reandras>

 

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 FredKiefer (Posted a comment)
  •  

    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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 02 Sep 2007 08:28:38 AM UTCFredKieferStatusNone=>Invalid
      Assigned toNone=>FredKiefer
      Open/ClosedOpen=>Closed
    Thu 29 Dec 2005 02:48:08 PM UTCreandrasCarbon-Copy-=>Added -unavailable-
    Sat 02 Jul 2005 02:32:35 PM UTCreandrasCarbon-Copy-=>Added reandras

    Back to the top


    Powered by Savane 3.1-cleanup1