Erlang workshop and user conference

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Erlang workshop and user conference

James Hague-3
> To let the compiler know, simply use the guard test float/1,
> for instance:
>
> cross({V10,V11,V12}, {V20,V21,V22}) when float(V10),
>    float(V11), float(V12), float(V20), float(V21),
>    float(V22) ->
>     {V11*V22-V12*V21,V12*V20-V10*V22,V10*V21-V11*V20}.

I love the speed improvements, but that sure is _verbose_.