ROUND THE NUMBER¶
Rounds a floating-point number to a specified precision using a configurable rounding mode (half-up, half-down, half-even, or half-odd). Use this worker whenever a workflow needs deterministic numeric rounding before passing values to downstream comparisons, formatting, or reporting steps.
When to use¶
Classification: process.
Tagged: math, numeric, precision, round, rounding, scalar, transformation.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Number | number | float | 1 | ✓ | The floating-point value to be rounded; defaults to 1 — replace with the upstream scalar you want to round. |
| Round Type | round_type | scalar | 1 | Number of decimal places (precision) to round to; defaults to 1 (one decimal place) — set to 0 for integer rounding or a higher integer for finer precision. | |
| Mode | mode | scalar | round_up | Rounding strategy applied at the half-way point: ‘round_up’ (PHP ROUND_HALF_UP), ‘round_down’ (ROUND_HALF_DOWN), ‘round_even’ (banker’s rounding), or ‘round_odd’; defaults to ‘round_up’. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| math_round_output_1 | math_round_output_1 | scalar | The rounded scalar result, returned with the same numeric type as the input and precision defined by round_type. |
Disciplines¶
- data.curve.transform
Runnable example¶
A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=math_round
Auto-generated from transformation schema. Worker id: math_round. Schema hash: 9563bb4895bc. Hand-curated docs in workerexamples/ override this page when present.