Skip to main content



ldexp[type: DType, simd_width: Int](x: SIMD[type, simd_width], exp: SIMD[int32, simd_width]) -> SIMD[$0, $1]

Computes elementwise ldexp function.

The ldexp function multiplies a floating point value x by the number 2 raised to the exp power. I.e. ldexp(x,exp)ldexp(x,exp) calculate the value of x2expx * 2^{exp} and is used within the erferf function.


  • type (DType): The dtype of the input and output SIMD vector.
  • simd_width (Int): The width of the input and output SIMD vector.


  • x (SIMD[type, simd_width]): SIMD vector of floating point values.
  • exp (SIMD[int32, simd_width]): SIMD vector containing the exponents.


Vector containing elementwise result of ldexp on x and exp.