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.26125652559sage: RealField(5)(-pi).exact_rational()-25/8TESTS:sage: RR(’nan’).exact_rational()Traceback (most recent call last):...ValueError: Cannot convert NaN or infinity to rational numbersage: RR(’-infinity’).exact_rational()Traceback (most recent call last):...ValueError: Cannot convert NaN or infinity to rational numberexp()Return e self .EXAMPLES:sage: r = 0.0sage: r.exp()1.00000000000000sage: r = 32.3sage: a = r.exp(); a1.06588847274864e14sage: a.log()32.3000000000000sage: r = -32.3sage: r.exp()9.38184458849869e-15exp10()Return 10 self .EXAMPLES:sage: r = 0.0sage: r.exp10()1.00000000000000sage: r = 32.0sage: r.exp10()1.00000000000000e32sage: r = -32.3sage: r.exp10()5.01187233627276e-33exp2()Return 2 self .EXAMPLES:sage: r = 0.0sage: r.exp2()1.0000000000000040 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!