Re: [Maxima-commits] CVS: maxima/src clmacs.lisp,1.6,1.7



I don't understand the nature of the contagion problem exactly.
I haven't been following this carefully..

Possibilities.
1.  We have in the code exact numbers written down as single
floats and we can promote them to doubles (if that is the intention)
by changing something like 0.5 to  0.5d0 textually. Or maybe 3 to 3.0d0.

2.  We have in the code constants that should also be upgraded and
can't be by just added  "d0" at the end.  Example 0.33333333  where we
mean a constant computed at read-time as  #.(/ 1.0d0 3.0d0)   or a 
value for pi  #. (* 4 (atan 1.0d0))

3. Something having to do with finding the smallest epsilon such that
(+ 1.0d0 epsilon) is different from 1.0d0.  I think this can be
computed at read time on any of the participating lisps as

   #. (do ((i 0 (1+ i)))
     ((= (+ 1.0d0 (expt 2.0d0 (- i)))1.0d0)
      (expt 2.0d0 (- 1 i))))

4. Something else???

Anyway, the fixes for each of the categories seems straightforward,
and possibility 1 could be done in some cases by an automated pass over
the code.  Perhaps at the same time that we lower-case everything?


RJF


James Amundson wrote:

> On Mon, 2002-10-28 at 08:34, Raymond Toy wrote:
> 
>>I propose we do not do this.  It merely hides the bugs for Clisp, but
>>does nothing for the other lisps.  We need to find those places where
>>we didn't properly convert the numbers to double-floats.
>>
> 
> This deserves some discussion. We agree that we need to fix the
> precision problems in general. 
> 
> With Sam's patch:
> 	1) The tests work as expected with clisp 2.29 and clisp 2.30.
> 	2) clisp 2.30 prints a zillion messages about floating point contagion.
> 
> Without Sam's patch:
> 	1) The tests work as expected with clisp 2.29, but at least one
> additional failure is observed with 2.30.
> 
> We will not fix all floating-point inconsistencies before 5.9.0. I am
> uncomfortable releasing 5.9.0 with avoidable errors in the current
> version of clisp. As a compromise, we could add a bug to the bug tracker
> to remind us that the clisp floating-point setting is a temporary hack. 
> 
> What do you think?
> 
> --Jim
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>