# C1.CalcEngine.ExpressionEngine.MathFunctions.Round

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_CalcEngine_ExpressionEngine_MathFunctions_Round_" data-uid="C1.CalcEngine.ExpressionEngine.MathFunctions.Round*">Round Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_CalcEngine_ExpressionEngine_MathFunctions_Round_" data-uid="C1.CalcEngine.ExpressionEngine.MathFunctions.Round*"></a>
<h4 id="C1_CalcEngine_ExpressionEngine_MathFunctions_Round_System_Collections_Generic_List_C1_CalcEngine_ExpressionEngine_IExpression__" data-uid="C1.CalcEngine.ExpressionEngine.MathFunctions.Round(System.Collections.Generic.List{C1.CalcEngine.ExpressionEngine.IExpression})">Round(List&lt;IExpression&gt;)</h4>
<div class="markdown level1 summary"><p>Rounds a numeric value to the specified number of decimal places using
an optional rounding mode.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static object Round(List&lt;IExpression&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Round(source As List(Of IExpression)) As Object</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="C1.CalcEngine.ExpressionEngine.IExpression.html">IExpression</a>&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>An array of arguments:</p>
<ul><li>
            <code>[0]</code> – The numeric value to round.
        </li><li>
            <code>[1]</code> – The number of decimal places.
        </li><li>
            <code>[2]</code> (optional) – The rounding mode. If omitted or unknown, the default mode is used.
        </li></ul>
<p><b>Nearest modes</b> (round to the nearest value; differ only on exact ties):</p>
<ul><li>
            <code>"banker"</code>, <code>"toeven"</code>, <code>"halfeven"</code> (default) –
            Rounds ties to the nearest even value (HALF_EVEN).
        </li><li>
            <code>"halfup"</code>, <code>"awayfromzero"</code> –
            Rounds ties away from zero (HALF_UP).
        </li><li>
            <code>"halfdown"</code> –
            Rounds ties toward zero (HALF_DOWN).
        </li></ul>
<p><b>Directed modes</b> (always round in a fixed direction):</p>
<ul><li>
            <code>"up"</code> – Rounds away from zero for all values (UP).
            <i>Note: this is not the same as <code>"halfup"</code>.</i>
        </li><li>
            <code>"down"</code>, <code>"truncate"</code>, <code>"tozero"</code> –
            Rounds toward zero (DOWN).
        </li><li>
            <code>"ceiling"</code>, <code>"ceil"</code> –
            Rounds toward positive infinity (CEILING).
        </li><li>
            <code>"floor"</code> –
            Rounds toward negative infinity (FLOOR).
        </li></ul>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
