print("%.1e" % 9.99) # round up with positive exponent print("%.1e" % 0.999) # round up with negative exponent ...
CircuitPython - a Python implementation for teaching coding with microcontrollers - circuitpython/tests/float/string_format_fp30.py at main · FrameworkComputer ...