def test_second_derivatives_oscpart(self): w = [0.2+0.5j, 0.3-0.1j, -0.1+0.2j] Omega = self.Omega3 H = RiemannTheta.oscillatory_part_hessian(w, Omega, epsilon=1e-14) maple_00 = -2.160656081990225 + 14.02434682346524j maple_01 = -1.483857302597929 - 0.9449250397349686j maple_02 = 1.954110529051029 - 1.042434632145520j maple_11 = 1.037397682580653 + 0.1077503940181105j maple_12 = 0.09466454944980265 - 0.3593388338083318j maple_22 = -0.3227275082474401 - 2.585609638196203j error_00 = abs(H[0,0] - maple_00) error_01 = abs(H[0,1] - maple_01) error_02 = abs(H[0,2] - maple_02) error_11 = abs(H[1,1] - maple_11) error_12 = abs(H[1,2] - maple_12) error_22 = abs(H[2,2] - maple_22) self.assertLess(error_00, 1e-8) self.assertLess(error_01, 1e-8) self.assertLess(error_02, 1e-8) self.assertLess(error_11, 1e-8) self.assertLess(error_12, 1e-8) self.assertLess(error_22, 1e-8)
def test_second_derivatives_oscpart(self): w = [0.2 + 0.5j, 0.3 - 0.1j, -0.1 + 0.2j] Omega = self.Omega3 H = RiemannTheta.oscillatory_part_hessian(w, Omega, epsilon=1e-14) maple_00 = -2.160656081990225 + 14.02434682346524j maple_01 = -1.483857302597929 - 0.9449250397349686j maple_02 = 1.954110529051029 - 1.042434632145520j maple_11 = 1.037397682580653 + 0.1077503940181105j maple_12 = 0.09466454944980265 - 0.3593388338083318j maple_22 = -0.3227275082474401 - 2.585609638196203j error_00 = abs(H[0, 0] - maple_00) error_01 = abs(H[0, 1] - maple_01) error_02 = abs(H[0, 2] - maple_02) error_11 = abs(H[1, 1] - maple_11) error_12 = abs(H[1, 2] - maple_12) error_22 = abs(H[2, 2] - maple_22) self.assertLess(error_00, 1e-8) self.assertLess(error_01, 1e-8) self.assertLess(error_02, 1e-8) self.assertLess(error_11, 1e-8) self.assertLess(error_12, 1e-8) self.assertLess(error_22, 1e-8)