[Maxima] Re: Interval Arithmetic project
raymond-rogers at idexx.com
Fri May 5 11:01:25 CDT 2006
> -----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
> 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
Whereas interval((y+20)/(y+10))=[1.487..., 1.512...]
Sorry about the name clash!
More information about the Maxima