Erlang – tan

Erlang tan

In this guide, we will discuss Erlang tan. 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

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply