File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -778,7 +778,6 @@ def lgamma(x, prec)
778778 # if x is close to 1 or 2, increase precision to reduce loss of significance
779779 diff1_exponent = ( x - 1 ) . exponent
780780 diff2_exponent = ( x - 2 ) . exponent
781- extra_prec = [ -diff1_exponent , -diff2_exponent , 0 ] . max
782781 extremely_near_one = diff1_exponent < -prec2
783782 extremely_near_two = diff2_exponent < -prec2
784783
Original file line number Diff line number Diff line change @@ -14,6 +14,13 @@ class TestBigMath < Test::Unit::TestCase
1414 MINF = BigDecimal ( "-Infinity" )
1515 NAN = BigDecimal ( "NaN" )
1616
17+ def test_no_warning
18+ assert_separately ( [ ] , "#{ <<~"begin;" } \n #{ <<~'end;' } " )
19+ begin;
20+ require 'bigdecimal/math'
21+ end;
22+ end
23+
1724 def test_pi
1825 assert_equal (
1926 BigDecimal ( "3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068" ) ,
You can’t perform that action at this time.
0 commit comments