bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenBSD frexpl failure


From: Eric Blake
Subject: Re: OpenBSD frexpl failure
Date: Tue, 4 Dec 2007 21:35:39 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> Bruno - several long double operations are being misdiagnosed for OpenBSD 4.0:
> 
> checking where to find the exponent in a 'long double'... word 2 bit 0
> checking where to find the sign bit in a 'long double'... word 2 bit 15

In particular, it appears that <float.h> is botched for OpenBSD 4.0, since the 
above makes it clear that long double occupies 80 bits with a 15-bit exponent 
field, but:

#include <stdio.h>
#include <float.h>
#include <math.h>

int
main ()
{
  printf ("LDBL_MAX_EXP=%d sizeof(long double)=%d\n", LDBL_MAX_EXP,
          (int) sizeof (long double));
  return 0;
}

prints out: LDBL_MAX_EXP=1024 sizeof(long double)=12

It looks like float.in.h needs to be updated to cater for another platform with 
a broken <float.h>.

-- 
Eric Blake







reply via email to

[Prev in Thread] Current Thread [Next in Thread]