Home | Trees | Index | Help |
|
---|
Package sage :: Package rings :: Module real_number :: Class RealNumber_mpf |
|
object
--+ |Element
--+ |RealNumber
--+ | RealNumber_mpf
A real number with a fixed number of bits of precision. Create a number using RealNumber_mpf(value, bits=0) INPUT: value -- a float, integer, or string prec -- an int, lower bound on the number of bits of precision (always >= 64). EXAMPLES: >>> R = real_number.RealNumber_mpf >>> x = R(1.234); y = R(-1.1) >>> x < y False >>> x > y True >>> x + y 0.133999999999999896971 >>> x - y 2.33400000000000007461 >>> x * y -1.35740000000000009397 >>> x / y -1.12181818181818171468 >>> x*100 123.399999999999998579 >>> x**100 1.35367986679107295756e9 >>> 2*x 2.46799999999999997158 >>> x*2.0 2.46799999999999997158 >>> x.order() Infinity >>> x.prec() 64 >>> float(x) 1.234 >>> int(y) -1
Method Summary | |
---|---|
__init__(self,
value,
prec)
| |
prec(self)
| |
sign(self)
| |
sqrt(self)
| |
Inherited from RealNumber | |
| |
Return self + right. | |
Compare self and other. | |
Return the quotient self / right. | |
Return the coercion of self to a Python float. | |
Return the coercion of self to a Python int. | |
Return the inverse of self. | |
Return the coercion of self to a Python long. | |
Return the product of self and right. | |
Return the negative of self. | |
| |
| |
| |
| |
| |
| |
| |
| |
Try to find a polynomial of degree at most n having this real number x as an approximate root. | |
| |
| |
Return the logarithm of self. | |
| |
| |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Property Summary | |
---|---|
Inherited from RealNumber | |
pari_object : PARI real associated to this real number |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Jun 24 17:58:46 2005 | http://epydoc.sf.net |