Describe the bug
The binary_to_float built in function should support numbers in scientific notation without decimal places specified.
To Reproduce
The following raises a badarg error:
binary_to_float(<<"1e0">>).
Expected behavior1 = binary_to_float(<<"1e0">>).
Affected versions
OTP 27 and all prior versions with this function.
Additional context
Other languages, such as C++ and Golang will use this format when all decimal places are 0, so support for this format is important for cross-compatibility.
Native support for this format could slightly speed up json - it does support the "dotless" format and today we have to re-allocate the float string before parsing to support that
Describe the bug The binary_to_float built in function should support numbers in scientific notation without decimal places specified.
To Reproduce The following raises a badarg error:
binary_to_float(<<"1e0">>).
Expected behavior
1 = binary_to_float(<<"1e0">>).
Affected versions OTP 27 and all prior versions with this function.
Additional context Other languages, such as C++ and Golang will use this format when all decimal places are 0, so support for this format is important for cross-compatibility.