I'm performing very basic maths operations.
fun main() {
val factor:Double = 0.0351951
var num1:Double = 250.0
//prints 250.0 as expected
println(num1)
//multiplication and division by same factor, hence num1 should ideally remain unchanged
num1 = num1 * factor / factor
//prints 249.99999999999997, but I was expecting 250.0
println(num1)
}
Why am I losing on precision?