From: Kevin Ryde <user42@zip.com.au>
Cc: guile-devel@gnu.org
Subject: Re: DINFINITY alpha not gnu/linux
Date: Sun, 22 Feb 2004 08:08:31 +1000 [thread overview]
Message-ID: <878yiwkrvk.fsf@zip.com.au> (raw)
In-Reply-To: <16433.21827.391742.744436@devzero.bogus.domain> (John W. Eaton's message of "Mon, 16 Feb 2004 17:41:55 -0600")
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
I'm looking at
* numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
particular don't assume "defined (__alpha__) && ! defined (linux)"
means OSF. Remove "SCO" code, which was not really SCO specific and
which John W. Eaton advises should be long past being needed.
[-- Attachment #2: numbers.c.inf.diff --]
[-- Type: text/plain, Size: 1135 bytes --]
--- numbers.c.~1.223.~ 2004-02-21 14:02:45.000000000 +1000
+++ numbers.c 2004-02-22 08:02:53.000000000 +1000
@@ -560,10 +560,15 @@
/* Some version of gcc on some old version of Linux used to crash when
trying to make Inf and NaN. */
-#if defined (SCO)
- double tmp = 1.0;
- guile_Inf = 1.0 / (tmp - tmp);
-#elif defined (__alpha__) && ! defined (linux)
+#ifdef INFINITY
+ /* C99 INFINITY, when available.
+ FIXME: The standard allows for INFINITY to be something that overflows
+ at compile time. We ought to have a configure test to check for that
+ before trying to use it. (But in practice we believe this is not a
+ problem on any system guile is likely to target.) */
+ guile_Inf = INFINITY;
+#elif HAVE_DINFINITY
+ /* OSF */
extern unsigned int DINFINITY[2];
guile_Inf = (*(X_CAST(double *, DINFINITY)));
#else
@@ -582,7 +587,11 @@
#if defined (HAVE_ISNAN)
-#if defined (__alpha__) && ! defined (linux)
+#ifdef NAN
+ /* C99 NAN, when available */
+ guile_NaN = NAN;
+#elif HAVE_DQNAN
+ /* OSF */
extern unsigned int DQNAN[2];
guile_NaN = (*(X_CAST(double *, DQNAN)));
#else
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
prev parent reply other threads:[~2004-02-21 22:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-16 22:36 DINFINITY alpha not gnu/linux Kevin Ryde
2004-02-16 22:51 ` John W. Eaton
2004-02-16 23:06 ` Kevin Ryde
2004-02-16 23:41 ` John W. Eaton
2004-02-21 22:08 ` Kevin Ryde [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=878yiwkrvk.fsf@zip.com.au \
--to=user42@zip.com.au \
--cc=guile-devel@gnu.org \
/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).