Hello world. This is my code. import math var num = 786.654 intPart = floor num decPart = num - intPart echo decPart #got 0.6539999999999964 instead of 0.654 Run
I get worse results when I add digits to the decimal part. Please, is there any reliable way to extract the decimal part of a number ? I need it for a multiprecision library.