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

Method testRoot_6args

JSAT/test/jsat/math/rootfinding/SecantTest.java:169–185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

167 }
168
169 @Test
170 public void testRoot_6args()
171 {
172 System.out.println("root");
173 double eps = 1e-15;
174 double result = Secant.root(eps, -PI/2, PI/2, 0, sinF);
175 assertEquals(0, sinF.f(result), eps);
176
177 result = Secant.root(eps, -PI/2, PI/2, 0, sinFp1, 0.0, 1.0);
178 assertEquals(0, sinFp1.f(result, 1.0), eps);
179
180 result = Secant.root(eps, -PI/2, PI/2, 1, sinFp1, 3.0, 0.0);
181 assertEquals(0, sinFp1.f(3.0, result), eps);
182
183 result = Secant.root(eps, -6, 6, 0, polyF);
184 assertEquals(-4.8790576334840479813, result, eps);
185 }
186
187 /**
188 * Test of root method, of class Secant.

Callers

nothing calls this directly

Calls 2

rootMethod · 0.95
fMethod · 0.65

Tested by

no test coverage detected