Round numbers

This processor rounds decimals in one or several columns. It can perform round, floor or ceil.

Significant digits control the precision of the number (e.g. 1234.5 with 2 significant digits is 1200), with 0 meaning unbounded (keep all significant digits).

Decimal places is how many number after the decimal point: 1.234 with 1 decimal place is 1.2. 0 means round to integer, -2 means round to hundreds.

Examples

Input Significant digits Decimal places Output
0.11 0 0 0
0.11 0 1 0.1
0.11 0 3 0.110
0.11 1 3 0.100
1.1 1 1 1.0
1.1 2 1 1.1
1.1 2 0 1
11 0 0 11
11 1 0 10
11 1 1 10.0
110 1 0 100
150 1 0 200
110 0 -2 200
3456 1 0 3000
3456 0 -2 3500