Re: [xml] XPath fix

Apologies if this is a hideous cheat, but...
The code in trionan always appears to work off the idea that a double is
bits long.
As the sign is the 64th bit (the one on the left), wouldn't a simple way
checking the sign just be to right shift the value, i.e.

int trio_get_sign(double a) {
    return a>>63;

I suspect there might be a more scientific way, but this seems to be the
simplest, and avoids doing three different things depending on the
/ platform / implementation.

Ah. Scratch that idea - doesn't compile, and casting it to a long (or
combination of)
is far too messy / implementation specific. Let's try the scientific method

Do You Yahoo!?
Get your free address at

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