On Mon, Jul 6, 2009 at 10:04 PM, WT<jrca...@gmail.com> wrote:
> On Jul 6, 2009, at 10:52 PM, Fritz Anderson wrote:
>
>> NSDecimalNumber just keeps numerical values, not their history. If two
>> numbers, _as numbers_, are equal, you should expect the normalized internal
>> representations to be identical. 22.00 == 22 .
>>
>> If you need to preserve context, you'll have to keep it yourself in
>> another data structure (possibly one that wraps an NSDecimalNumber).
>
> NSDecimalNumbers would be useless, if that were true. The whole point of
> having NSDecimalNumbers is to be able to preserve precision.

According to the documentation, the whole point of having
NSDecimalNumbers is to do base-10 arithmetic. I see nothing in there
about preserving precision, neither in reference to the design intent
nor in reference to the implementation. Perhaps I missed something?

Times like this I wonder if I am the only one who consults
documentation before posting....

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to