How do I force this back to 1230 using .format()? I know I can do it with logs/mods, etc, but I was hoping there's a way to do it with this library. I basically want it to always print significant figures, like toPrecision but without switching to exponents if the significant figures are fewer than or equal to the log10 of the value.
Consider this:
How do I force this back to
1230
using.format()
? I know I can do it with logs/mods, etc, but I was hoping there's a way to do it with this library. I basically want it to always print significant figures, liketoPrecision
but without switching to exponents if the significant figures are fewer than or equal to the log10 of the value.