<doc>
  <legacy_id>2418</legacy_id>
  <name>round</name>
  <type>function</type>
  <syntax>
    <example>the round of <i>number</i></example>
    <example>round(<i>number,precision</i>)</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Math, Logic, &amp; Dates</category>
  </classification>
  <references>
    <function tag="abs">abs Function</function>
    <function tag="compound">compound Function</function>
    <function tag="average">average Function</function>
    <function tag="random">random Function</function>
    <function tag="extents">extents Function</function>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Rounds off a number to the nearest <keyword tag="integer">integer</keyword>.</summary>
  <examples>
    <example>the round of 26.2 <code><i>-- yields 26</i></code></example>
    <example>the round of 2.5 <code><i>-- yields 3 (rounds up)</i></code></example>
    <example>round(845.6604,2) <code><i>-- yields 845.66</i></code></example>
    <example>round(9734.22,-3) <code><i>-- yields 10000</i></code></example>
  </examples>
  <description>
    <p>Use the <b>round</b> <control_st tag="function">function</control_st> to round off numbers and eliminate insignificant digits for financial applications.</p><p/><p><b>Parameters:</b></p><p>The <i>number</i> is any <function tag="number">number</function> or <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a number.</p><p/><p>The <i>precision</i> is an <keyword tag="integer">integer</keyword> giving the decimal place to round off to.</p><p/><p><b>Value:</b></p><p>The <b>round</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a number.</p><p/><p><b>Comments:</b></p><p>The <b>round</b> <control_st tag="function">function</control_st> performs financial-style rounding. If the <i>number</i> is exactly halfway between two numbers, <b>round</b> always rounds the <i>number</i> up if positive, down if <glossary tag="negative">negative</glossary>. (To round off numbers without introducing any statistical upward bias, use the <function tag="statRound">statRound</function> <control_st tag="function">function</control_st> instead.)</p><p/><p>A positive <i>precision</i> indicates a place to the right of the <glossary tag="decimal point">decimal point</glossary>, and a <glossary tag="negative">negative</glossary> <i>precision</i> indicates a place to the left. For example,<code> 1 </code>rounds off to the nearest tenth,<code> 2 </code>rounds off to the nearest hundredth,<code> -1 </code>rounds off by ten, and so on. If you don't specify a <i>precision</i>, zero is used, meaning that the <i>number</i> is rounded off to a whole number.</p><p/><p><code/><b>Note:</b><code/> The <function tag="statRound">statRound</function> <control_st tag="function">function</control_st> is equivalent to <glossary tag="HyperCard">HyperTalk's</glossary> "round" <control_st tag="function">function</control_st>.</p>
  </description>
</doc>