enif_make_double returns invalid term for 'nan'

Heinz Nikolaus Gies <[email protected]>
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <[email protected]>
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
[email protected]

_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
signature.asc (application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJU8uPrAAoJEKM5c9dFK2+YfEcP/1xNjj4b6TYfQMrE5bhSzu7j
zXAgRhoN3oYDlSDedHcznka2D2Qslasi/Iufl6C/BmE07uvdxpN6H2eYBJqlzsze
pB174yQl+5xmwIxrQAPDLrwdrAZD6kKqah1pxI4Ui9EsNv8T925RrYMlA9Nm/InF
Z6qHQ04IG4pi0hx6KUWvDrEyrPKD24Y0L4LJftWv5nxukP4vFJ1DZoRuPBqTf4Zq
QJPOqwaN5YMQbajdwjqJHNlDIYNvtyT1GsWMZitKfiUn8ft+Rtf8MjcN3J6ezLNd
Dn/rZCx4j4xNCnN5JBQvbrwEhk2EnCfxt8vmKa9WUE4pKE5bA9htt4gYt9WZlyus
7mhPExbVeOYn9a9iIQbr09MrHzengmGggjOW2hBdPasGLtY+glkCosZvTo/XTEik
hQcMYZtvphC6nvUX0LDZInjV9NeLUI8ISdGXsIRJrOjKNQmWL7OrhsWGC3epCqoX
1tYUf9ebhvywM1cXoImHb+iRfPKZ35Q6/GUhMXGx41UDLc9LdnPmThbCIpvRLei2
+7DQDnGrGOS/NIULT9D5pmlR3jnCzolZsLUWeN0tVwdmeHl1zPY/+cqRkl6g8HXV
AK3uW68lW2zxqP0C9XTF5t8bnNUWAHDPeDAdTsodYkErhAx0klIffZyZCKTz2KFI
8AUz4XA17fwzQBSd4Npi
=gXgK
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.