For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
ldexp
ldexp[dtype: DType, width: Int, //](x: SIMD[dtype, width], exp: SIMD[DType.int32, width]) -> SIMD[dtype, width] where dtype.is_floating_point()
Computes elementwise ldexp function.
The ldexp function multiplies a floating point value x by the number 2 raised to the exp power. I.e. calculate the value of and is used within the function.
Parameters:
- dtype (
DType): Thedtypeof the input and output SIMD vector. - width (
Int): The width of the input and output SIMD vector.
Args:
- x (
SIMD[dtype, width]): SIMD vector of floating point values. - exp (
SIMD[DType.int32, width]): SIMD vector containing the exponents.
Returns:
SIMD[dtype, width]: Vector containing elementwise result of ldexp on x and exp.