From d5f1fd4de80b7824f36064a2c46dbc0ac86d0a3b Mon Sep 17 00:00:00 2001 From: Yiwu Chen <210at85@gmail.com> Date: Wed, 16 Oct 2024 21:43:14 +0000 Subject: [PATCH] wip Signed-off-by: Yiwu Chen <210at85@gmail.com> --- stdlib/src/math/math.mojo | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stdlib/src/math/math.mojo b/stdlib/src/math/math.mojo index b5c7102417..b7215be269 100644 --- a/stdlib/src/math/math.mojo +++ b/stdlib/src/math/math.mojo @@ -501,11 +501,9 @@ fn _ldexp_impl[ return res alias integral_type = FPUtils[type].integral_type - var m: SIMD[integral_type, simd_width] = ( - exp.cast[integral_type]() + FPUtils[type].exponent_bias() - ) + var m = exp.cast[integral_type]() + FPUtils[type].exponent_bias() - return x * (m << FPUtils[type].mantissa_width())._bits_to_float[type]() + return x * __type_of(x)(from_bits=m << FPUtils[type].mantissa_width()) @always_inline