[erlang-questions] undefined function erlang:binary_to_float/1

Schneider js@REDACTED
Thu Jul 18 13:19:50 CEST 2013


yea, this should work. But It's looks like my Problem is a little bit 
more complicated:

I have a C client sending some Data via UDP. And I want to write a 
Erlang program receiving this data.

the Data is of the form {unsigned long, float} (both stored as 4Byte 
values) but the binary I receive is of the form {int, int}.
How can i convert the second one to an erlang float?

bg,
Johannes

On Wed 17 Jul 2013 04:30:45 PM CEST, Wes James wrote:
> Alternative for now??
>
> list_to_float(binary:bin_to_list(<<"10.0">>)).
> 10.0
>
>
> On Wed, Jul 17, 2013 at 8:02 AM, Schneider <js@REDACTED
> <mailto:js@REDACTED>> wrote:
>
>     Hi List,
>
>     I cannot find the function binary_to_float/1.
>
>     using Erlang R14B04 (erts-5.8.5) on ubuntu precise.
>     What do I miss?
>
>     bg,
>     Johannes
>
>     --
>     GLOBE Development GmbH
>     Königsberger Strasse 260
>     48157 MünsterGLOBE Development GmbH
>     Königsberger Strasse 260
>     48157 Münster
>     0251/5205 390
>
>     _________________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/__listinfo/erlang-questions
>     <http://erlang.org/mailman/listinfo/erlang-questions>
>
>



--
GLOBE Development GmbH
Königsberger Strasse 260
48157 MünsterGLOBE Development GmbH
Königsberger Strasse 260
48157 Münster
0251/5205 390



More information about the erlang-questions mailing list