MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / testRoot_7args

Method testRoot_7args

JSAT/test/jsat/math/rootfinding/SecantTest.java:190–207  ·  view source on GitHub ↗

Test of root method, of class Secant.

()

Source from the content-addressed store, hash-verified

188 * Test of root method, of class Secant.
189 */
190 @Test
191 public void testRoot_7args()
192 {
193 System.out.println("root");
194 double eps = 1e-13;
195 int maxIterations = 1000;
196 double result = Secant.root(eps, maxIterations, -PI/2, PI/2, 0, sinF);
197 assertEquals(0, sinF.f(result), eps);
198
199 result = Secant.root(eps, maxIterations, -PI/2, PI/2, 0, sinFp1, 0.0, 1.0);
200 assertEquals(0, sinFp1.f(result, 1.0), eps);
201
202 result = Secant.root(eps, maxIterations, -PI/2, PI/2, 1, sinFp1, 3.0, 0.0);
203 assertEquals(0, sinFp1.f(3.0, result), eps);
204
205 result = Secant.root(eps, maxIterations, -6, 6, 0, polyF);
206 assertEquals(-4.8790576334840479813, result, eps);
207 }
208}

Callers

nothing calls this directly

Calls 2

rootMethod · 0.95
fMethod · 0.65

Tested by

no test coverage detected