Closed user202729 closed 2 months ago
When I look at the documentation for mfeval, I don't see any precision argument. My guess is that you just have to use the global set_real_precision_bits
.
Setting that work, but there's a few similar cases in SageMath source code where precision
is passed (although to a different function)
src/sage/databases/cremona.py: E = pari(alist).ellinit(precision=ft)
src/sage/databases/cremona.py: E = pari(alist).ellinit(precision=ft)
src/sage/schemes/elliptic_curves/period_lattice.py: # The precision for omega() is determined by ellinit()
src/sage/schemes/elliptic_curves/period_lattice.py: E_pari = pari.ellinit(ainvs, precision=prec)
I'm not sure what's going on. (the "library syntax" at the bottom, which if I understood correctly means the C API instead of GP scripting language, says bitprec
can be passed)
actually precision
can be used to decrease precision, but not increase it:
sage: mf = pari.mfinit([1,4],3)
....: [f] = pari.mfbasis(mf)
sage: pari.set_real_precision_bits(64)
....: pari.mfeval(mf, f, pari("I"), precision=400)
0.006065678717786288844
sage: pari.set_real_precision_bits(400)
....: pari.mfeval(mf, f, pari("I"), precision=400)
0.00606567871778628884359342501499528869763497743970084789882853707625021574461901420877704921867358230481037126231595491218
sage: pari.set_real_precision_bits(400)
....: pari.mfeval(mf, f, pari("I"), precision=64)
0.0060656787177862888435928388224507233518
^^^^^^^^^^^^^^^^^ incorrect
Maybe it's just unclear documentation on pari side.
In the last line,
precision=400
is explicitly passed but the output only has 64 bits.Any idea?