IRC channel logs
2025-11-22.log
back to list of logs
<dthompson>ArneBab: thanks for checking! turns out guile treats signed inexact zeroes in a special way <sneek>Welcome back dthompson, you have 1 message! <dthompson>(< -0.0 0.0) is #f but (min -0.0 0.0) should be -0.0 even though they're both zero. <dthompson>out of curiosity I wanted to see how another scheme impementation behaved so I used chibi-scheme. min/max are not commutative like this in chibi <dthompson>r7rs-small has barely any specification for how min/max should work. <ArneBab>dthompson: floating point implementations are madness, but getting them wrong causes worse madness :-) <ArneBab>r7rs-small just links to other standards for arithmetic operations, and if min/max are arithmetic, then as far as I can tell Guile gets it right. <ArneBab>(but I don’t claim to fully understand that) <dthompson>given that chibi scheme is kind of the official r7rs scheme, I think chibi is probably compliant with the spec. it's just verrrry loosely specified. <dthompson>r6rs requires args to be real and r7rs doesn't, for example <dthompson>so things are kinda weird in chibi: (min 1+1i) is fine because it's the trivial single arg case, but (min 1+1i 1) is an error, as is (min 1+1i 2+2i)