[erlang-questions] binary_to_float changes between OTP 19 and OTP 20

Manuel A. Rubio bombadil@REDACTED
Wed Apr 18 00:44:21 CEST 2018


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.



More information about the erlang-questions mailing list