Erlang – float

Erlang float

In this guide, we will discuss Erlang float. This method returns the float value of a particular number.

Syntax

float(number)

Parameters

  • number − This is the number which needs to be converted to float.

Return Value

The method returns the float value of a particular number.

For example

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[float(5)]).

Output

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

5.0

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply