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

Method testCDiv

JSAT/test/jsat/math/ComplexTest.java:253–265  ·  view source on GitHub ↗

Test of cDiv method, of class Complex.

()

Source from the content-addressed store, hash-verified

251 * Test of cDiv method, of class Complex.
252 */
253 @Test
254 public void testCDiv()
255 {
256 System.out.println("cDiv");
257 double r0 = a.getReal();
258 double i0 = a.getImag();
259 double r1 = b.getReal();
260 double i1 = b.getImag();
261 double[] results = new double[2];
262 Complex.cDiv(r0, i0, r1, i1, results);
263 assertEquals( 0.224137931034483, results[0], 1e-14);
264 assertEquals(-0.189655172413793, results[1], 1e-14);
265 }
266
267 /**
268 * Test of mutableDivide method, of class Complex.

Callers

nothing calls this directly

Calls 3

cDivMethod · 0.95
getRealMethod · 0.80
getImagMethod · 0.80

Tested by

no test coverage detected