test/polynomial_test.rb in polynomials-0.1.4 vs test/polynomial_test.rb in polynomials-0.1.5

- old
+ new

@@ -36,19 +36,19 @@ def test_degree assert_equal 5,Polynomial.parse('3x^5 - 5 x + 3').degree end - def test_extremums + def test_extrema polynomial = Polynomial.parse('3x^2 + 2x + 1') - assert_equal({ min: Set[-2.0/6.0] }, polynomial.local_extremums) + assert_equal({ min: Set[-2.0/6.0] }, polynomial.local_extrema) polynomial = Polynomial.parse('5x^3 - 5x^2 + 2x - 2') end - def test_extremums_with_slope_of_derivative_equal_to_zero + def test_extrema_with_slope_of_derivative_equal_to_zero polynomial = Polynomial.parse('1x^4') - assert_equal({ min: Set[0.0] }, polynomial.local_extremums) - assert_equal({ max: Set[1.0/0, -1.0/0], min: Set[0.0]}, polynomial.extremums) + assert_equal({ min: Set[0.0] }, polynomial.local_extrema) + assert_equal({ max: Set[1.0/0, -1.0/0], min: Set[0.0]}, polynomial.extrema) end def test_no_inflection_points polynomial = Polynomial.parse('1 x^4') assert_equal({ left: Set[-1.0/0..+1.0/0] }, polynomial.curvature_behaviour)