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: RR(’nan’).is_infinity()Falseis_integer()Return True if this number is a integerEXAMPLES:sage: RR(1).is_integer()Truesage: RR(0.1).is_integer()Falseis_negative_infinity()Return True if self is −∞.EXAMPLES:sage: a = RR(’1.494’) / RR(0); a+infinitysage: a.is_negative_infinity()Falsesage: a = -RR(’1.494’) / RR(0); a-infinitysage: RR(1.5).is_negative_infinity()Falsesage: a.is_negative_infinity()Trueis_positive_infinity()Return True if self is +∞.EXAMPLES:sage: a = RR(’1.494’) / RR(0); a+infinitysage: a.is_positive_infinity()Truesage: a = -RR(’1.494’) / RR(0); a-infinitysage: RR(1.5).is_positive_infinity()Falsesage: a.is_positive_infinity()Falseis_real()Return True if self is real (of course, this always returns True for a finite element of a real field).EXAMPLES:sage: RR(1).is_real()Truesage: RR(’-100’).is_real()Trueis_square()Return whether or not this number is a square in this field. For the real numbers, this is True if <strong>and</strong> onlyif self is non-negative.EXAMPLES:44 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!