In this guide, we will discuss Erlang float. The method converts a number to a float value.
Syntax
float(X)
Parameters
X – A number value.
Return Value
The return value is the float value of the number.
For example
-module(helloworld). -export([start/0]). start() -> Num = float(3), io:fwrite("~f",[Num]).
Output
When we run the above program, we will get the following result.
3.000000
Next Topic : Click Here
Pingback: Erlang - log | Adglob Infosystem Pvt Ltd
Pingback: Erlang - Numbers | Adglob Infosystem Pvt Ltd