Why does python rounding float number?
i solved it this way
What version of Dynamo and Python are you running? It works fine for me in CP3. I think IP2 takes single numbers as integers by default so the 3/2 term is being set as an integer and rounded before being converted to a float. You can get around this by setting either 3 or 2 as a float first, as @Draxl_Andreas pointed out.
Thank you, I will try to implement your idea.
it looks horrible - perfect
Lol that works!
As an FYI, number types work like significant figures: the output type will always match the most accurate input type. If all values are integers you’ll get an integer output. If at least one value is a float/double you’ll get a double output.
So @Draxl_Andreas’s solution doesn’t even require you to convert the value to a double. The output is already a double because a double is used in the calculation.