-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
implement round for number field elements with real embedding #21935
Comments
New commits:
|
Branch: u/vdelecroix/21935 |
Commit: |
comment:2
Hi Vincent, This looks good to me. All test passed on Sage7.5.b3. Up to the reaction of the bot, you can set it to positive review. JP |
Author: Vincent Delecroix |
Reviewer: Jean-Philippe Labbé |
comment:3
patchbot is happy ;-) |
comment:4
On OSX
|
comment:6
I can reproduce the doctest failure. But I can not reproduce the problem on the command line:
|
comment:7
With diff --git a/src/sage/rings/number_field/number_field_element_quadratic.pyx b/src/sage/rings/number_field/number_field_element_quadratic.pyx
index 83f5495..fad31df 100644
--- a/src/sage/rings/number_field/number_field_element_quadratic.pyx
+++ b/src/sage/rings/number_field/number_field_element_quadratic.pyx
@@ -2054,7 +2054,8 @@ cdef class NumberFieldElement_quadratic(NumberFieldElement_absolute):
....: a = QQ.random_element(1000,20)
....: b = QQ.random_element(1000,20)
....: assert round(a) == round(K2(a)), a
- ....: assert round(a) == round(K3(a)), a
+ ....: if not round(a) == round(K3(a)):
+ ....: print "left={}, right={}, a={}".format(round(a), round(K3(a)), a)
....: assert round(a) == round(K5(a)), a
....: assert round(a+b*sqrt(2.)) == round(a+b*sqrt2), (a, b)
....: assert round(a+b*sqrt(3.)) == round(a+b*sqrt3), (a, b) I get:
|
comment:8
Can someone can give me ssh access to an OSX computer? This really needs to be fixed!! |
comment:9
Replying to @videlec:
I was using my desktop at work when I reproduced the error earlier today which runs Ubuntu. Don't you get the same error on your machine? |
comment:10
Indeed, I am able to reproduce it and has nothing to do with the current branch
|
comment:11
Even better ;-)
|
comment:12
|
comment:13
test passes for me when #22095 applied. |
Dependencies: #22095 |
Changed reviewer from Jean-Philippe Labbé to Jean-Philippe Labbé, Sébastien Labbé |
comment:14
I do not have access anymore to my Ubuntu machine to test the problem I had earlier. All tests passed on my OSX. Positive review. |
Changed branch from u/vdelecroix/21935 to |
Real embedded element has a floor and ceil but no round (= nearest integer)
Depends on #22095
CC: @mkoeppe @seblabbe
Component: number fields
Keywords: days79
Author: Vincent Delecroix
Branch/Commit:
720f040
Reviewer: Jean-Philippe Labbé, Sébastien Labbé
Issue created by migration from https://trac.sagemath.org/ticket/21935
The text was updated successfully, but these errors were encountered: