Skip to main content
Log in

Mojo function

random_float64

random_float64(min: SIMD[float64, 1] = __init__[__mlir_type.!pop.int_literal](0), max: SIMD[float64, 1] = __init__[__mlir_type.!pop.int_literal](1)) -> SIMD[float64, 1]

Returns a random Float64 number from the given range.

Args:

  • min (SIMD[float64, 1]): The minimum number in the range (default is 0.0).
  • max (SIMD[float64, 1]): The maximum number in the range (default is 1.0).

Returns:

A random number from the specified range.