Re: [xml] XPath fix

From: "Bjorn Reese" <breese mail1 stofanet dk>
  I have no idea how to distinguish -0 from +0 at the C level, someone
an idea ?

This is a bit (pun intended) difficult as -0 equals +0. The best
solution may be to examine the sign bit directly if IEEE 754 is used
(trio_nan.c can give you an idea about how this can be done -- in
fact, it may be a good candidate function for trio_nan).

No probs. Something else to play with...
Presumably, also functions to set the sign explicitly (i.e., so I can set a
value to -0)?

As an aside, as you seem to have a good understanding of floating point
numbers, could you confirm that both ceiling(-0.1) and round(-0.1) should
return -0 and not +0?


Do You Yahoo!?
Get your free address at

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