Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in computing hypergeometric traces #37910

Closed
2 tasks done
kedlaya opened this issue May 1, 2024 · 2 comments
Closed
2 tasks done

Bug in computing hypergeometric traces #37910

kedlaya opened this issue May 1, 2024 · 2 comments
Assignees
Labels

Comments

@kedlaya
Copy link
Contributor

kedlaya commented May 1, 2024

Steps To Reproduce

sage: from sage.modular.hypergeometric_motive import HypergeometricData as HGData
sage: H = HGData(alpha_beta=[[1/2,1/3,2/3,1/6,5/6], [0,0,0,0,0]])
sage: H.padic_H_value(6211, 2, -512000)

Expected Behavior

Should return -184336511256141.

Actual Behavior

----> 9 cpdef hgm_coeffs(long long p, int f, int prec, gamma, m, int D,
     10                  gtable, int gtable_prec, bint use_longs):
     11     r"""
File /usr/local/sage/src/sage/modular/hypergeometric_misc.pyx:73, in sage.modular.hypergeometric_misc.hgm_coeffs()
     71     except TypeError:
     72         for r in range(q1):
---> 73             gtab2[r] = gtable[r].lift()
     74 if f == 1:
     75     for r in range(q1):
OverflowError: int too big to convert

Environment

- **OS**: Ubuntu 24.04
- **Sage Version**: 10.4b4

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@kedlaya
Copy link
Contributor Author

kedlaya commented May 1, 2024

The issue here is that hgm_coeffs() is assuming p ** prec < 2 ** 63 in order to fit each Gauss sum into a long long.

vbraun pushed a commit to vbraun/sage that referenced this issue May 2, 2024
    
This PR fixes an overflow bug in the computation of the hypergeometric
trace formula (sagemath#37910).
    
URL: sagemath#37911
Reported by: kedlaya
Reviewer(s):
@tscrim
Copy link
Collaborator

tscrim commented May 2, 2024

Fixed by #37911.

@tscrim tscrim closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants