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 +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,25 @@ macro_rules! impl_op_for_ty {
258258 }
259259 }
260260
261+ impl MpOp for crate :: op:: [ <frexp $suffix>] :: Routine {
262+ type MpTy = MpFloat ;
263+
264+ fn new_mp( ) -> Self :: MpTy {
265+ new_mpfloat:: <Self :: FTy >( )
266+ }
267+
268+ fn run( this: & mut Self :: MpTy , input: Self :: RustArgs ) -> Self :: RustRet {
269+ // Implementation taken from `rug::Float::to_f32_exp`.
270+ this. assign( input. 0 ) ;
271+ let exp = this. get_exp( ) . unwrap_or( 0 ) ;
272+ if exp != 0 {
273+ * this >>= exp;
274+ }
275+
276+ ( prep_retval:: <Self :: FTy >( this, Ordering :: Equal ) , exp)
277+ }
278+ }
279+
261280 impl MpOp for crate :: op:: [ <jn $suffix>] :: Routine {
262281 type MpTy = MpFloat ;
263282
Original file line number Diff line number Diff line change @@ -52,8 +52,6 @@ libm_macros::for_each_function! {
5252 ] ,
5353 skip: [
5454 // FIXME: MPFR tests needed
55- frexp,
56- frexpf,
5755 ilogb,
5856 ilogbf,
5957 ldexp,
@@ -159,8 +157,6 @@ libm_macros::for_each_function! {
159157 ynf,
160158
161159 // FIXME: MPFR tests needed
162- frexp,
163- frexpf,
164160 ilogb,
165161 ilogbf,
166162 ] ,
You can’t perform that action at this time.
0 commit comments