Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
Stolen from The Daily WTF.
//return whether a double is negative
bool IsNegative(double n)
{
string nStr = n.ToString();
if (nstr.IndexOf('-', 0, 1)) return true;
return false;
}
-0 (Score:2)
Crazy as it may seem, it seems about the simplest way to partition negative zero with all the other negative numbers. But I doubt that the original author had that in mind :-) [or should that be :-(]
I swear I didn't do it... (Score:1)