Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Erlang abs

-module(helloworld). 
-export([start/0]). 

start() ->
   Aabs = abs(-3.14), 
   io:fwrite("~p~n",[Aabs]).

Erlang log

-module(helloworld). 
-import(math,[log/1]). 
-export([start/0]). 

start() ->
   Alog = log(3.14), 
   io:fwrite("~p~n",[Alog]).

Erlang exp

-module(helloworld). 
-import(math,[exp/1]). 
-export([start/0]). 

start() ->
   Aexp = exp(3.14), 
   io:fwrite("~p~n",[Aexp]).

Erlang atan

-module(helloworld). 
-import(math,[atan/1]). 
-export([start/0]). 

start() ->
   Atan = atan(0.7071), 
   io:fwrite("~p~n",[Atan]).

Erlang acos

-module(helloworld). 
-import(math,[acos/1]). 
-export([start/0]). 

start() ->
   Acos = acos(0.7071), 
   io:fwrite("~p~n",[Acos]).

Erlang asin

-module(helloworld). 
-import(math,[asin/1]). 
-export([start/0]). 

start() -> 
   Asin = asin(0.7071), 
   io:fwrite("~p~n",[Asin]).

Erlang Tan Number

-module(helloworld). 
-import(math,[tan/1]). 
-export([start/0]). 

start() ->
   Tan = tan(45), 
   io:fwrite("~p~n",[Tan]).

Erlang Cos Number

-module(helloworld). 
-import(math,[cos/1]). 
-export([start/0]). 

start() -> 
   Cosin = cos(45), 
   io:fwrite("~p~n",[Cosin]).

Erlang Sin Number

-module(helloworld). 
-import(math,[sin/1]). 
-export([start/0]). 

start() -> 
   Sin = sin(45), 
   io:fwrite("~p~n",[Sin]).

Erlang Float and Exponential Numbers

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~f~n",[1.1+1.2]), 
   io:fwrite("~e~n",[1.1+1.2]).

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.