[erlang-questions] Article on Erlang in ACM Queue
Tue Oct 14 14:15:38 CEST 2008
Il giorno mar, 14/10/2008 alle 07.28 -0400, Whit Armstrong ha scritto:
> does Erlang make guarantees about storing data in contiguous memory?
> My guess is that the binary data type was designed with that in mind.
Yes, binary data is guaranteed to be stored in contiguous memory. See:
> However, do I understand correctly that floats cannot be stored in a
> binary data type?
Sure they can, just try with:
%% Single precision
Y1 = <<1.0:32/native-float,
%% Double precision
Y2 = <<1.0:64/native-float,
More details on:
Alceste Scalas <alceste@REDACTED>
CRS4 - http://www.crs4.it/
More information about the erlang-questions