Hi
I use AA(2*cos(pi/n)) for the default embedding in the corresponding
(totally real) NumberField (of which I later take a relative (real)
quadratic extension for which I also try to find the "correct"
embedding). -> Ticket #16936, #16976.
I choose "AA" as my "default embedding field" because
You are doing the right thing, but AA (and QQbar) are very slow at
testing equality -- and hence also at division since the denominator
must be tested for equality with 0.
In this case since el1.minpoly() and el2.minpoly() are the same, and
the roots in RR are very different:
sage: el1.minpoly()
Hi
How can I do exact comparison of numbers in AA?
I noticed that this doesn't work very reliably:
el1 = AA((x^4 - 2238072*x^2 + 44133904).roots()[1][0])
el2 = (791264*AA(2*cos(pi/8))^2 - 463492).sqrt()
el1 == el2
^- This fails for me (resp. never stops)
[el1-el2 gives "0.?e-15"]
Best
Jon