Formatting int/float/double to Sci Notation
Formatting int/float/double to Sci Notation
- Subject: Formatting int/float/double to Sci Notation
- From: "Frederick C. Lee" <email@hidden>
- Date: Tue, 9 Apr 2002 15:27:53 -0700
Greetings:
How can I format a number like '0.000123' which is stored as a
double value into scientific notation {1.23e-4} to a NSTextField (hence
displayed as such)? Very small numbers come out as zero(0).
Is there a formatter pattern that translates a number to its equivalent
sci notation? Or must I convert the simple scaler into a
NSDecimalNumber and proceed from there?
Would using the NSTextField's Delegate be useful in something like
this: Converting numbers < 0.001 to sci notation; and number > 123456
as sci notation?
Thanks.
Ric.
_______________________________________________
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.