unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: "Göran Weinholt" <goran@weinholt.se>
Cc: 14871-done@debbugs.gnu.org
Subject: bug#14871: flonum procedures returning non-flonum objects
Date: Tue, 16 Jul 2013 04:53:49 -0400	[thread overview]
Message-ID: <87bo6251ia.fsf@tines.lan> (raw)
In-Reply-To: <87ip0c6iz3.fsf@industria.weinholt.se> ("Göran Weinholt"'s message of "Mon, 15 Jul 2013 15:38:56 +0200")

Göran Weinholt <goran@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





      reply	other threads:[~2013-07-16  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15 13:38 bug#14871: flonum procedures returning non-flonum objects Göran Weinholt
2013-07-16  8:53 ` Mark H Weaver [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bo6251ia.fsf@tines.lan \
    --to=mhw@netris.org \
    --cc=14871-done@debbugs.gnu.org \
    --cc=goran@weinholt.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).