0

If I output a float or a double and it logs something like -5.58794e-09, then does this mean that the number is close to zero?

wjandrea
  • 28,235
  • 9
  • 60
  • 81
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159

1 Answers1

1

This is an instance of scientific notation called E Notation, where the 'e' means "powers of 10." In this style -5.58794e-09 means -0.00000000558794; a decimal (one negative power of 10) and eight zeros (the other eight negative powers of 10) before the original digits.

Whether or not you consider this "close to zero" depends on what you are using it for.

goatshriek
  • 133
  • 6