This repository was archived by the owner on Apr 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -292,6 +292,34 @@ macro_rules! impl_op_for_ty {
292292 }
293293 }
294294
295+ // `ldexp` and `scalbn` are the same for binary floating point, so just forward all
296+ // methods.
297+ impl MpOp for crate :: op:: [ <ldexp $suffix>] :: Routine {
298+ type MpTy = <crate :: op:: [ <scalbn $suffix>] :: Routine as MpOp >:: MpTy ;
299+
300+ fn new_mp( ) -> Self :: MpTy {
301+ <crate :: op:: [ <scalbn $suffix>] :: Routine as MpOp >:: new_mp( )
302+ }
303+
304+ fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
305+ <crate :: op:: [ <scalbn $suffix>] :: Routine as MpOp >:: run( this, input)
306+ }
307+ }
308+
309+ impl MpOp for crate :: op:: [ <scalbn $suffix>] :: Routine {
310+ type MpTy = MpFloat ;
311+
312+ fn new_mp( ) -> Self :: MpTy {
313+ new_mpfloat:: <Self :: FTy >( )
314+ }
315+
316+ fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
317+ this. assign( input. 0 ) ;
318+ * this <<= input. 1 ;
319+ prep_retval:: <Self :: FTy >( this, Ordering :: Equal )
320+ }
321+ }
322+
295323 impl MpOp for crate :: op:: [ <sincos $suffix>] :: Routine {
296324 type MpTy = ( MpFloat , MpFloat ) ;
297325
Original file line number Diff line number Diff line change @@ -54,12 +54,8 @@ libm_macros::for_each_function! {
5454 // FIXME: MPFR tests needed
5555 ilogb,
5656 ilogbf,
57- ldexp,
58- ldexpf,
5957 remquo,
6058 remquof,
61- scalbn,
62- scalbnf,
6359
6460 // FIXME: test needed, see
6561 // https://github.com/rust-lang/libm/pull/311#discussion_r1818273392
You can’t perform that action at this time.
0 commit comments