Richard Wackerbarth writes:
> On Fri, 16 Jun 2000, Dave Peticolas wrote:
> 
> > Ok, you've convinced me of the need to track 'smallest denominational
> > units', but not why we need to use integers rather than FP numbers.
> > You can round FP numbers, too. Why couldn't we just round the FP
> > amounts to the appropriate precision when needed? If you're worried
> > about the loss of accuracy, you should provide a realistic example
> > where the precision of 64-bit floating points is insufficient.
> 
> I don't have a problem with 64 bit FP precision. However, I worry that
> you don't gain anything by using FP. And you do run the risk of forgetting
> to process the values as money rather than true reals.

The reason why I like doubles is that a huge amount of work has gone
into making the IEEE floating point specification "correct". These
quantities are used ubiquitously and are scrutinized by many people.
I have great confidence that the calculations are being done
correctly. OTOH, if we roll our own numerical library, I will have
much less confidence. It's not that I think we are bad developers,
it's just that the problem is quite complicated. It took a long time
to get IEEE floating point correct, and there were some extremely
smart people involved.

For that reason, if we decide to drop doubles, I would rather use
a library like gmp which has already been written/debugged rather
than start from scratch. We've got too many other things to do.


> In that respect, having a struct type which does not allow the "+" operator
> would help make sure that you didn't inadvertently overload the simple 
> arithmatic operators.

I agree.

dave

--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to