[erlang-bugs] enif_make_double returns invalid term for 'nan'
Heinz Nikolaus Gies
heinz@REDACTED
Sun Mar 1 11:03:22 CET 2015
When enif_make_double gets a nan value passed as the double argument it returns a invalid term, this term can neither be printed (via the fmt*) functions nor can it be deserialized by binary_to_term when serializing it the following binary is generated:
6> io:format("~p~n", [term_to_binary(V)]).
<<131,99,110,97,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>
V is the double returned by enif_make_double
---
Cheers,
Heinz Nikolaus Gies
heinz@REDACTED
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150301/dbaf2968/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150301/dbaf2968/attachment.bin>
More information about the erlang-bugs
mailing list