Buddha Buck <[EMAIL PROTECTED]> writes:
> We must be able to handle a large range of values precisely, ranging from
> $0.01 to $20,000,000,000,000.00 or more.
For what it's worth this isn't a large range, it's within the range that a
normal double can represent precisely. In fact a double could represent
45,035,996,273,704.96 without scaling.
> Please note: As long as we don't do any multiplication, this will
> allow us to properly handle dollar values as large as
> $92,233,720,368,547,758.07 without loss of precision. Assuming I have
> the mantissa right, IEEE 64-bit FP will start to mess up around
> $22,517,998,136,852.48 (+/- a factor of two or so). While $22 trillion
> is probably "sufficient" for most purposes, it's nice to know that we
> can go as high as $92 quadrillion if we need to...
>
> So, what are the objections to this approach?
It sounds to me like you're going to create more problems than you're solving.
You'll have to reinvent all the intricate rules that IEEE floating point math
has to avoid accumulated errors. Scaled integers are after all exactly what
floats and doubles are...
--
greg
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]