binary_to_float changes between OTP 19 and OTP 20

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

binary_to_float changes between OTP 19 and OTP 20

Manuel Ángel Rubio Jiménez
Hello,

I was trying this code:

float_to_binary(2.7182818284590452354, [{decimals, 14}, compact]).

And I've realized that in OTP 19.3 I have this value:

<<"2.71828182845905">>

While in OTP 20.3 I've this other value:

<<"2.71828182845904">>

Even I was checking since OTP 17 until OTP 20.3 and looks like the
change was in OTP 20.3 only. Why this change? Was it not correct in the
previous versions or is it not correct now?

Thanks.
Manuel Rubio.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: binary_to_float changes between OTP 19 and OTP 20

Guilherme Andrade


On 17 April 2018 at 23:44, Manuel A. Rubio <[hidden email]> wrote:
Even I was checking since OTP 17 until OTP 20.3 and looks like the change was in OTP 20.3 only. Why this change? Was it not correct in the previous versions or is it not correct now?

Perhaps this is a consequence of PR #1684[1].


[1]: https://github.com/erlang/otp/pull/1684

 

Thanks.
Manuel Rubio.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



--
Guilherme

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions