This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Made this just to test gists lowk | |
| import sympy | |
| from sympy.parsing.sympy_parser import parse_expr, standard_transformations, convert_xor | |
| def round_to_n_sig_figs(value, n=3): | |
| """ | |
| Round a number to n total significant figures (including the first non-zero digit). | |
| Examples: | |
| - 61.51 -> 61.5 (3 total sig figs) |