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

Erlang Log Method

Numbers in Erlang

This method returns the logarithm of the specified value.

Syntax

log(X)

Parameter

X-Specify a value for the logarithmic function.

Return Value

The return value is a floating-point number representing the logarithm of the value.

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

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

1.14422279992016

Numbers in Erlang