Greetings! Right now, GCL just passes forward the standard IEEE floating point conventions, which, to my knowledge, conforms with the ANSI spec. Apart from the normal floating point numbers, there are also denormalized numbers, which GCL decodes correctly, NaN, and Inf. Your coercsion makes an inf, overflowing the MOST-POSITIVE-SHORT-FLOAT on x86 of 3.402823S38. GCL doesn't print these, as it cannot read them meaningfully. I suppose it could, but then we'd have to add concepts like negative zero, etc. There may be a gcc compiler switch we can set to signal a trapable floating point exception when such items are produced -- this is not the default IEEE behavior, but may be desirable in lisp.
Richard Fateman has expressed in the past the desirability of pushing these values forward into lisp, if I recall correctly. If memory serves, the discussion thus started yielded no consensus on what would be most acceptable to all users. Take care, Robert Boyer <[EMAIL PROTECTED]> writes: > Or is the bug perhaps in coerce, for not producing an error when producing a > nonnumber? Transcript below. > > Bob > > ------------------------------------------------------------------------------- > GCL (GNU Common Lisp) 2.6.6 CLtL1 May 27 2005 16:28:17 > > >(setq x (coerce 1111111111111111111111111111111111111111111 (type-of .1s2)) > >bar nil) > > NIL > > >(type-of x) > > SHORT-FLOAT > > >(integer-decode-float x) > > 8388608 > 105 > 1 > > >x > > > Error: Can't print a non-number. > t > t > > > -- Camm Maguire [EMAIL PROTECTED] ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah _______________________________________________ Gcl-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gcl-devel
