[Top][All Lists]

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

[avr-libc-dev] libm: NaN mismatch?

From: Dmitry K.
Subject: [avr-libc-dev] libm: NaN mismatch?
Date: Fri, 25 Mar 2005 07:56:36 +1000
User-agent: KMail/1.5

Hi all.

   Now 'limb' uses NaN, but does not use Inf. '__fp_splitX' function is
called before the beginning of execution of any operation. It, among
other things, checks number on its accessory to a class of usual
numbers. Thus numbers with exponent 0xff are rejected all: 0x7f800000
- 0x7fffffff, 0xff800000 - 0xffffffff. It is logical and will be
coordinated with IEEE754. For these numbers operation is not carried
out, and at once returns NaN.

   However function 'isnan' returns 1 only for numbers 0xffc00000 -
0xffc0ffff. I believe, it would be more logical to return 1 for all
numbers which are rejected by library. In turn 'isinf', probably,
should return always 0 as arithmetics with Inf is not realized.


P.S.  IEEE 754 (FIXME, if I wrong):
    +Inf:  0x7f800000
    -Inf:  0xff800000
    NaN:   0x7f800001..0x7fffffff, 0xff800001..0xffffffff
      (NaN may be splited for types: SNaN and QNaN).

reply via email to

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