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

Group
 
 

bug #13608: float mismatch in textfield

Submitter:  reandras <reandras>
Submitted:  Sat 02 Jul 2005 02:32:35 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group Member
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>

 

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

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

    Date Changed by Updated Field Previous Value => Replaced by
    2007-09-02 FredKiefer StatusNone Invalid
        Assigned toNone FredKiefer
        Open/ClosedOpen Closed
    2005-12-29 reandras Carbon-Copy- Added -email is unavailable-
    2005-07-02 reandras Carbon-Copy- Added reandras

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code