[Gcl-devel] Re: [Maxima] float to bfloat



Greetings!

Raymond Toy <toy@rtp.ericsson.se> writes:

> So as long as scale-float with the output of integer-decode-float
> produces the original infinity or NaN, then I guess everything is ok,
> and no error is an acceptable solution.  
> 

This seems to be the case at present in GCL:

(defun mycheck (f) (multiple-value-bind (x y z) (integer-decode-float f) (multiple-value-bind (x1 y1 z1) (integer-decode-float (scale-float (float x) y)) (and (eql x x1) (eql y y1) (eql z z1)))))

MYCHECK

>(mycheck (expt 9.9d0 9999))

T

>(mycheck (sin (expt 9.9d0 9999)))

T

>

(The first is +Inf, the second NaN)

Take care,

> Ray
> 
> 
> 
> 

-- 
Camm Maguire			     			camm@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah