When we converting float to string, we can see repeating decimal there should be a fixed number of characters after point (128.39 -> "128.38999999999999").
For example:
The problem lies in the declared accuracy of calculations :erlang.float_to_binary
This problem can be solved by using [options] as parameter of encoding/2 function.
When we converting float to string, we can see repeating decimal there should be a fixed number of characters after point (128.39 -> "128.38999999999999"). For example:
The problem lies in the declared accuracy of calculations :erlang.float_to_binary This problem can be solved by using [options] as parameter of encoding/2 function.
For example:
or