English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Erlang sin method

Erlang Numbers

This method returns the sine value of the specified value.

Syntax

sin(X)

Parameter

X-Specify a value for the sine function.

Return Value

The return value is a floating-point value representing the sine value.

-module(helloworld). 
-import(math,[sin/1]). 
-export([start/0]). 
start() -> 
   Sin = sin(45, 
   io:fwrite("~p~n",[Sin]).

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

0.8509035245341184

Erlang Numbers