#19288: Make real/complex number field embeddings more accurate
-------------------------------------+-------------------------------------
Reporter: pbruin | Owner:
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-6.9
Component: number fields | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/make_real_complex_number_field_embeddings_more_accurate|
ceac4303d2c1c3a6feaf4a7508e25d79d2dc578c
Dependencies: #19330 | Stopgaps:
-------------------------------------+-------------------------------------
Description changed by jdemeyer:
Old description:
> We should detect and work around this catastrophic cancellation:
> {{{
> sage: K.<a> = NumberField(x^2-x-104)
> sage: D = -4754362903238080086532729679384769785488*a -
> 46166237460580684378417136025570042177152
> sage: [v(D) for v in K.embeddings(RR)]
> [0.000000000000000, -9.70868378243995e40]
> }}}
New description:
We should detect and work around this catastrophic cancellation:
{{{
sage: K.<a> = NumberField(x^2-x-104)
sage: D = -4754362903238080086532729679384769785488*a -
46166237460580684378417136025570042177152
sage: [v(D) for v in K.embeddings(RR)]
[0.000000000000000, -9.70868378243995e40]
}}}
This is fixed by adding a new class `NumberFieldComplexEmbedding` (and
also `NumberFieldRealEmbedding`) which automatically increases the
precision when computing the image.
Note: I also do some minor clean-up in this branch, like removing
redundant methods (defined more than once in the same class) and cleaning
up some imports.
Note 2: When most of this patch was already written, I discovered there is
a `NumberFieldEmbedding` in
`src/sage/rings/number_field/number_field_morphisms.pyx` which seems to
have the same purpose as my new class. I propose to deal with this
redundancy later.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/19288#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.