larcenists / larceny

Larceny Scheme implementation
Other
202 stars 32 forks source link

inconsistent behavior of min involving NaNs #744

Closed svenkarol closed 8 years ago

svenkarol commented 8 years ago

I'm using Larceny in a small project and stumbled over the issue below. I am a novice to Scheme/Larceny, but to me it does not look like an intended behavior. I tested this in Racket too: the result is always +nan.0.

Larceny v0.98 "General Ripper" (Mar  7 2015 01:24:18, precise:Posix:unified)
larceny.heap, built on Sat Mar  7 01:25:38 EST 2015

> (min +nan.0 0)
0.0

> (min 0 +nan.0)
+nan.0

> (apply min '(+nan.0 0))
+nan.0

> (apply min '(0 +nan.0))
0.0
WillClinger commented 8 years ago

Fixed in changeset 10200e26cce78f0834d793e2a7025a57df359dd6