emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#14871: closed (flonum procedures returning non-flo


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#14871: closed (flonum procedures returning non-flonum objects)
Date: Tue, 16 Jul 2013 08:55:02 +0000

Your message dated Tue, 16 Jul 2013 04:53:49 -0400
with message-id <address@hidden>
and subject line Re: bug#14871: flonum procedures returning non-flonum objects
has caused the debbugs.gnu.org bug report #14871,
regarding flonum procedures returning non-flonum objects
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
14871: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14871
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: flonum procedures returning non-flonum objects Date: Mon, 15 Jul 2013 15:38:56 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
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 <address@hidden>
"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

Attachment: pgp9L86nItxOh.pgp
Description: PGP signature


--- End Message ---
--- Begin Message --- Subject: Re: bug#14871: flonum procedures returning non-flonum objects Date: Tue, 16 Jul 2013 04:53:49 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Göran Weinholt <address@hidden> 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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]