Erlang – sin

Erlang sin

In this guide, we will discuss Erlang Sin. This method returns the sine of the specified value.

Syntax

sin(X)

Parameters

X – A value is specified for the sine function.

Return Value

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

For example

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

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

Output

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

0.8509035245341184

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply