Number Rounder

Rounds numeric values to the specified decimal place or significant figures, applying a rounding method to selected columns containing numeric values. The rounded values can be appended as additional columns, or replace the values in the original column. You can choose one of the following rounding methods:

  • .5 to even digit (HALF_EVEN)
  • .5 away from zero (HALF_UP)
  • .5 towards zero (HALF_DOWN)
  • Away from zero (UP)
  • Towards zero (DOWN)
  • To larger (CEILING)
  • To smaller (FLOOR)
For the detailed description of each rounding method please see the settings description in the node dialog or the Java documentation.

Options

Columns to round
Select the numeric input columns to round.
Rounding mode
Select the rounding mode to apply.
  • Decimals: Rounds numeric values up to the specified number of decimal places.
  • Significant digits: Only keeps the specified number of significant digits.
  • Integer: Converts numeric values to integer. Note that automatically converting Number (double) or Number (long) input columns to Number (integer) output columns might yield missing values due to integer overflows.
Rounding to digits
When rounding to Decimals, this sets the number of decimal places to keep.
When rounding to Significant digits, this sets the number of significant digits to keep.
Rounding method
Select if you want to use the standard rounding method or one of the other available rounding methods.
  • Standard (.5 away from zero): This is the standard rounding method. It rounds towards the 'nearest neighbor'. If both neighbors are equidistant, it rounds up.
  • Others: Provides a number of advanced rounding methods to choose from.
Other rounding methods
Select the advanced rounding method to apply.
  • Away from zero (Round Up): Rounds away from zero. Increments the last remaining digit by one, if there were more digits.
  • Towards zero (Round Down): Rounds towards zero. Drops excess digits.
  • To larger (Round Ceiling): Rounds towards positive infinity. If the result is positive, behaves as for 'Away from zero (Round Up)'; if negative, behaves as for 'Towards zero (Round Down)'.
  • To smaller (Round Floor): Rounds towards negative infinity. If the result is positive, behaves as for 'Towards zero (Round Down)'; if negative, behaves as for 'Away from zero (Round Up)'.
  • .5 towards zero: Rounds towards the 'nearest neighbor'. If both neighbors are equidistant, it rounds down.
  • .5 to nearest even digit: Rounds towards the 'nearest neighbor'. If both neighbors are equidistant, it rounds towards the 'even neighbor’.
Output columns
Configure output column behavior.
  • Replace: Replaces the input columns
  • Append with suffix: Appends additional output columns
Output column suffix
Set the suffix to append to the new column names.
Output mode (legacy)
Determines the formatting of the output columns.
  • Auto: Sets output column types automatically based on input column types.
  • Double: Sets all output column types to real numbers.
  • Standard string: Returns the string representation of a number using scientific notation if an exponent is needed.
  • Plain string: Returns a string representation of a number without an exponent field.
  • Engineering string: Returns a string representation of a number, using engineering notation if an exponent is needed.

Input Ports

Icon
The input table containing numeric values to round.

Output Ports

Icon
The output table containing the rounded values.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.