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