File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -574,14 +574,7 @@ def expm1(x, prec)
574574
575575 return BigDecimal ( -1 ) if exp_prec <= 0
576576
577- exp = exp ( x , exp_prec )
578-
579- if exp . exponent > prec + BigDecimal . double_fig
580- # Workaroudn for https://github.com/ruby/bigdecimal/issues/464
581- exp
582- else
583- exp . sub ( 1 , prec )
584- end
577+ exp ( x , exp_prec ) . sub ( 1 , prec )
585578 end
586579
587580 # erf(decimal, numeric) -> BigDecimal
@@ -608,12 +601,7 @@ def erf(x, prec)
608601 log10_erfc = -xf ** 2 / Math . log ( 10 ) - Math . log10 ( xf * Math ::PI ** 0.5 )
609602 erfc_prec = [ prec + log10_erfc . ceil , 1 ] . max
610603 erfc = _erfc_asymptotic ( x , erfc_prec )
611- if erfc
612- # Workaround for https://github.com/ruby/bigdecimal/issues/464
613- return BigDecimal ( 1 ) if erfc . exponent < -prec - BigDecimal . double_fig
614-
615- return BigDecimal ( 1 ) . sub ( erfc , prec )
616- end
604+ return BigDecimal ( 1 ) . sub ( erfc , prec ) if erfc
617605 end
618606
619607 prec2 = prec + BigDecimal . double_fig
You can’t perform that action at this time.
0 commit comments