Re: Interval Arithmetic project



> -----Original Message-----
> From: Raymond Toy [mailto:raymond.toy at ericsson.com] 
> Sent: Thursday, May 04, 2006 5:16 PM
> (defun foo (x)
>   (declare (type (double-float 9.5d0 10.5d0) x))
>   (/ (+ x 20) (+ x 10)))
> 
> With cmucl, if you (compile 'foo) and then (describe 'foo), you
> get:
> 
> Its result type is:
>   (DOUBLE-FLOAT 1.4390243902439024d0 1.564102564102564d0)
> 
> That is, (x+20)/(x+10) is always between 1.439... and 1.564... if x is
> [9.5,10.5].  I think that's right.
> 
> 
Say x was really a class/type; with y,z instantations of x.
The your cmucl program computed 
Interval((y+20)/(z+10))
Whereas interval((y+20)/(y+10))=[1.487..., 1.512...]
[30.5/20.5, 29.5/19.5]



Sorry about the name clash!

RRogers