[erlang-questions] erlang vs java floating point format

Dave Rafkind dave.rafkind@REDACTED
Thu Aug 30 18:56:44 CEST 2007


Hello great list!

I am a newcomer to Erlang, so perhaps this is an easy question:

If I send a java float to an Erlang process over TCP, I can match against
the resulting four bytes with
something like

<<FloatNumberFromJava:32/signed-big-float>>

This seems to indicate that Erlang and Java floating point formats are the
same
(at least for my setup which is Erlang 5.5.4, java 1.5 on an Intel/Linux
box), which is
IEEE 754:
http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.2.3

My question is, can this be reliably depended on to work across all versions
of Erlang and java and all supported architectures? Are the floating point
formats
always guaranteed to be in sync?


Thanks,
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070830/0bf3e0ca/attachment.htm>


More information about the erlang-questions mailing list