Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Document the shortcut CBF for ComplexBallField()
Browse files Browse the repository at this point in the history
  • Loading branch information
mezzarobba committed Jan 24, 2016
1 parent 235696d commit 3873da1
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/sage/rings/complex_arb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ conveniently by splitting into ball operations on the real and imaginary parts.
It also allows tracking when complex numbers have an exact (for example exactly
zero) real part and an inexact imaginary part, or vice versa.
The parents of complex balls are instances of :class:`ComplexBallField`.
The name ``CBF`` is bound to the complex ball field with the default precision
of 53 bits::
sage: CBF is ComplexBallField() is ComplexBallField(53)
True
Comparison
==========
Expand Down Expand Up @@ -199,7 +206,6 @@ class ComplexBallField(UniqueRepresentation, Field):
EXAMPLES::
sage: CBF = ComplexBallField() # indirect doctest
sage: CBF(1)
1.000000000000000
Expand Down Expand Up @@ -238,7 +244,6 @@ class ComplexBallField(UniqueRepresentation, Field):
EXAMPLES::
sage: CBF = ComplexBallField()
sage: CBF(1)
1.000000000000000
Expand Down Expand Up @@ -941,7 +946,6 @@ cdef class ComplexBall(RingElement):
EXAMPLES::
sage: CBF = ComplexBallField()
sage: a = CBF(1/3, 1/5)
sage: a.real()
[0.3333333333333333 +/- 7.04e-17]
Expand All @@ -960,7 +964,6 @@ cdef class ComplexBall(RingElement):
EXAMPLES::
sage: CBF = ComplexBallField()
sage: a = CBF(1/3, 1/5)
sage: a.imag()
[0.2000000000000000 +/- 4.45e-17]
Expand Down Expand Up @@ -1285,7 +1288,6 @@ cdef class ComplexBall(RingElement):
EXAMPLES::
sage: CBF = ComplexBallField()
sage: CBF(0).is_zero()
True
sage: CBF(RIF(-0.5, 0.5)).is_zero()
Expand All @@ -1311,7 +1313,6 @@ cdef class ComplexBall(RingElement):
EXAMPLES::
sage: CBF = ComplexBallField()
sage: CBF(pi, 1/3).is_nonzero()
True
sage: CBF(RIF(-0.5, 0.5), 1/3).is_nonzero()
Expand Down Expand Up @@ -1357,7 +1358,6 @@ cdef class ComplexBall(RingElement):
EXAMPLES::
sage: CBF = ComplexBallField()
sage: CBF(1).is_exact()
True
sage: CBF(1/3, 1/3).is_exact()
Expand Down Expand Up @@ -1388,7 +1388,6 @@ cdef class ComplexBall(RingElement):
EXAMPLES::
sage: CBF = ComplexBallField()
sage: a = CBF(1)
sage: b = CBF(1)
sage: a is b
Expand Down

0 comments on commit 3873da1

Please sign in to comment.