# BankRound Function

• Updated

Returns the number rounded to the number of decimal places using the rules of bankers rounding.

Syntax

 Returns the number rounded to the number of decimal places using the rules of bankers rounding. BankRound(number, digits)

 Arguments:

 number Numeric - The number to round. digits Integer - The number of decimal digits to round the number to.

Remarks

• With bankers rounding, note that .5 (.05, .005, etc) can round up sometimes and down sometimes. When the number to round is exactly halfway between two rounded values, the result is the rounded value that has an even digit in the far right decimal position. So both 1.5 and 2.5 round to 2, and 3.5 and 4.5 both round to 4. This process is also known as rounding toward even, or Gaussian rounding.
• Example: BankRound(2.55, 1) returns 2.6.
• Example: BankRound(2.45, 1) returns 2.4.

0 out of 0 found this helpful

<% if (previousArticle || nextArticle) { %>
<% if (previousArticle) { %>
<% if (previousTitle) { %>

#### <%= previousTitle %>

<% } %> <%= previousArticle.title %>
<% } %> <% if (nextArticle) { %>
<% if (nextTitle) { %>

#### <%= nextTitle %>

<% } %> <%= nextArticle.title %>
<% } %>
<% } %>
<% if (allItems.length > 1) { %>