From: Jeff Dalton
Subject: X-floats closed under addition, etc?
Date: 
Message-ID: <7082@skye.ed.ac.uk>
I'd like to know whether double-floats (say) are closed
under addition, subtraction, multiplication, and division.

That is, can I safely say

  (the double-float (<op> (the double-float x) (the double-float y)))

for these <op>s?

CLtL II says precision won't be lost.  So if double-floats are
different from single-floats, single-floats won't result.
But can some "bigger" float ever result?

The same question can be asked of other float types.  My use
of double-float was just to pick a concrete example.

-- jd
From: Barry Margolin
Subject: Re: X-floats closed under addition, etc?
Date: 
Message-ID: <15rlomINNa0s@early-bird.think.com>
Oh boy, an easy question from Jeff.  You're slipping....

In article <····@skye.ed.ac.uk> ····@aiai.ed.ac.uk (Jeff Dalton) writes:
>I'd like to know whether double-floats (say) are closed
>under addition, subtraction, multiplication, and division.

I think all the floating point types are closed.  P.289 says, "Therefore
when two small floating-point numbers are combined, the result will always
be a small floating-point number."  And p.291 says, "the type of the result
of a numerical function is a floating-point number of the largest format
among all the floating-point arguments to the function...."
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

······@think.com          {uunet,harvard}!think!barmar