Mojo function
ldexp
ldexp[type: DType, simd_width: Int, //](x: SIMD[type, simd_width], exp: SIMD[int32, simd_width]) -> SIMD[type, simd_width]
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:
- type (
DType
): Thedtype
of the input and output SIMD vector. - simd_width (
Int
): The width of the input and output SIMD vector.
Args:
- x (
SIMD[type, simd_width]
): SIMD vector of floating point values. - exp (
SIMD[int32, simd_width]
): SIMD vector containing the exponents.
Returns:
Vector containing elementwise result of ldexp on x and exp.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!