English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This method returns the absolute value of the specified number.
abs(X)
X-Specify a value for the absolute value function.
The return value is the absolute value of a number.
-module(helloworld). -export([start/). start() -> Aabs = abs(-3.14), io:fwrite("~p~n",[Aabs]).
When we run the above program, we will get the following results.
3.14