[erlang-questions] double to float

Matthew O'Gorman mogorman@REDACTED
Tue Oct 16 22:41:42 CEST 2007


this works great if you compile with binary_comprehension

List_of_floats = [Float || << Float/float >> <= Binary].

mog
On 10/16/07, Sten Kvamme <sten@REDACTED> wrote:
> Yes thanks, but I have the file in a binary variable and would like to do
> something like this:
>
> {<<F/float>>,B} = split_binary(Thefile, 8),
>
> or maybe
>
> <<F:8/binary,B/binary>> = Thefile,
> <<X/float>> =  F,
>
>
> /Sten
>
>
> On Oct 16, 2007, at 20:43 , Vlad Dumitrescu wrote:
>
>
> <<X/float>> = <<184,162,71,68,75,65,104,64>>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list