GNU bug report logs -
#14871
flonum procedures returning non-flonum objects
Previous Next
Reported by: Göran Weinholt <goran <at> weinholt.se>
Date: Mon, 15 Jul 2013 13:45:02 UTC
Severity: normal
Done: Mark H Weaver <mhw <at> netris.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#14871: flonum procedures returning non-flonum objects
which was filed against the guile package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 14871 <at> debbugs.gnu.org.
--
14871: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14871
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Göran Weinholt <goran <at> weinholt.se> writes:
> one property of the flonum procedures in r6rs is that they return
> flonums. This should not happen:
>
> scheme@(guile-user)> (import (rnrs))
> scheme@(guile-user)> (fllog -1.0)
> $1 = 0.0+3.141592653589793i
> scheme@(guile-user)> (flsqrt -1.0)
> $2 = 0.0+1.0i
> scheme@(guile-user)> (flasin 3.0)
> $3 = 1.5707963267948966-1.762747174039086i
> scheme@(guile-user)> (flacos 3.0)
> $4 = 0.0+1.762747174039086i
> scheme@(guile-user)> (flexpt -1.0 0.5)
> $5 = 6.123031769111886e-17+1.0i
>
> These results are not flonums. In r6rs-lib it says "the result may be a
> NaN or some unspecified flonum." So returning +nan.0 would be better.
Fixed in ad922d065c5f8b01c4ace3ee34d26300409e44fa.
Thanks!
Mark
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Hello schemers,
one property of the flonum procedures in r6rs is that they return
flonums. This should not happen:
scheme@(guile-user)> (import (rnrs))
scheme@(guile-user)> (fllog -1.0)
$1 = 0.0+3.141592653589793i
scheme@(guile-user)> (flsqrt -1.0)
$2 = 0.0+1.0i
scheme@(guile-user)> (flasin 3.0)
$3 = 1.5707963267948966-1.762747174039086i
scheme@(guile-user)> (flacos 3.0)
$4 = 0.0+1.762747174039086i
scheme@(guile-user)> (flexpt -1.0 0.5)
$5 = 6.123031769111886e-17+1.0i
These results are not flonums. In r6rs-lib it says "the result may be a
NaN or some unspecified flonum." So returning +nan.0 would be better.
Tested with Guile 2.0.9.22-7e816-dirty.
Regards,
--
Göran Weinholt <goran <at> weinholt.se>
"Today's scientists have substituted mathematics for experiments, and they wander
off through equation after equation, and eventually build a structure which has
no relation to reality." -- Nikola Tesla
[Message part 5 (application/pgp-signature, inline)]
This bug report was last modified 12 years and 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.