|
From: Richard F. <fa...@gm...> - 2025-12-05 23:52:15
|
There are nuances in the IEEE standard that are not widely used and sometimes were left out of the software support (for laziness, lack of understanding, uncertainty of whether this would catch on?) and were, certainly in the past, left out of some hardware. (vendors would say they support the IEEE format, not mentioning lack of support of some operations.) Denormalized numbers are certainly in the category of not-widely-used. Common Lisp Standard support for floats was deliberately underspecified -- IEEE floats were new at the time. Curious -- is there a call for this in some important place, say in a math library routine?? RJF On Fri, Dec 5, 2025 at 3:39 PM Raymond Toy <toy...@gm...> wrote: > > On 12/5/25 3:24 PM, David Scherfgen wrote: > > This is a known bug in SBCL: https://bugs.launchpad.net/sbcl/+bug/2000178 > > Almost 3 years old. I guess it's not important enough to anyone. > > > Raymond Toy <toy...@gm...> schrieb am Fr., 5. Dez. 2025, 16:00: > >> >> On 12/5/25 10:21 AM, Barton Willis via Maxima-discuss wrote: >> >> >> For subnormal floats, the SBCL CL function scale-float is possibly buggy: >> >> SBCL 2.4.7: >> >> Define Maxima function that calls the CL function scale-float >> >> (%i1) :lisp(defun $scale_float (x m) (scale-float x m)) >> >> (%i1) x : 2.0^(-1024); >> (%o1) 5.562684646268004e-309 >> >> This is a SBCL bug, I think: surely scaling by zero should be an >> identity? >> >> (%i2) scale_float(x,0); >> (%o2) 2.7813423231340017e-308 >> >> (%i3) x : 2.0^(-1023); >> (%o3) 1.1125369292536007e-308 >> >> This is kinda surprising. Cmucl gets this right. So does ecl. Kinda >> funny too; it's not obvious what's happening here. `integer-decode-float` >> for the scaled result is `#x14000000000000` and an exponent of -1074, >> instead of the expected `#x10000000000000` with exponent -1076. >> >> >> _______________________________________________ >> Maxima-discuss mailing list >> Max...@li... >> https://lists.sourceforge.net/lists/listinfo/maxima-discuss >> > > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |