Real numbers in SAGE are represented either as GMP MPF's or using the Python Decimal type.
The module rings.real_number defines the following classes:
Create a number using RealNumber_decimal(value,)
INPUT: value - a float, integer, or string
sage: R = real_number.RealNumber_decimal sage: R(1.32) 1.32 sage: R('2/3') 0.6666666666666666666666666667 sage: x = R(1.234); y = R(-1.1) sage: x < y False sage: x > y True sage: x + y 0.134 sage: x - y 2.334 sage: x * y -1.3574 sage: x / y -1.121818181818181818181818182 sage: x*100 123.400 sage: x**100 1353679866.791074518495392801 sage: 2*x 2.468 sage: x*2.0 2.4680 sage: x.order() Infinity sage: x.prec() Infinity sage: float(x) 1.234 sage: int(y) -1
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).
sage: R = real_number.RealNumber_mpf sage: x = R(1.234); y = R(-1.1) sage: x < y False sage: x > y True sage: x + y 0.133999999999999896971 sage: x - y 2.33400000000000007461 sage: x * y -1.35740000000000009397 sage: x / y -1.12181818181818171468 sage: x*100 123.399999999999998579 sage: x**100 1.35367986679107295756e9 sage: 2*x 2.46799999999999997158 sage: x*2.0 2.46799999999999997158 sage: x.order() Infinity sage: x.prec() 64 sage: float(x) 1.234 sage: int(y) -1