Skip to content

Commit

Permalink
one more example, and now using showgood
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarcosta committed Jun 15, 2024
1 parent 0cae160 commit d9a0273
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions src/flint/types/acb_theta.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ def acb_theta(acb_mat z, acb_mat tau, ulong square=False):
>>> t0, t1, t2, t3 = acb_mat([[tau]]).theta(acb_mat([[z]])).entries()
>>> sum([abs(x) for x in acb_mat([z.modular_theta(tau)]) - acb_mat([[-t3,t2,t0,t1]])])
[+/- 3.82e-14]
>>> for i in range(4):showgood(lambda: acb_mat([[tau]]).theta(acb_mat([[z]])).entries()[i], dps=25)
...
0.9694430387796704100046143 - 0.03055696120816803328582847j
1.030556961196006476576271 + 0.03055696120816803328582847j
-1.220790267576967690128359 - 1.827055516791154669091679j
-1.820235910124989594900076 + 1.216251950154477951760042j
>>> showgood(lambda: acb_mat([[tau]]).theta(acb_mat([[z]])).transpose(), dps=25)
[0.9694430387796704100046143 - 0.03055696120816803328582847j]
[ 1.030556961196006476576271 + 0.03055696120816803328582847j]
[ -1.220790267576967690128359 - 1.827055516791154669091679j]
[ -1.820235910124989594900076 + 1.216251950154477951760042j]
>>> acb_mat([[1j,0],[0,2*1j]]).theta(acb_mat([[0],[0]])).transpose()
[ [1.09049252082308 +/- 3.59e-15] + [+/- 2.43e-16]j]
[ [1.08237710165638 +/- 4.15e-15] + [+/- 2.43e-16]j]
Expand All @@ -44,6 +43,24 @@ def acb_theta(acb_mat z, acb_mat tau, ulong square=False):
[ [+/- 2.43e-16] + [+/- 2.43e-16]j]
[ [+/- 2.43e-16] + [+/- 2.43e-16]j]
[ [+/- 2.43e-16] + [+/- 2.43e-16]j]
>>> ctx.prec = 10000
>>> print(acb_mat([[1j, 0],[0,1j]]).theta(acb_mat([[0],[0]])).transpose().str(25))
[ [1.180340599016096226045338 +/- 5.95e-26] + [+/- 1.23e-3010]j]
[[0.9925441784910574194770081 +/- 3.15e-26] + [+/- 1.23e-3010]j]
[[0.9925441784910574194770081 +/- 3.15e-26] + [+/- 1.23e-3010]j]
[[0.8346268416740731862814297 +/- 3.29e-26] + [+/- 1.23e-3010]j]
[[0.9925441784910574194770081 +/- 3.15e-26] + [+/- 1.23e-3010]j]
[ [+/- 1.23e-3010] + [+/- 1.23e-3010]j]
[[0.8346268416740731862814297 +/- 3.29e-26] + [+/- 1.23e-3010]j]
[ [+/- 1.23e-3010] + [+/- 1.23e-3010]j]
[[0.9925441784910574194770081 +/- 3.15e-26] + [+/- 1.23e-3010]j]
[[0.8346268416740731862814297 +/- 3.29e-26] + [+/- 1.23e-3010]j]
[ [+/- 1.23e-3010] + [+/- 1.23e-3010]j]
[ [+/- 1.23e-3010] + [+/- 1.23e-3010]j]
[[0.8346268416740731862814297 +/- 3.29e-26] + [+/- 1.23e-3010]j]
[ [+/- 1.23e-3010] + [+/- 1.23e-3010]j]
[ [+/- 1.23e-3010] + [+/- 1.23e-3010]j]
[ [+/- 1.23e-3010] + [+/- 1.23e-3010]j]
"""
g = tau.nrows()
Expand Down

0 comments on commit d9a0273

Please sign in to comment.