Erlang (programming language)/Tutorials/Math: Difference between revisions
imported>Eric Evers m (New page: ==Math== 2*math:asin(1). 3.1415 sqrt(4). 2) |
imported>Tom Morris m (Erlang programming language/Tutorials/Math moved to Erlang (programming language)/Tutorials/Math) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{subpages}} | |||
==Math== | ==Math== | ||
2*math:asin(1). | 2*math:asin(1). | ||
3.1415 | 3.1415 | ||
sqrt(4). | math:sqrt(4). | ||
2 | 2 | ||
Sqrt = fun(X) -> math:sqrt(X) end. | |||
#Fun<erl_eval.6.56006484> | |||
lists:map(Sqrt,[1,2,3,4]). | |||
[1.00000,1.41421,1.73205,2.00000] | |||
lists:map(fun math:sqrt/1, [1,2,3,4]). | |||
[1.00000,1.41421,1.73205,2.00000] | |||
math:sin(3.1415/2). | |||
1.000000 |
Latest revision as of 06:07, 8 August 2009
The metadata subpage is missing. You can start it via filling in this form or by following the instructions that come up after clicking on the [show] link to the right. | |||
---|---|---|---|
|
Math
2*math:asin(1). 3.1415 math:sqrt(4). 2
Sqrt = fun(X) -> math:sqrt(X) end. #Fun<erl_eval.6.56006484>
lists:map(Sqrt,[1,2,3,4]). [1.00000,1.41421,1.73205,2.00000]
lists:map(fun math:sqrt/1, [1,2,3,4]). [1.00000,1.41421,1.73205,2.00000]
math:sin(3.1415/2). 1.000000