in reply to Re: Negative zero? There's gotta be a sprintf that undoes that, right? (0+"$x")
in thread Negative zero? There's gotta be a sprintf that undoes that, right?

Ahh... but further testing shows that
printf "%f\n", 0+"-0.0"; 0.000000 printf "%f\n", 0+"-0.00000009"; -0.000000
I have a feeling this has to do with something lower than actual negative zero being numerified as a negative number, THEN going through printf, which undoes all that extra work.

                - Ant
                - Some of my best work - (1 2 3)

  • Comment on Re^2: Negative zero? There's gotta be a sprintf that undoes that, right? (0+"$x")
  • Download Code