Feature request: display numbers with a given number of significant digits

Issue #691 new
Former user created an issue

To display (decimal) numbers, you currently have the choice between General, Fixed, Engineering and Scientific. It would be great if it were also possible to display numbers with a given number of significant digits, excluding possible trailing zeros after the decimal separator. Scientific notation should be displayed only if it is shorter.

Examples with 4 significant digits (the "→" means "displayed as"):

pi  3.142
12.000  12
12.300  12.3
12.340  12.34
12.345  12.35
12.3456789  12.35
0.12345  0.1235
0.012345  0.01235
0.0012345  1.235e-3 (because it is shorter than 0.0012345)
12345  12350
1234567  1235000
12345678  1.235e7 (because it is shorter than 12350000)