@@ -137,7 +137,8 @@ libm_macros::for_each_function! {
137137 fmod, fmodf, frexp, frexpf, ilogb, ilogbf, jn, jnf, ldexp, ldexpf,
138138 lgamma_r, lgammaf_r, modf, modff, nextafter, nextafterf, pow, powf,
139139 remquo, remquof, scalbn, scalbnf, sincos, sincosf, yn, ynf,
140- copysignf16, copysignf128, fabsf16, fabsf128,
140+ copysignf16, copysignf128, fabsf16, fabsf128, ldexpf16, ldexpf128,
141+ scalbnf16, scalbnf128,
141142 ] ,
142143 fn_extra: match MACRO_FN_NAME {
143144 // Remap function names that are different between mpfr and libm
@@ -255,36 +256,6 @@ macro_rules! impl_op_for_ty {
255256 }
256257 }
257258
258- // `ldexp` and `scalbn` are the same for binary floating point, so just forward all
259- // methods.
260- impl MpOp for crate :: op:: [ <ldexp $suffix>] :: Routine {
261- type MpTy = <crate :: op:: [ <scalbn $suffix>] :: Routine as MpOp >:: MpTy ;
262-
263- fn new_mp( ) -> Self :: MpTy {
264- <crate :: op:: [ <scalbn $suffix>] :: Routine as MpOp >:: new_mp( )
265- }
266-
267- fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
268- <crate :: op:: [ <scalbn $suffix>] :: Routine as MpOp >:: run( this, input)
269- }
270- }
271-
272- impl MpOp for crate :: op:: [ <scalbn $suffix>] :: Routine {
273- type MpTy = ( MpFloat , MpFloat ) ;
274-
275- fn new_mp( ) -> Self :: MpTy {
276- ( new_mpfloat:: <Self :: FTy >( ) , new_mpfloat:: <Self :: FTy >( ) )
277- }
278-
279- fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
280- this. 0 . assign( input. 0 ) ;
281- this. 1 . assign( 2.0 ) ;
282- this. 1 . pow_assign( input. 1 ) ;
283- let ord = this. 0 . mul_assign_round( & this. 1 , Nearest ) ;
284- prep_retval:: <Self :: FTy >( & mut this. 0 , ord)
285- }
286- }
287-
288259 impl MpOp for crate :: op:: [ <sincos $suffix>] :: Routine {
289260 type MpTy = ( MpFloat , MpFloat ) ;
290261
@@ -339,6 +310,36 @@ macro_rules! impl_op_for_ty_all {
339310 prep_retval:: <Self :: RustRet >( & mut this. 0 , Ordering :: Equal )
340311 }
341312 }
313+
314+ // `ldexp` and `scalbn` are the same for binary floating point, so just forward all
315+ // methods.
316+ impl MpOp for crate :: op:: [ <ldexp $suffix>] :: Routine {
317+ type MpTy = <crate :: op:: [ <scalbn $suffix>] :: Routine as MpOp >:: MpTy ;
318+
319+ fn new_mp( ) -> Self :: MpTy {
320+ <crate :: op:: [ <scalbn $suffix>] :: Routine as MpOp >:: new_mp( )
321+ }
322+
323+ fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
324+ <crate :: op:: [ <scalbn $suffix>] :: Routine as MpOp >:: run( this, input)
325+ }
326+ }
327+
328+ impl MpOp for crate :: op:: [ <scalbn $suffix>] :: Routine {
329+ type MpTy = ( MpFloat , MpFloat ) ;
330+
331+ fn new_mp( ) -> Self :: MpTy {
332+ ( new_mpfloat:: <Self :: FTy >( ) , new_mpfloat:: <Self :: FTy >( ) )
333+ }
334+
335+ fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
336+ this. 0 . assign( input. 0 ) ;
337+ this. 1 . assign( 2.0 ) ;
338+ this. 1 . pow_assign( input. 1 ) ;
339+ let ord = this. 0 . mul_assign_round( & this. 1 , Nearest ) ;
340+ prep_retval:: <Self :: FTy >( & mut this. 0 , ord)
341+ }
342+ }
342343 }
343344 } ;
344345}
0 commit comments