bigfloat
Walter Bright
newshound1 at digitalmars.com
Wed Apr 8 12:38:16 PDT 2009
Frank Torte wrote:
> When you can use a number in D that is more than the number of atoms
> in the known universe why would you want a bigger number?
There are a couple reasons:
1. Roundoff error in an iterative calculation can easily and quickly
overwhelm the answer. Keeping more bits in the intermediate results is
an easy way to alleviate this problem.
2. When two floating point numbers are added, they are first scaled
(i.e. shifted) until the exponents match. This means you lose 1 bit of
precision for every bit the exponents don't match. Adding more bits of
precision can compensate.
More information about the Digitalmars-d
mailing list