Test of hornerPolyR method, of class MathTricks.
()
| 116 | * Test of hornerPolyR method, of class MathTricks. |
| 117 | */ |
| 118 | @Test |
| 119 | public void testHornerPolyR() |
| 120 | { |
| 121 | System.out.println("hornerPolyR"); |
| 122 | double[] coef = new double[]{1, -4, 0, 8, 1}; |
| 123 | assertEquals(1, MathTricks.hornerPolyR(coef, 0), 1e-15); |
| 124 | assertEquals(6, MathTricks.hornerPolyR(coef, 1), 1e-15); |
| 125 | assertEquals(481, MathTricks.hornerPolyR(coef, 6), 1e-15); |
| 126 | assertEquals(2113, MathTricks.hornerPolyR(coef, -6), 1e-15); |
| 127 | |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Test of hornerPoly method, of class MathTricks. |
nothing calls this directly
no test coverage detected