in reply to Re^4: Negative zero? There's gotta be a sprintf that undoes that, right?
in thread Negative zero? There's gotta be a sprintf that undoes that, right?

rgiskard:

Clearly I was wrong. ;^)

But I have another idea--and it's a bit shorter than the last one!

$example = abs($example) if abs($example) < 0.00001;
I hope this one is better than the last one...

Unfortunately, I've gotta pick up my son from school, so this one too is untested. ;^(

...roboticus

  • Comment on Re^5: Negative zero? There's gotta be a sprintf that undoes that, right?
  • Download Code