@@ -3953,11 +3953,14 @@ BigMath_s_log(VALUE klass, VALUE x, VALUE vprec)
3953
3953
}
3954
3954
x = VpCheckGetValue (vx );
3955
3955
3956
- RB_GC_GUARD (one ) = VpCheckGetValue (VpCreateRbObject (1 , "1" , true));
3957
- RB_GC_GUARD (two ) = VpCheckGetValue (VpCreateRbObject (1 , "2" , true));
3956
+ one = VpCheckGetValue (VpCreateRbObject (1 , "1" , true));
3957
+ two = VpCheckGetValue (VpCreateRbObject (1 , "2" , true));
3958
+ RB_GC_GUARD (one );
3959
+ RB_GC_GUARD (two );
3958
3960
3959
3961
n = prec + BIGDECIMAL_DOUBLE_FIGURES ;
3960
- RB_GC_GUARD (vn ) = SSIZET2NUM (n );
3962
+ vn = SSIZET2NUM (n );
3963
+ RB_GC_GUARD (vn );
3961
3964
expo = VpExponent10 (vx );
3962
3965
if (expo < 0 || expo >= 3 ) {
3963
3966
char buf [DECIMAL_SIZE_OF_BITS (SIZEOF_VALUE * CHAR_BIT ) + 4 ];
@@ -3969,9 +3972,12 @@ BigMath_s_log(VALUE klass, VALUE x, VALUE vprec)
3969
3972
}
3970
3973
w = BigDecimal_sub (x , one );
3971
3974
x = BigDecimal_div2 (w , BigDecimal_add (x , one ), vn );
3972
- RB_GC_GUARD (x2 ) = BigDecimal_mult2 (x , x , vn );
3973
- RB_GC_GUARD (y ) = x ;
3974
- RB_GC_GUARD (d ) = y ;
3975
+ x2 = BigDecimal_mult2 (x , x , vn );
3976
+ y = x ;
3977
+ d = y ;
3978
+ RB_GC_GUARD (x2 );
3979
+ RB_GC_GUARD (y );
3980
+ RB_GC_GUARD (d );
3975
3981
i = 1 ;
3976
3982
while (!VpIsZero ((Real * )DATA_PTR (d ))) {
3977
3983
SIGNED_VALUE const ey = VpExponent10 (DATA_PTR (y ));
0 commit comments