@@ -274,23 +274,33 @@ macro_rules! impl_op_for_ty {
274
274
impl_op_for_ty ! ( f32 , "f" ) ;
275
275
impl_op_for_ty ! ( f64 , "" ) ;
276
276
277
- // TODO can't just use a suffix
278
- // Account for `lgamma_r` not having a simple `f` suffix
279
- // pub mod lgammaf_r {
280
- // pub use super::lgamma_rf::*;
281
- // }
282
-
283
- // impl MpOp for crate::func::[<lgamma_r $suffix>]::Func {
284
- // type MpTy = MpFloat;
285
-
286
- // fn new_mp() -> Self::MpTy {
287
- // new_mpfloat::<Self::FTy>()
288
- // }
289
-
290
- // fn run(this: &mut Self::MpTy, input: Self::RustArgs) -> Self::RustRet {
291
- // this.assign(input.0);
292
- // let (sign, ord) = this.ln_abs_gamma_round(Nearest);
293
- // let ret = prep_retval::<Self::FTy>(this, ord);
294
- // (ret, sign as i32)
295
- // }
296
- // }
277
+ // `lgamma_r` is not a simple suffix so we can't use the above macro.
278
+ impl MpOp for crate :: func:: lgamma_r:: Func {
279
+ type MpTy = MpFloat ;
280
+
281
+ fn new_mp ( ) -> Self :: MpTy {
282
+ new_mpfloat :: < Self :: FTy > ( )
283
+ }
284
+
285
+ fn run ( this : & mut Self :: MpTy , input : Self :: RustArgs ) -> Self :: RustRet {
286
+ this. assign ( input. 0 ) ;
287
+ let ( sign, ord) = this. ln_abs_gamma_round ( Nearest ) ;
288
+ let ret = prep_retval :: < Self :: FTy > ( this, ord) ;
289
+ ( ret, sign as i32 )
290
+ }
291
+ }
292
+
293
+ impl MpOp for crate :: func:: lgammaf_r:: Func {
294
+ type MpTy = MpFloat ;
295
+
296
+ fn new_mp ( ) -> Self :: MpTy {
297
+ new_mpfloat :: < Self :: FTy > ( )
298
+ }
299
+
300
+ fn run ( this : & mut Self :: MpTy , input : Self :: RustArgs ) -> Self :: RustRet {
301
+ this. assign ( input. 0 ) ;
302
+ let ( sign, ord) = this. ln_abs_gamma_round ( Nearest ) ;
303
+ let ret = prep_retval :: < Self :: FTy > ( this, ord) ;
304
+ ( ret, sign as i32 )
305
+ }
306
+ }
0 commit comments