Number dynamo 2.0.2


IronPython, like Python 2.x (and unlike Python 3.x), uses floored division when dividing integers, e.g.

1 / 8 = 0
4 / 3 = 1
7 / 3 = 2

To force “true” division you need to change the type of at least one of the integers to a float

1 / float(8) = 0.125

image

2 Likes