Format the number with at most the number of decimals given as precision. Remove trailing zeros and possibly the decimal point.
(number, precision)
| 2311 | |
| 2312 | |
| 2313 | def _format_approx(number, precision): |
| 2314 | """ |
| 2315 | Format the number with at most the number of decimals given as precision. |
| 2316 | Remove trailing zeros and possibly the decimal point. |
| 2317 | """ |
| 2318 | return f'{number:.{precision}f}'.rstrip('0').rstrip('.') or '0' |
| 2319 | |
| 2320 | |
| 2321 | def _g_sig_digits(value, delta): |
no outgoing calls
no test coverage detected
searching dependent graphs…