Dan Bron wrote:
>>while it's relatively simple to make integers arbitrarily large,
>>floating point is a much more difficult proposition:
>
> I know, rationally, that this is true.  But intuitively it's always struck
> a sour note.  A floating point number is just an integer with a dot in the
> middle.  Why is it such a different beast?
>

To mention a few differences:

- Computer integers exactly represent mathematical integers, within
limits: floating-point numbers represent almost no real numbers
exactly.

- Integer arithmetic is exact, floating-point arithmetic is not.

- Figuring out how to calculate mathematical functions accurate to 1
ulp is not easy: for example. no-one knows how many guard digits
are needed to calculate x^y over the full range of floating-point
numbers.

- Neglecting overflow, integer addition and multiplication mirror
their mathematical counterparts.  Floating-point addition is not
commutative and associative.

- It is nontrivial to devise algorithms that give acceptably accurate
results reasonably quickly while working to a fixed maximum precision.

Best wishes,

John


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to