Why does my percentage formula occasionally display a negative zero?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I have a formula to calculate the remaining percentage after deducting 3 other percentage fields from 100%.  It always calculates the correct number, but for some reason it will calculate certain combinations as "-0%" instead of "0%".  It appears to do this for specific number combinations, rather than being random.

Formula:1-[Rough Billing %]-[Trim Billing %]-[Condenser Billing %]

Example where it calculates 0%: 1 - .76 - 0 - .24 = 0%

Example where it calculates -0%: 1 - .77 - 0 - .23 = -0%

I assume that I can just add an if statement to output "0" if the value is 0, but I'm curious what's causing this.  If I increase the decimal places to 4 it shows the value as -0.00000%, so it doesn't look like there's a stray decimal making it a negative number.
Photo of Derek

Derek

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Derek

Derek

  • 0 Points
Nevermind, I increased the decimal places to 20 and found a value after the 14th zero for some reason(-0.00000000000000277556%).