[erlang-questions] Article on Erlang in ACM Queue
Tue Oct 14 15:14:08 CEST 2008
On Tue, Oct 14, 2008 at 6:28 AM, Whit Armstrong
> Thanks for the feedback everyone. FFI looks very interesting.
> does Erlang make guarantees about storing data in contiguous memory?
> My guess is that the binary data type was designed with that in mind.
> However, do I understand correctly that floats cannot be stored in a
> binary data type?
> for instance:
> Eshell V5.6.3 (abort with ^G)
> 1> X = <<1,3,9>>.
> 2> Y = <<1.0,3.0,9.0>>.
> ** exception error: bad argument
> or am I missing something obvious?
You need to tell the compiler that it is supposed to be floats.
Y = <<1.0/float,3.0/float,9.0/float>>.
see the documentation, especially
for more details
> Can anyone refer me to the source file that defines binary data types?
> On Fri, Oct 10, 2008 at 10:03 AM, Ulf Wiger (TN/EAB)
> <> wrote:
>> Whit Armstrong skrev:
>>> I'm new to Erlang. I've been considering it for a few simulation
>>> projects in finance. However, I was discouraged because the ACM
>>> article suggests that Erlang has poor floating point performance.
>>> Are any list members using Erlang for numerical simulations? If so,
>>> do you have any advice on how to how to improve efficiency? What
>>> about using binaries to store vectors of doubles? Are there any
>>> extensions of Erlang that allow one to do that?
>> Perhaps this might at least give you some initial intuition:
>> High-performance Technical Computing with Erlang
>> Alceste Scalas Giovanni Casu Piero Pili
>> Center for Advanced Studies, Research and Development in Sardinia
>> ACM ICFP 2008 / Erlang Workshop
>> September 27th, 2008
>> Victoria, BC, Canada
>> Ulf W
> erlang-questions mailing list
More information about the erlang-questions