<?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>numeric -- convert to floating point</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_numgens.html">next</a> | <a href="_numerator.html">previous</a> | <a href="_numgens.html">forward</a> | <a href="_numerator.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>numeric -- convert to floating point</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>numeric x</tt><br/><tt>numeric(prec,x)</tt><br/><tt>numeric_prec x</tt></div> </dd></dl> </div> </li> <li><div class="single">Inputs:<ul><li><span><tt>x</tt></span></li> <li><span><tt>prec</tt>, <span>an <a href="___Z__Z.html">integer</a></span>, the number of bits of precision to use in the computation</span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span>the expression obtained from <tt>x</tt> by converting the integers, rational numbers, and symbolic constants within it to double floating point numbers.</span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><table class="examples"><tr><td><pre>i1 : x = {1,2/3,pi} 2 o1 = {1, -, pi} 3 o1 : List</pre> </td></tr> <tr><td><pre>i2 : numeric oo o2 = {1, .666667, 3.14159} o2 : List</pre> </td></tr> <tr><td><pre>i3 : numeric_200 pi o3 = 3.14159265358979323846264338327950288419716939937510582097494 o3 : RR (of precision 200)</pre> </td></tr> <tr><td><pre>i4 : numeric_100 oo o4 = 3.14159265358979323846264338328 o4 : RR (of precision 100)</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="___R__R.html" title="the class of all real numbers">RR</a> -- the class of all real numbers</span></li> <li><span><a href="___C__C.html" title="the class of all complex numbers">CC</a> -- the class of all complex numbers</span></li> <li><span><a href="___Constant.html" title="">Constant</a></span></li> </ul> </div> <div class="waystouse"><h2>Ways to use <tt>numeric</tt> :</h2> <ul><li>numeric(CC)</li> <li>numeric(Constant)</li> <li>numeric(InfiniteNumber)</li> <li>numeric(Matrix)</li> <li>numeric(Number)</li> <li>numeric(RR)</li> <li>numeric(VisibleList)</li> <li>numeric(ZZ,CC)</li> <li>numeric(ZZ,Constant)</li> <li>numeric(ZZ,InfiniteNumber)</li> <li>numeric(ZZ,Matrix)</li> <li>numeric(ZZ,Number)</li> <li>numeric(ZZ,VisibleList)</li> </ul> </div> </div> </body> </html>