-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
random doctest error in QuaternionFractionalIdeal_rational.is_principal
#38947
Labels
Comments
use this method to identify the failing case: def foo():
B.<i,j,k> = QuaternionAlgebra(419)
O = B.quaternion_order([1/2 + 3/2*j, 1/6*i + 2/3*j + 1/2*k, 3*j, k])
while True:
beta = O.random_element()
I = O*beta
try:
bool, alpha = I.is_principal(True)
except:
return beta then sage: beta = foo()
sage: type(beta)
<class 'sage.algebras.quatalg.quaternion_algebra_element.QuaternionAlgebraElement_rational_field'>
sage: beta
0 |
@S17A05, this may be of interest to you? |
At first glance it seems that one just needs to exclude the zero ideal here - I'll take a closer look at it. |
vbraun
pushed a commit
to vbraun/sage
that referenced
this issue
Nov 14, 2024
… zero This PR disallows the scaling of quaternion fractional ideals by the zero element of the surrounding quaternion algebra (throwing a `ValueError` in the process), as the result will by definition not be a fractional ideal. It also adds additional checks to avoid scaling by zero in other tests, which came up in the issue mentioned below, and it adds a missing warning for a long doctest. Fixes sagemath#38947. URL: sagemath#38963 Reported by: Sebastian A. Spindler Reviewer(s): Giacomo Pope
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps To Reproduce
sage -t --warn-long 5.0 --random-seed=64954994004742655361672586966720031388 src/sage/algebras/quatalg/quaternion_algebra.py
Expected Behavior
All tests passed!
Actual Behavior
Additional Information
observed in https://github.com/sagemath/sage/actions/runs/11755696820/job/32751042118?pr=38941
Environment
Checklist
The text was updated successfully, but these errors were encountered: