@@ -162,8 +162,12 @@ libm_macros::for_each_function! {
162162 fmodf16,
163163 frexp,
164164 frexpf,
165+ frexpf128,
166+ frexpf16,
165167 ilogb,
166168 ilogbf,
169+ ilogbf128,
170+ ilogbf16,
167171 jn,
168172 jnf,
169173 ldexp,
@@ -324,43 +328,6 @@ macro_rules! impl_op_for_ty {
324328 }
325329 }
326330
327- impl MpOp for crate :: op:: [ <frexp $suffix>] :: Routine {
328- type MpTy = MpFloat ;
329-
330- fn new_mp( ) -> Self :: MpTy {
331- new_mpfloat:: <Self :: FTy >( )
332- }
333-
334- fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
335- this. assign( input. 0 ) ;
336- let exp = this. frexp_mut( ) ;
337- ( prep_retval:: <Self :: FTy >( this, Ordering :: Equal ) , exp)
338- }
339- }
340-
341- impl MpOp for crate :: op:: [ <ilogb $suffix>] :: Routine {
342- type MpTy = MpFloat ;
343-
344- fn new_mp( ) -> Self :: MpTy {
345- new_mpfloat:: <Self :: FTy >( )
346- }
347-
348- fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
349- this. assign( input. 0 ) ;
350-
351- // `get_exp` follows `frexp` for `0.5 <= |m| < 1.0`. Adjust the exponent by
352- // one to scale the significand to `1.0 <= |m| < 2.0`.
353- this. get_exp( ) . map( |v| v - 1 ) . unwrap_or_else( || {
354- if this. is_infinite( ) {
355- i32 :: MAX
356- } else {
357- // Zero or NaN
358- i32 :: MIN
359- }
360- } )
361- }
362- }
363-
364331 impl MpOp for crate :: op:: [ <jn $suffix>] :: Routine {
365332 type MpTy = MpFloat ;
366333
@@ -505,6 +472,43 @@ macro_rules! impl_op_for_ty_all {
505472 }
506473 }
507474
475+ impl MpOp for crate :: op:: [ <frexp $suffix>] :: Routine {
476+ type MpTy = MpFloat ;
477+
478+ fn new_mp( ) -> Self :: MpTy {
479+ new_mpfloat:: <Self :: FTy >( )
480+ }
481+
482+ fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
483+ this. assign( input. 0 ) ;
484+ let exp = this. frexp_mut( ) ;
485+ ( prep_retval:: <Self :: FTy >( this, Ordering :: Equal ) , exp)
486+ }
487+ }
488+
489+ impl MpOp for crate :: op:: [ <ilogb $suffix>] :: Routine {
490+ type MpTy = MpFloat ;
491+
492+ fn new_mp( ) -> Self :: MpTy {
493+ new_mpfloat:: <Self :: FTy >( )
494+ }
495+
496+ fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
497+ this. assign( input. 0 ) ;
498+
499+ // `get_exp` follows `frexp` for `0.5 <= |m| < 1.0`. Adjust the exponent by
500+ // one to scale the significand to `1.0 <= |m| < 2.0`.
501+ this. get_exp( ) . map( |v| v - 1 ) . unwrap_or_else( || {
502+ if this. is_infinite( ) {
503+ i32 :: MAX
504+ } else {
505+ // Zero or NaN
506+ i32 :: MIN
507+ }
508+ } )
509+ }
510+ }
511+
508512 // `ldexp` and `scalbn` are the same for binary floating point, so just forward all
509513 // methods.
510514 impl MpOp for crate :: op:: [ <ldexp $suffix>] :: Routine {
0 commit comments