Re: number formatting
Re: number formatting
- Subject: Re: number formatting
- From: Bob Savage <email@hidden>
- Date: Fri, 22 Feb 2002 21:25:28 -0600
>
I think the statement that a text field should show the value of 0.4 as
>
0.4 is a fair specification for a default behavior of a text field.
But the point which was made is that, for the computer, the value 0.4 does
not exist. Think about it, you are looking at "0.4" which is in base ten,
but the computer doesn't use base ten. That was what the reference to the
IEEE was saying. The computer is looking at a base two floating point value
and "0.4" just ain't it.
What you are saying is roughly equivalent to saying that the default
representation of Pi should be "3".
If you want to represent a float for a user in base ten at some specific
precision, you can do that by using a formatting string or NSFormatter.
Bob
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.