Skip to main content
Log in

Mojo function

float

float[T: Floatable](value: T, /) -> SIMD[float64, 1]

Get the Float representation of the value.

Parameters:

  • T (Floatable): The Floatable type.

Args:

  • value (T): The object to get the float point representation of.

Returns:

The float point representation of the value.

float[T: FloatableRaising](value: T, /) -> SIMD[float64, 1]

Get the Float representation of the value.

Parameters:

  • T (FloatableRaising): The Floatable type.

Args:

  • value (T): The object to get the float point representation of.

Returns:

The float point representation of the value.

Raises:

If the type does not have a float point representation.

float(value: Int, /) -> SIMD[float64, 1]

Get the Float representation of the Int.

Args:

  • value (Int): The Int to get the float point representation of.

Returns:

The float point representation of the Int.