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: r = RDF(-32.3)sage: r.exp10()5.01187233627e-33exp2()Return 2 self .EXAMPLES:sage: r = RDF(0.0)sage: r.exp2()1.0sage: r = RDF(32.0)sage: r.exp2()4294967296.0sage: r = RDF(-32.3)sage: r.exp2()1.89117248253e-10floor()Return the floor of self.EXAMPLES:sage: RDF(2.99).floor()2sage: RDF(2.00).floor()2sage: RDF(-5/2).floor()-3frac()Return a real number in (−1, 1). It satisfies the relation: x = x.trunc() + x.frac()EXAMPLES:sage: RDF(2.99).frac()0.99sage: RDF(2.50).frac()0.5sage: RDF(-2.79).frac()-0.79gamma()Return the value of the Euler gamma function on self.EXAMPLES:sage: RDF(6).gamma()120.0sage: RDF(1.5).gamma()0.886226925453hypot(other)Computes the value √ s 2 + o 2 where s is self <strong>and</strong> o is other in such a way as to avoid overflow.EXAMPLES:8 Chapter 1. Double <strong>Precision</strong> Real Numbers

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

Saved successfully!

Ooh no, something went wrong!