Erlang – log

Erlang log

In this guide, we will discuss Erlang log. The method returns the logarithmic of the specified value.

Syntax

log(X)

Parameters

X – A value is specified for the logarithmic function.

Return Value

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

For example

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

start() ->
   Alog = log(3.14), 
   io:fwrite("~p~n",[Alog]).

Output

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

1.14422279992016

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply