SimcenterKnowledge

Expressions > Inputs to expressions > Mathematical functions in expressions

Rounding function

The rounding function rounds the argument to the closest integer.

The format for the rounding function is ROUND(v), where v is a dimensional or dimensionless argument. If the argument is dimensionless, the software rounds the argument to the closest integer and assigns the units for the expression to the rounded result.

For example, if the formula for an expression is ROUND(5.9) and the unit of length for the expression is millimeters, the software returns 6 mm. If the unit of length for the expression is meters, the software returns 6 m. Thus, the result depends on the units for the expression.

If the argument is dimensional, the software converts the argument to the units of the expression and then rounds the converted value of the argument to the closest integer.

For example, if the formula for an expression is ROUND(5.0096[m]) and the unit of length for the expression is millimeters, the software returns 5010 mm. If the unit of length for the expression is meters, the software returns 5 m. Thus, the result depends on the units for the expression.

An alternate form of the rounding function produces results that are independent of the units for the expression. The format for this function is ROUND(v1,BASE,v2), where v1 and v2 have the same dimensionality, or are both dimensionless.

When you specify ROUND(v1,BASE,v2), the software does the following:

  1. Converts v1 and v2 to base units.

  2. Computes the ratio of v1'/v2', where v1' and v2' are the values of v1 and v2 converted to base units.

  3. Rounds the computed ratio to the next closest integer.

  4. Multiplies the integer by v2.

For example, if the formula for an expression is ROUND(5.009[m],BASE,20[mm]) and the unit of length for the expression is millimeters, the software returns 5000 mm. If the unit of length for the expression is meters, the software returns 5 m. Because 5000 mm and 5 m are physically equivalent, the result is independent of the units for the expression.

Note:

If the value to be rounded is within the tolerance that the software interprets the value to be exactly equidistant from the nearest integers, the software rounds the argument to the even integer. For example, 1.5 rounds to 2 and 4.5 rounds to 4.

Rounding function, Simcenter 3D 2021.1 Series

© 2020 Siemens

window.mainLanguage="en_US"

window.delivId=""

window.projectId=""

MathJax.Hub.Config({ TeX: { extensions: ["autoload-all.js"] }, tex2jax: { displayMath: [ ] }, "SVG": { scale: 125 } });

Source: https://docs.sw.siemens.com/en-US/doc/289054037/PL20200601120302950.advanced/xid1677797 · retrieved 2026-07-17