Problem with NSDecimalNumber truncating zeros
Problem with NSDecimalNumber truncating zeros
- Subject: Problem with NSDecimalNumber truncating zeros
- From: Eric Hermanson <email@hidden>
- Date: Mon, 06 Jul 2009 16:35:30 -0400
Example:
NSDecimalNumber *number = [NSDecimalNumber decimalNumberWithMantissa:
2200LL exponent:-2 isNegative:NO];
This results in a decimal number that is represented both internally,
and as a string, as
22
instead of the desired
22.00
Because of the functionality I am trying to achieve, I need to know
the difference between 22 and 22.00, but I can't figure out how to get
NSDecimalNumber to retain the trailing zeros. Does anyone have advice?
- Eric
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden