|
From: Raymond T. <toy...@gm...> - 2025-12-05 23:39:37
|
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 > |