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 {
292
292
}
293
293
}
294
294
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
+
295
323
impl MpOp for crate :: op:: [ <sincos $suffix>] :: Routine {
296
324
type MpTy = ( MpFloat , MpFloat ) ;
297
325
Original file line number Diff line number Diff line change @@ -54,12 +54,8 @@ libm_macros::for_each_function! {
54
54
// FIXME: MPFR tests needed
55
55
ilogb,
56
56
ilogbf,
57
- ldexp,
58
- ldexpf,
59
57
remquo,
60
58
remquof,
61
- scalbn,
62
- scalbnf,
63
59
64
60
// FIXME: test needed, see
65
61
// https://github.com/rust-lang/libm/pull/311#discussion_r1818273392
You can’t perform that action at this time.
0 commit comments