This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

# LabVIEW Standard for Rounding Numbers

Updated Nov 14, 2017

• LabVIEW Full
• LabVIEW Base

## Issue Details

What is the standard for rounding numbers in LabVIEW?

## Solution

When a floating-point number is converted to an integer, it is rounded to the nearest integer. The only exception to this are numbers exactly halfway between two integers, such as 2.5, 3.5, etc. In this case, the number is rounded to the nearest even integer. For example, 2.5 would be rounded to 2, and 3.5 would be rounded to 4. This is consistent with the IEEE Standard 754.

This way of thinking only applies to random numbers. If the number set is more likely to have odd or even numbers, then a different convention must be used to reduce rounding errors. If this is the case, manually round the numbers before the Round to Nearest function or coercion dot. This can be accomplished by using the `Round to + Infinity` function to have .5 rounded up, or use the `Round to - Infinity` function to have .5 rounded down.