<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>Constant</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_constructing_spmaps_spbetween_spmodules.html">next</a> | <a href="_connection__Count.html">previous</a> | <a href="_constructing_spmaps_spbetween_spmodules.html">forward</a> | <a href="_connection__Count.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>Constant</h1> <div class="single"><h2>Description</h2> <div><p>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.</p> <table class="examples"><tr><td><pre>i1 : pi o1 = pi o1 : Constant</pre> </td></tr> <tr><td><pre>i2 : +pi o2 = 3.14159265358979 o2 : RR (of precision 53)</pre> </td></tr> <tr><td><pre>i3 : numeric_100 pi o3 = 3.14159265358979323846264338328 o3 : RR (of precision 100)</pre> </td></tr> <tr><td><pre>i4 : 2. * pi o4 = 6.28318530717959 o4 : RR (of precision 53)</pre> </td></tr> <tr><td><pre>i5 : 2p100 * pi o5 = 6.28318530717958647692528676656 o5 : RR (of precision 100)</pre> </td></tr> <tr><td><pre>i6 : exp(2*pi*ii/17) o6 = .932472229404356+.361241666187153*ii o6 : CC (of precision 53)</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_numeric.html" title="convert to floating point">numeric</a> -- convert to floating point</span></li> <li><span><a href="_default__Precision.html" title="default precision of numbers">defaultPrecision</a> -- default precision of numbers</span></li> </ul> </div> <div class="waystouse"><h2>Methods that use an object of class Constant :</h2> <ul><li><span>Constant !, see <span><a href="_!.html" title="factorial">!</a> -- factorial</span></span></li> <li><span>Constant * Constant, see <span><a href="__st.html" title="a binary operator, usually used for multiplication">*</a> -- a binary operator, usually used for multiplication</span></span></li> <li><span>Constant * InexactNumber, see <span><a href="__st.html" title="a binary operator, usually used for multiplication">*</a> -- a binary operator, usually used for multiplication</span></span></li> <li><span>Constant * Number, see <span><a href="__st.html" title="a binary operator, usually used for multiplication">*</a> -- a binary operator, usually used for multiplication</span></span></li> <li><span>InexactNumber * Constant, see <span><a href="__st.html" title="a binary operator, usually used for multiplication">*</a> -- a binary operator, usually used for multiplication</span></span></li> <li><span>Number * Constant, see <span><a href="__st.html" title="a binary operator, usually used for multiplication">*</a> -- a binary operator, usually used for multiplication</span></span></li> <li><span>+ Constant, see <span><a href="__pl.html" title="a unary or binary operator, usually used for addition">+</a> -- a unary or binary operator, usually used for addition</span></span></li> <li><span>Constant + Constant, see <span><a href="__pl.html" title="a unary or binary operator, usually used for addition">+</a> -- a unary or binary operator, usually used for addition</span></span></li> <li><span>Constant + InexactNumber, see <span><a href="__pl.html" title="a unary or binary operator, usually used for addition">+</a> -- a unary or binary operator, usually used for addition</span></span></li> <li><span>Constant + Number, see <span><a href="__pl.html" title="a unary or binary operator, usually used for addition">+</a> -- a unary or binary operator, usually used for addition</span></span></li> <li><span>InexactNumber + Constant, see <span><a href="__pl.html" title="a unary or binary operator, usually used for addition">+</a> -- a unary or binary operator, usually used for addition</span></span></li> <li><span>Number + Constant, see <span><a href="__pl.html" title="a unary or binary operator, usually used for addition">+</a> -- a unary or binary operator, usually used for addition</span></span></li> <li><span>- Constant, see <span><a href="_-.html" title="a unary or binary operator, usually used for negation or subtraction">-</a> -- a unary or binary operator, usually used for negation or subtraction</span></span></li> <li><span>Constant - Constant, see <span><a href="_-.html" title="a unary or binary operator, usually used for negation or subtraction">-</a> -- a unary or binary operator, usually used for negation or subtraction</span></span></li> <li><span>Constant - InexactNumber, see <span><a href="_-.html" title="a unary or binary operator, usually used for negation or subtraction">-</a> -- a unary or binary operator, usually used for negation or subtraction</span></span></li> <li><span>Constant - Number, see <span><a href="_-.html" title="a unary or binary operator, usually used for negation or subtraction">-</a> -- a unary or binary operator, usually used for negation or subtraction</span></span></li> <li><span>InexactNumber - Constant, see <span><a href="_-.html" title="a unary or binary operator, usually used for negation or subtraction">-</a> -- a unary or binary operator, usually used for negation or subtraction</span></span></li> <li><span>Number - Constant, see <span><a href="_-.html" title="a unary or binary operator, usually used for negation or subtraction">-</a> -- a unary or binary operator, usually used for negation or subtraction</span></span></li> <li>Constant * RingElement</li> <li>Constant + RingElement</li> <li>Constant - RingElement</li> <li>Constant / Constant</li> <li>Constant / InexactNumber</li> <li>Constant / Number</li> <li>Constant / RingElement</li> <li>Constant == Constant</li> <li>Constant == InexactNumber</li> <li>Constant ^ Constant</li> <li>Constant ^ InexactNumber</li> <li>Constant ^ Number</li> <li>InexactNumber / Constant</li> <li>InexactNumber == Constant</li> <li>InexactNumber ^ Constant</li> <li>Number / Constant</li> <li>Number ^ Constant</li> <li>RingElement * Constant</li> <li>RingElement + Constant</li> <li>RingElement - Constant</li> <li>RingElement / Constant</li> <li><span>Constant ^ Ring, see <span><a href="_lift.html" title="lift to another ring">lift</a> -- lift to another ring</span></span></li> <li><span>Constant ^ RingFamily, see <span><a href="_lift.html" title="lift to another ring">lift</a> -- lift to another ring</span></span></li> <li><span>numeric(Constant), see <span><a href="_numeric.html" title="convert to floating point">numeric</a> -- convert to floating point</span></span></li> <li><span>numeric(ZZ,Constant), see <span><a href="_numeric.html" title="convert to floating point">numeric</a> -- convert to floating point</span></span></li> </ul> <h2>Fixed objects of class Constant :</h2> <ul><li><span><a href="___Euler__Constant.html" title="the Euler-Mascheroni constant">EulerConstant</a> -- the Euler-Mascheroni constant</span></li> <li><span><a href="_ii.html" title="the square root of -1">ii</a> -- the square root of -1</span></li> <li><span><a href="_pi.html" title="">pi</a></span></li> </ul> </div> <div class="waystouse"><h2>For the programmer</h2> <p>The object <a href="___Constant.html" title="">Constant</a> is <span>a <a href="___Type.html">type</a></span>, with ancestor classes <a href="___Basic__List.html" title="the class of all basic lists">BasicList</a> < <a href="___Thing.html" title="the class of all things">Thing</a>.</p> </div> </div> </body> </html>