From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?G=C3=B6ran?= Weinholt Newsgroups: gmane.lisp.guile.bugs Subject: bug#14871: flonum procedures returning non-flonum objects Date: Mon, 15 Jul 2013 15:38:56 +0200 Message-ID: <87ip0c6iz3.fsf@industria.weinholt.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1373895908 19983 80.91.229.3 (15 Jul 2013 13:45:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jul 2013 13:45:08 +0000 (UTC) To: 14871@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jul 15 15:45:10 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uyj5R-0000V3-DJ for guile-bugs@m.gmane.org; Mon, 15 Jul 2013 15:45:09 +0200 Original-Received: from localhost ([::1]:35399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyj5R-0008A2-3F for guile-bugs@m.gmane.org; Mon, 15 Jul 2013 09:45:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyj5O-00088s-00 for bug-guile@gnu.org; Mon, 15 Jul 2013 09:45:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uyj5M-00080M-5l for bug-guile@gnu.org; Mon, 15 Jul 2013 09:45:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyj5M-000808-22 for bug-guile@gnu.org; Mon, 15 Jul 2013 09:45:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Uyj5L-0004zy-NE for bug-guile@gnu.org; Mon, 15 Jul 2013 09:45:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?G=C3=B6ran?= Weinholt Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 15 Jul 2013 13:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14871 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137389586719009 (code B ref -1); Mon, 15 Jul 2013 13:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Jul 2013 13:44:27 +0000 Original-Received: from localhost ([127.0.0.1]:55607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uyj4k-0004wW-2f for submit@debbugs.gnu.org; Mon, 15 Jul 2013 09:44:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35953) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uyj4g-0004vn-Ps for submit@debbugs.gnu.org; Mon, 15 Jul 2013 09:44:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uyj4Z-0007gu-NB for submit@debbugs.gnu.org; Mon, 15 Jul 2013 09:44:17 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyj4Z-0007gk-Jz for submit@debbugs.gnu.org; Mon, 15 Jul 2013 09:44:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyj4Y-0007lQ-JY for bug-guile@gnu.org; Mon, 15 Jul 2013 09:44:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uyj4T-0007fk-PF for bug-guile@gnu.org; Mon, 15 Jul 2013 09:44:14 -0400 Original-Received: from iustitia.weinholt.se ([2a02:28f0:0:a::7dce:e5a8]:33051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyj4T-0007fS-Ag for bug-guile@gnu.org; Mon, 15 Jul 2013 09:44:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=weinholt.se; s=iustitia2012; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=3aaAgFvMD+sOsjwxDBc5cSCuhkEsE143xU5uOsSwmoQ=; b=NnORuZWCeftas9knAhSjjgPndaZXsEEX3Ug43tBYBNzpL8uobtKoU1wlUGkd+QD2D3amnc1QZZ6KMVSS3HFc9IQjjzhqmhBNGEKw4+pXCJr3FBATN8pjJfYICi6BNzm38O63QZYezmTUyLr9koX6j7e4/CYQHKHWwt4AROmMfWAfvgklNnbvW/UjTMAQcm9WhyTCAZKP9XJwyNbzR8s1+u0NacKME6Jp0+aY9h5YntvPWWvvfbzvMjkktJgIQAHs+qA070aDXpiZwX6RmSw21Sh1PVWKFo+/yyfJMpml7o4eoGahy40ARqt/fWUlV5k5JX8ImwaMGe1OxhiySWjLIA==; Original-Received: from uucp by iustitia.weinholt.se with local-bsmtp (Exim 4.72) (envelope-from ) id 1Uyj4R-0007GH-LV; Mon, 15 Jul 2013 15:44:07 +0200 Original-Received: from weinholt by industria with local (Exim 4.80) (envelope-from ) id 1UyizR-0002Uu-FA; Mon, 15 Jul 2013 15:38:57 +0200 X-Hashcash: 1:20:130715:bug-guile@gnu.org::cpXChCnJ0HYxo2cL:000000000000000000000000000000000000000000000XE2 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7220 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 =3D 0.0+3.141592653589793i scheme@(guile-user)> (flsqrt -1.0) $2 =3D 0.0+1.0i scheme@(guile-user)> (flasin 3.0) $3 =3D 1.5707963267948966-1.762747174039086i scheme@(guile-user)> (flacos 3.0) $4 =3D 0.0+1.762747174039086i scheme@(guile-user)> (flexpt -1.0 0.5) $5 =3D 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, =2D-=20 G=C3=B6ran Weinholt "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 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCgAGBQJR4/twAAoJEOM+YaLpuMOiUMIP/iF8CZtL9Bl0WyH7HveG1dK2 garZXoZvpbUnM952xkf/gjMfb1VU4UmYO5siBDegWvusaRy9a1o+6kzWrxj7S6tn ALZe4fziJidZSPPCkkPaRpCYw7Aj5mEPH4hsFq/sgYlh+3v6mXgPkkBjx5I9D3au Spdhu6tL0FQfZLxPTPKBw5oI0oXH4k2eiMpeZgNQ/8FmV1q5d70aZpz+CvxXvk8k jAqQcOWNj+fCFlhdfgXKT73ggrYcdMsIIJxLhd96Yr3BlRluVo3FuIKylCr0QWDz TzE1B8Q4Dedb1SCN06upfJRfjQ/eMcUW13ZYNbdAXAFgSQBiYOkPtyTFjYpo81RC A6o9PoboByszOfAG+4JPPXq8jkIhH7bnMsw05UcdLWTWPi/yZqM2lqt0nP1T6xfI JEVlhNnNU97pf1yDyRZAwIly1e2WiWcZiR2QNO+xuHYM/QYqTIszKMZqOfrcqywZ pYLtu3ZYVdrbSLOMg0S32rrNGSFqdOcfVE2C1nekSYwuLOdrqnWlQl4jvsJbBeqY dsHQrn7xZhaO4PKar3hw1OPBpRpZMDxTTGs0juHjq6H7YTiK6fbzoNkLuS7vcJyv Hej5uBoFiXiYMxI7jI2U3ppy007Dn0BxifUei1oxEfGTK/5OHg4nKZyN/g052y8t 3ozqaMpkYqBS7Gvt3NsH =tMxz -----END PGP SIGNATURE----- --=-=-=--