float function

Synopsis

  • float float(string value)
  • float float(float value)
  • float float(bool value)

Returns

Float value calculated from value.

Description

The float function converts value to the corresponding float value.

Related

Examples

example.1
	float("0.5")
	# result = 0.5
example.2
	float(true)
	# result = 1
example.3
	float("001.5")
	# result = 1.5
example.4
	float(1/0)
	# result = inf

In this topic