Erlang - atan



The method returns the arctangent of the specified value.

Syntax

atan(X)

Parameters

X - A value is specified for the arctangent function.

Return Value

The return value is a float value representing the arctangent value.

For example

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

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

Output

When we run the above program, we will get the following result.

0.6154751878649041
erlang_numbers.htm
Advertisements