Macaulay2 » Documentation
Packages » Macaulay2Doc :: CC'
next | previous | forward | backward | up | index | toc

CC' -- the parent class of all rings of complex numbers

Description

Floating point complex numbers are treated in a special way. Recall first to create a polynomial, one must first create a polynomial ring to contain it. And then, the polynomial ring is the class of the polynomial.

i1 : R = QQ[x,y,z]

o1 = R

o1 : PolynomialRing
i2 : x^2

      2
o2 = x

o2 : R
i3 : class x^2

o3 = R

o3 : PolynomialRing

Floating point complex numbers, however, can be created directly, as follows, without creating a ring.

i4 : r = 4.5 * ii

o4 = 4.5*ii

o4 : CC (of precision 53)
i5 : s = 4.3p300 * ii

o5 = 4.3*ii

o5 : CC (of precision 300)

The floating point numbers created above have different precisions, and thus are regarded as being elements of different rings, whose elements all have the same precision.

i6 : precision r

o6 = 53
i7 : precision s

o7 = 300
i8 : ring r

o8 = CC
       53

o8 : ComplexField
i9 : ring s

o9 = CC
       300

o9 : ComplexField

In order to make it convenient to define methods that apply to all such rings, those rings have a common parent, namely CC'. Notice that CC' is printed in a special way.

i10 : CC'

o10 = CC
        *

o10 : Type
i11 : parent ring r     

o11 = CC
        *

o11 : Type
i12 : parent ring s

o12 = CC
        *

o12 : Type
i13 : parent ring s === CC'

o13 = true

Methods that use an object of class CC_* :

For the programmer

The object CC' is a type, with ancestor classes InexactNumber' < Nothing < Thing.