in reply to Why is Zero not 0?

You apparently didn't use printf properly. What did you do? I missed the part about formatting to "-0.00" ...nevermind.

Replies are listed 'Best First'.
Re^2: Why is Zero not 0?
by Joost (Canon) on Feb 01, 2008 at 23:25 UTC
      I think that, so long as the number is less than zero && the number rounds to zero, then we get a leading "-0". Hence:
      C:\C>perl -e "printf \"%0.2f\", -0.0049" -0.00 C:\C>perl -e "printf \"%.0f\", -0.499" -0
      Cheers,
      Rob