GCL and denormalized numbers



Camm,

About this code in maxima/src/numerical/f2cl-lib.lisp,

> (defun d1mach (i)
>   (ecase i
>     (1
>      #-gcl least-positive-normalized-double-float
>      #+gcl least-positive-double-float)
>     (2 most-positive-double-float)
>     (3 double-float-epsilon)
>     (4 (scale-float double-float-epsilon 1))
>     (5 (log (float (float-radix 1d0) 1d0) 10d0))))

The change log at the end of the file says this --

;;; Revision 1.48  2002/05/03 17:48:06  rtoy
;;; GCL doesn't have least-positive-normalized-{single/double}-float, so
;;; use just least-positive-{single/double}-float.

However GCL does now appear to have least-positive-normalized-double-float
so it seems like we could erase the #+gcl bit above.
Considering the commentary in d1mach.f it seems like the
normalized value is intended. (Btw when were the *-normalized-* bits
introduced in GCL?)

If there are no objections (I have none) and you want to change f2cl-lib.lisp,
please go ahead. I believe you have write permission for Maxima CVS.

All the best
Robert

PS. Here's some comments from d1mach.f .

C   D1MACH( 1) = B**(EMIN-1), the smallest positive magnitude.
C   D1MACH( 2) = B**EMAX*(1 - B**(-T)), the largest magnitude.
C   D1MACH( 3) = B**(-T), the smallest relative spacing.
C   D1MACH( 4) = B**(1-T), the largest relative spacing.
C   D1MACH( 5) = LOG10(B)
C
C   Assume double precision numbers are represented in the T-digit,
C   base-B form
C
C              sign (B**E)*( (X(1)/B) + ... + (X(T)/B**T) )
C
C   where 0 .LE. X(I) .LT. B for I=1,...,T, 0 .LT. X(1), and
C   EMIN .LE. E .LE. EMAX.
C
C   The values of B, T, EMIN and EMAX are provided in I1MACH as
C   follows:
C   I1MACH(10) = B, the base.
C   I1MACH(14) = T, the number of base-B digits.
C   I1MACH(15) = EMIN, the smallest exponent E.
C   I1MACH(16) = EMAX, the largest exponent E.