GNU bug report logs - #14865
flmax and flmin do not handle +nan.0 correctly

Previous Next

Package: guile;

Reported by: Göran Weinholt <goran <at> weinholt.se>

Date: Mon, 15 Jul 2013 11:15:03 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Göran Weinholt <goran <at> weinholt.se>
To: bug-guile <at> gnu.org
Subject: flmax and flmin do not handle +nan.0 correctly
Date: Mon, 15 Jul 2013 13:11:47 +0200
[Message part 1 (text/plain, inline)]
Hello schemers,

the flmax and flmin procedures from (rnrs) do not handle +nan.0
correctly:

scheme@(guile-user)> (import (rnrs))
scheme@(guile-user)> (flmax +inf.0 +nan.0)
$1 = +inf.0
scheme@(guile-user)> (flmin -inf.0 +nan.0)
$2 = -inf.0

The result should be +nan.0. From r6rs-lib: "They always return a NaN
when one or more of the arguments is a NaN." Tested with
2.0.9.22-7e816-dirty.

Regards,

-- 
Göran Weinholt <goran <at> weinholt.se>
It's a beautiful day.
Don't let it get away.
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 12 years and 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.