[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DINFINITY alpha not gnu/linux
From: |
John W. Eaton |
Subject: |
DINFINITY alpha not gnu/linux |
Date: |
Mon, 16 Feb 2004 16:51:42 -0600 |
On 17-Feb-2004, Kevin Ryde <address@hidden> wrote:
| I see numbers.c guile_ieee_init is setup to use DINFINITY on
|
| defined (__alpha__) && ! defined (linux)
|
| DINFINITY is not available on alpha freebsd. I take it it's an
| OSF-ism. There really wants to be an autoconf probe for DINFINITY,
| rather than cpp defines.
I think this code is probably my fault. I took it from Octave, which
is what I originally wrote it for.
Octave now uses
#if defined (SCO)
volatile double tmp = 1.0;
tmp_inf = 1.0 / (tmp - tmp);
#elif defined (__alpha__) && defined (__osf__)
extern unsigned int DINFINITY[2];
tmp_inf = (*(X_CAST(double *, DINFINITY)));
#else
double tmp = 1e+10;
tmp_inf = tmp;
for (;;)
{
tmp_inf *= 1e+10;
if (tmp_inf == tmp)
break;
tmp = tmp_inf;
}
#endif
to define Inf, but there may be better ways to do this. If so, please
pass the code back to Octave as well as fixing guile.
Thanks,
jwe
--
www.octave.org | www.che.wisc.edu/~jwe | Peace would shock and awe me.