Re: Float behaviour
Re: Float behaviour
- Subject: Re: Float behaviour
- From: Chris Kane <email@hidden>
- Date: Tue, 23 Aug 2005 09:27:29 -0700
On Aug 22, 2005, at 6:40 PM, David Phillip Oster wrote:
At 11:24 AM -0700 8/22/05, ObjM2 <email@hidden>
You'll need a BCD library (BCD = binary coded decimals => no rounding
errors)
It shouldn't be all too difficult to write a Cocoa class for BCDs
though.
Already in Cocoa: NSDecimalNumber
Actually no. NSDecimalNumber is a floating point representation,
with mantissa and exponent, just like doubles. It's just able to
represent a larger range/more precision than what had been available
natively from C-based languages and the compiler. "long double" --
available in gcc 4.0 -- is about the same precision and a much
greater value range. Not to mention that any "native" compiler
support is going to be a thousand times faster than doing arithmetic
with NSDecimalNumber.
Chris Kane
Cocoa Framework, Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden