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

Constant

Description

A constant is a symbolic entity that can be approximated by a real or complex number to any desired accuracy. It is converted to a numeric value of the correct precision, when necessary.

i1 : pi

o1 = pi

o1 : Constant
i2 : +pi

o2 = 3.141592653589793

o2 : RR (of precision 53)
i3 : numeric_100 pi

o3 = 3.141592653589793238462643383279

o3 : RR (of precision 100)
i4 : 2. * pi

o4 = 6.283185307179586

o4 : RR (of precision 53)
i5 : 2p100 * pi

o5 = 6.283185307179586476925286766559

o5 : RR (of precision 100)
i6 : exp(2*pi*ii/17)

o6 = .9324722294043558+.3612416661871529*ii

o6 : CC (of precision 53)

See also

Methods that use an object of class Constant:

Protected objects of class Constant:

For the programmer

The object Constant is a type, with ancestor classes Number < Thing.