Re: [xml] NAN problems on Win32



"Vakoc, Mark" wrote:

I'm pretty sure NAN has nothing to do with this, since it occurs in one
instance on the conversion from int to double.  Every instance that i know

Ok.

In case it will make your trouble-shooting easier (and since the
Windows documentation was very vague on this issue) I am including
the description of invalid operations from IEEE 754 below.

<quote>
The invalid operations are
 (1) Any operation on a signalling NaN (6.2)
 (2) Addition or subtraction -- magnitude subtraction of infinites
     such as (+infinity) + (-infinity)
 (3) Multiplication -- 0 * infinity
 (4) Division -- 0/0 or infinity/infinity
 (5) Remainder -- x REM y, where y is zero or x is infinite
 (6) Square root if the operand is less than zero
 (7) Conversion of a binary floating-point number to an integer
     or decimal format when overflow, infinity, or NaN precludes
     a faithful representation in that format and this cannot
     otherwise be signaled
 (8) Comparison by way of predicates involving < or >, without ?,
     when the operands are unordered (5.7, Table 4)
</quote>

Case 7 appears to be most interesting, given your current findings,
although the conversion in xmlXPathNewFloat() is done from integer
to double, and not the other way as case 7 addresses. Maybe the
compiler generates some faulty code, which creates such a conversion?

Case 8 basically says that some types of comparison, e.g. 'greater
than' (others are listed in the mentioned Table 4), aren't allowed
to have NaN as an operand, and if they do anyways then they are
considered invalid operations. Never mind if you do not understand
this case. I do not thing that it is pertinent to the problem at
hand.



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