test/analyzable_test.rb in polynomials-0.4.0 vs test/analyzable_test.rb in polynomials-0.4.1

- old
+ new

@@ -71,6 +71,21 @@ assert_equal nil, polynomial.strives_for polynomial = Polynomial.parse('+ 1.0 x^4 + 5.0 x^3 - 1.0 x^2 + 3.0 x + 5.0').derivative assert_equal [-Infinity,Infinity], polynomial.strives_for end + + def test_inflection_points_some_coefficients_of_derivative2_zero + polynomial = Polynomial.parse('x^5 + x^1') + assert_set_eql Set[], polynomial.inflection_points + end + + def test_curvature_behaviour_degree_4 + polynomial = Polynomial.parse('x^5 + x^1') + assert_equal({ :right => [[-Infinity,0.0]], :left => [[0.0, Infinity]] }, polynomial.curvature_behaviour) + end + + def test_strives_for_no_roots + polynomial = Polynomial.new(1,0,0,0,0) + assert_equal [Infinity,Infinity], polynomial.strives_for + end end