ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 26 Mar 2020 23:01:17 +0100From number field to interval fieldhttps://ask.sagemath.org/question/9217/from-number-field-to-interval-field/Hello,
I would like to understand why the following works
sage: K1.<s1> = NumberField(x^3 - 2, 's1', embedding=RR(1.26))
sage: RIF(s1)
1.259921049894873?
and the following does not
sage: K2.<s2> =NumberField(x^3 - 2, 's2', embedding=CC(-0.63,1.09))
sage: CIF(s2)
Traceback (most recent call last)
...
TypeError: unable to coerce to a ComplexIntervalFieldElement
Thank you,
VincentWed, 08 Aug 2012 07:39:23 +0200https://ask.sagemath.org/question/9217/from-number-field-to-interval-field/Comment by daniels for <p>Hello,</p>
<p>I would like to understand why the following works</p>
<pre><code>sage: K1.<s1> = NumberField(x^3 - 2, 's1', embedding=RR(1.26))
sage: RIF(s1)
1.259921049894873?
</code></pre>
<p>and the following does not</p>
<pre><code>sage: K2.<s2> =NumberField(x^3 - 2, 's2', embedding=CC(-0.63,1.09))
sage: CIF(s2)
Traceback (most recent call last)
...
TypeError: unable to coerce to a ComplexIntervalFieldElement
</code></pre>
<p>Thank you,
Vincent</p>
https://ask.sagemath.org/question/9217/from-number-field-to-interval-field/?comment=19255#post-id-19255Looks like a bug to me. `CIF.coerce_map_from(K2)` shows that a sane conversion *should* happen, but then something goes wrong when actually coercing an element.Wed, 08 Aug 2012 09:08:09 +0200https://ask.sagemath.org/question/9217/from-number-field-to-interval-field/?comment=19255#post-id-19255Comment by vdelecroix for <p>Hello,</p>
<p>I would like to understand why the following works</p>
<pre><code>sage: K1.<s1> = NumberField(x^3 - 2, 's1', embedding=RR(1.26))
sage: RIF(s1)
1.259921049894873?
</code></pre>
<p>and the following does not</p>
<pre><code>sage: K2.<s2> =NumberField(x^3 - 2, 's2', embedding=CC(-0.63,1.09))
sage: CIF(s2)
Traceback (most recent call last)
...
TypeError: unable to coerce to a ComplexIntervalFieldElement
</code></pre>
<p>Thank you,
Vincent</p>
https://ask.sagemath.org/question/9217/from-number-field-to-interval-field/?comment=19254#post-id-19254Ok. Thanks. I sent a message on sage-devel and sage-nt.Wed, 08 Aug 2012 09:25:23 +0200https://ask.sagemath.org/question/9217/from-number-field-to-interval-field/?comment=19254#post-id-19254Answer by Sébastien for <p>Hello,</p>
<p>I would like to understand why the following works</p>
<pre><code>sage: K1.<s1> = NumberField(x^3 - 2, 's1', embedding=RR(1.26))
sage: RIF(s1)
1.259921049894873?
</code></pre>
<p>and the following does not</p>
<pre><code>sage: K2.<s2> =NumberField(x^3 - 2, 's2', embedding=CC(-0.63,1.09))
sage: CIF(s2)
Traceback (most recent call last)
...
TypeError: unable to coerce to a ComplexIntervalFieldElement
</code></pre>
<p>Thank you,
Vincent</p>
https://ask.sagemath.org/question/9217/from-number-field-to-interval-field/?answer=50382#post-id-50382I do not know when it was fixed, but It seems to be fixed now:
sage: K2.<s2> =NumberField(x^3 - 2, 's2', embedding=CC(-0.63,1.09))
sage: CIF(s2)
-0.6299605249474365? + 1.091123635971722?*IThu, 26 Mar 2020 20:36:56 +0100https://ask.sagemath.org/question/9217/from-number-field-to-interval-field/?answer=50382#post-id-50382Comment by nooniensoong97 for <p>I do not know when it was fixed, but It seems to be fixed now:</p>
<pre><code>sage: K2.<s2> =NumberField(x^3 - 2, 's2', embedding=CC(-0.63,1.09))
sage: CIF(s2)
-0.6299605249474365? + 1.091123635971722?*I
</code></pre>
https://ask.sagemath.org/question/9217/from-number-field-to-interval-field/?comment=50385#post-id-50385I have been getting bugs from time to time as well. There are times when Sagemath can't even call out digits of pi for me. I have to close out the program, and browser that does fix the issues most of the time, but not all the time.Thu, 26 Mar 2020 23:01:17 +0100https://ask.sagemath.org/question/9217/from-number-field-to-interval-field/?comment=50385#post-id-50385