Skip to content
Snippets Groups Projects
Select Git revision
  • 64dc925c4afad63bc5c8a6017d969abbab1d2ac5
  • wip-bootstrap default
  • dualcore
  • ch3/leds
  • ch3/time
  • master
6 results

string_format_modulo3.py

Blame
  • string_format_modulo3.py 212 B
    # uPy and CPython outputs differ for the following
    print("%.1g" % -9.9) # round up 'g' with '-' sign
    print("%.1e" % 9.99) # round up with positive exponent
    print("%.1e" % 0.999) # round up with negative exponent