Significant-figure rounding
Round a number to a chosen count of significant digits.
How this works
Uses significant-digit rounding and preserves meaningful trailing zeros in the displayed result.
Example
Using the example inputs, rounded value is 1.23e+4.
- Number
- 12345.678
- Significant digits
- 3
- Rounded value
- 1.23e+4
Scope and assumptions
Binary floating point can affect exact halfway rounding. Scientific notation may be used.