ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 06 Jul 2020 14:18:17 -0500exact computations with algebraic numbershttp://ask.sagemath.org/question/52362/exact-computations-with-algebraic-numbers/I'm trying to do exact computations with algebraic numbers. In particular, I know to expect integer answers like `1`, `0`, and `3` at the end of my computations, but I'm getting something slightly off.
I noticed that if I run
sage: r = sqrt(2)
sage: a = AA(r)
sage: b = AA(1/r)
sage: c = a*b
Then I get:
sage: c
1.000000000000000?
Is this being handled in the computer as exactly `1`? Otherwise, how can I do exact computations with algebraic numbers in Sage? I obtain the algebraic numbers I'm working with using `algdep()` to find a polynomial and `.roots(QQbar)` to find the roots of that polynomial.b897069Mon, 06 Jul 2020 14:18:17 -0500http://ask.sagemath.org/question/52362/Extended Sage exampleshttp://ask.sagemath.org/question/45091/extended-sage-examples/I'm trying to learn how to use Sage to do algebraic number theory. I've read the thematic tutorials that seem related, but they are pretty bare-bones. The documentation seems to be pretty much a list of methods; I haven't found a higher-level view of what concepts are implemented and how they can be used. Are there any meatier extended examples that are available? Or is there documentation that I'm missing? (So, for example, how would I go about finding in the documentation the answer to "is the square root of two in the field K that I just defined"?)rogerlThu, 17 Jan 2019 20:33:43 -0600http://ask.sagemath.org/question/45091/