[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8
From: |
Magnus Henoch |
Subject: |
[Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8 |
Date: |
Tue, 18 May 2004 23:21:08 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Camm Maguire <address@hidden> writes:
> Greetings! I have two questions about this:
>
> 1) The (finite(a) && (a) != 0.0) expression is already the default in
> gclincl.h.in, no?
Yes, it is.
> 2) This doesnt' seem to be the right default in any case. Consider
> this program:
[...]
> double d=1.0;
>
> for (;d;d*=0.5)
> printf("%e %-64.64s %u %u\n",d,bit_pattern(d),isnormal(d) ? 1 :
> 0,finite(d));
[...]
> 8.900295e-308
> 0000000000000000000000000000000000000000000000000000110000000000 1 1
> 4.450148e-308
> 0000000000000000000000000000000000000000000000000000010000000000 1 1
> 2.225074e-308
> 0000000000000000000000000000000000000000000000000000100000000000 1 1
> 1.112537e-308
> 0000000000000000000000000000000000000000000000000001000000000000 0 1
> 5.562685e-309
> 0000000000000000000000000000000000000000000000000010000000000000 0 1
> 2.781342e-309
> 0000000000000000000000000000000000000000000000000100000000000000 0 1
> =============================================================================
Subnormal numbers... I didn't know such a thing existed, but FreeBSD
(5.1 and up) and glibc both know them (gathered from source, not
experiments).
> Does FreeBSD/OpenBSD have an alternate isnormal that reproduces the
> GNU behavior?
As far as I can see, no.
I believe a small replacement function would blend in nicely into
num_co.c. The comments in there already describe the bit patterns of
doubles and floats for a couple of architectures; the new isnormal
function would test for finite(a) and non-zero exponent part of a.
I could do this some time next week.
Regards,
Magnus
- [Gcl-devel] Building GCL 2.6.1 on FreeBSD 4.8, Chris Hall, 2004/05/13
- Re: [Gcl-devel] Building GCL 2.6.1 on FreeBSD 4.8, Camm Maguire, 2004/05/13
- [Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8, Chris Hall, 2004/05/13
- [Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8, Magnus Henoch, 2004/05/14
- [Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8, Chris Hall, 2004/05/14
- Re: [Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8, Camm Maguire, 2004/05/18
- [Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8,
Magnus Henoch <=
- [Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8, Magnus Henoch, 2004/05/25
- Re: [Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8, Camm Maguire, 2004/05/25
- [Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8, Magnus Henoch, 2004/05/27
- Re: [Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8, Camm Maguire, 2004/05/27
[Gcl-devel] Re: Building GCL 2.6.1 on FreeBSD 4.8, Chris Hall, 2004/05/15