11.07.2015 Views

Fixed and Arbitrary Precision Numerical Fields - Sage

Fixed and Arbitrary Precision Numerical Fields - Sage

Fixed and Arbitrary Precision Numerical Fields - Sage

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Sage</strong> Reference Manual: <strong>Fixed</strong> <strong>and</strong> <strong>Arbitrary</strong> <strong>Precision</strong> <strong>Numerical</strong> <strong>Fields</strong>, Release 6.2sage: (2*a).agm(2*b) / 21.96811775182478sage: (3*a).agm(3*b) / 31.96811775182478It is also related to the elliptic integral∫ π/20dθ√1 − m sin 2 θ .sage: m = (a-b)^2/(a+b)^2sage: E = numerical_integral(1/sqrt(1-m*sin(x)^2), 0, RR.pi()/2)[0]sage: RR.pi()/4 * (a+b)/E1.96811775182478TESTS:sage: 1.5.agm(0)0.000000000000000algdep(n)Return a polynomial of degree at most n which is approximately satisfied by this number.Note: The resulting polynomial need not be irreducible, <strong>and</strong> indeed usually won’t be if this number is agood approximation to an algebraic number of degree less than n.ALGORITHM:Uses the PARI C-library algdep comm<strong>and</strong>.EXAMPLE:sage: r = sqrt(2.0); r1.41421356237310sage: r.algebraic_dependency(5)x^2 - 2algebraic_dependency(n)Return a polynomial of degree at most n which is approximately satisfied by this number.Note: The resulting polynomial need not be irreducible, <strong>and</strong> indeed usually won’t be if this number is agood approximation to an algebraic number of degree less than n.ALGORITHM:Uses the PARI C-library algdep comm<strong>and</strong>.EXAMPLE:sage: r = sqrt(2.0); r1.41421356237310sage: r.algebraic_dependency(5)x^2 - 2arccos()Return the inverse cosine of self.EXAMPLES:34 Chapter 2. <strong>Arbitrary</strong> <strong>Precision</strong> Real Numbers

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!