For some reason some math results in 0

So I am trying to calculate pi (don’t ask), I have a variable, P, which when two random numbers don’t share a common factor, it goes up. Then I divide by the amount of times I do that. The problem is, when doing something like dividing it by 100 (when it is 64), it results a 0. Any help?

-Grim

Hi @Grimtin10 :relaxed:
Are you sure the variables you’re dividing are float ?
This happened to me so many times …

64 / 100 = 0

64.0 / 100.0 = 0.64

2 Likes

oh. that makes sense