Subject: Re: handling small numbers (fwd)

From: [email-masked]
Date: Fri, 5 May 2000 07:53:16 -0700

Historically Van Neuman promulgated floating point as a convinient 
approximation for scientific calculations.   At the time, a scientist 
would aften work to 6 decimal places and only need four of them.
Floating point arithmetic should not be used when the
right answer is more important than convenience.  Three special cases:
	safety critical -- Wichman had a paper on the risks in the Brittish
		computer society(BCS) Journal a few years ago.
	Number theory.
	Money.

For money you usually need an integer+2digits.  For safety critical
fixed point binary with very carefully reasoned out scaling. (These are forgotten
skills, sadly)

For number theory you often need "infinite precsion" arithmetic.  Essentially
a package defining precise algorithms for addition, subtraction and multiplication.
A simple test is to calculate the precise value of factorial 100.
Large number arithmetic will not be fast in any language.
I recall one simple calculation that ran for 90 days using precise
multi-length arithmetic (written in Algol60 by the way).

For some applications other representations are useful.  Occassionally
a little mathematics can do better than a lot of calculation.

As the old joke nearly said:
  you can have it fast, convenient, or right: pick two.

dick