Erlang - tan


Advertisements

This method returns the tangent of the specified value.

Syntax

tan(X)

Parameters

X - A value is specified for the tangent function.

Return Value

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

For example

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

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

Output

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

1.6197751905438615
erlang_numbers.htm
Advertisements