bug-gnulib
[Top][All Lists]
Advanced

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

Re: new modules 'isnan', 'isnanf', 'isnand'


From: Ben Pfaff
Subject: Re: new modules 'isnan', 'isnanf', 'isnand'
Date: Thu, 10 Jul 2008 22:26:44 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> Ben Pfaff <address@hidden> writes:
>
>> +Gnulib module: isnan
>>  
>>  Portability problems fixed by Gnulib:
>>  @itemize
>> address@hidden
>> +This macro is missing on some platforms and does not always yield
>> +correct results on others.
>>  @end itemize
>
> Hi Ben!  A minor comment: If you know which platforms isnan is missing
> on, and which platforms it results in incorrect results, that may be
> useful information to add.  Also, knowing which inputs result in
> incorrect output may also be useful.  If it is complicated to explain,
> perhaps the self-test or m4 test is a better place for such discussions,
> but I could not find any similar change for that area in your patch (but
> I could have missed it).

Hi Simon.  Thanks again for the comment.  Here is the improved
version that I included with the new patch series that I sent to
Bruno separately.

    Portability problems fixed by Gnulib:
    @itemize
    @item
    @code{isnan} was introduced with C99 and is thus commonly not present
    on pre-C99 systems.
    @item
    On IRIX 6.5 with @code{cc}, @code{isnan} does not recognize some NaNs.
    @item
    On NetBSD/i386 and glibc/ia64, @code{isnan} does not recognize some
    forms of NaNs, such as pseudo-NaNs, pseudo-Infinities, and
    unnormalized numbers.
    @item
    On i686 and @var{x}86-64, @code{__builtin_isnanl} (and thus
    @code{isnan} implementations based on it) in GCC 4.0 and later does
    not recognize pseudo-denormals as NaNs, and similarly for
    pseudo-zeroes, unnormalized numbers, and pseudo-denormals on ia64.
    @end itemize

It's not at all certain that these comments are entirely
accurate, because they are actually guesses based on the fact
that the (presumably) underlying isnanl and isnanf functions fail
in those ways on the given platforms.  But it seems likely.  I
don't know how to get access to IRIX 6.5, nor do I have a NetBSD
or ia64 box around to test.
-- 
"I admire him, I frankly confess it; and when his time comes
 I shall buy a piece of the rope for a keepsake."
--Mark Twain




reply via email to

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