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
abs for number field element #21105
Comments
This comment has been minimized.
This comment has been minimized.
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Author: Matthias Koeppe |
comment:5
It is weird to have |
comment:6
OK, I'll change |
comment:7
By the way, should perhaps the print representation of a number field indicate whether it's embedded or not? |
comment:8
That's indeed an issue. But it is hard to solve since you are interested at the same time in both the algebraic expression and the embedded value. More generally, instead of having if/else in many methods I think that a better solution would be to have a dedicated class for real embedded element (whose semantic would be to follow standard method of real numbers, possibly having methods like |
comment:9
Replying to @videlec:
True, but I meant the print representation of the field itself (the parent), not an element. |
comment:10
Replying to @mkoeppe:
+1. Put me in cc if you open a ticket. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Replying to @videlec:
See #21161. |
comment:13
Replying to @mkoeppe:
Done. |
comment:14
This is missing indentation
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: Vincent Delecroix |
comment:17
After
you should also test the output with arguments (both |
comment:19
Replying to @videlec:
Done. |
comment:20
If |
comment:21
Yes, I guess that would make sense; but I agree it's too much for this ticket. By the way, why does it use complex fields instead of real fields for the result? |
comment:22
It does not: the method uses complex field for the embedding. But the result of
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:24
Replying to @videlec:
Ah, thanks. I've reworded the docstring to clarify. |
comment:25
I don't understand this sentence from the doc of
The "complex double field" refers to I guess "CDF" but which is actually not used! I would rather remove that sentence and explain that the default precision is |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:27
Replying to @videlec:
Thanks for catching this. |
comment:28
Thanks for the fix! |
Changed branch from u/mkoeppe/abs_for_number_field_element to |
For a number field element
a
,abs(a)
currently returns a floating point real numberIf a coercion embedding is defined with value in
RR
, the absolute value can be defined internally as it is the case forAA
and also for quadratic extensions
We propose to change the behavior for embedded number fields. Namely make
abs
an internal operation.As a (minor) consequence of the current behavior, the inequalities from
sage.geometry.polyhedron.representation.Inequality
gets badly displayedCC: @mkoeppe
Component: number fields
Author: Matthias Koeppe
Branch/Commit:
15d160e
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/21105
The text was updated successfully, but these errors were encountered: