<html><body bgcolor="#FFFFFF"><div>Note that java floats are almost but not quite IEEE 754 floats. </div><div><br class="webkit-block-placeholder"></div><div>Depending on the complexity of your problem domain you may not notice. This is one very dissapointing part of the java spec.</div><div><br><br></div><div><br>On Aug 30, 2007, at 9:56 AM, "Dave Rafkind" <<a href="mailto:dave.rafkind@gmail.com">dave.rafkind@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>Hello great list! <br><br>I am a newcomer to Erlang, so perhaps this is an easy question:<br><br>If I send a java float to an Erlang process over TCP, I can match against the resulting four bytes with<br>something like <br>
<br><<FloatNumberFromJava:32/signed-big-float>><br><br>This seems to indicate that Erlang and Java floating point formats are the same<br>(at least for my setup which is Erlang 5.5.4, java 1.5 on an Intel/Linux box), which is
<br>IEEE 754:<br><a href="http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.2.3"><a href="http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.2.3">http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.2.3</a></a><br><br>My question is, can this be reliably depended on to work across all versions
<br>of Erlang and java and all supported architectures? Are the floating point formats<br>always guaranteed to be in sync?<br><br><br>Thanks,<br>Dave<br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a></span><br><span><a href="http://www.erlang.org/mailman/listinfo/erlang-questions">http://www.erlang.org/mailman/listinfo/erlang-questions</a></span></div></blockquote></body></html>