New pages

Jump to navigation Jump to search
New pages
Hide registered users | Hide bots | Show redirects

20 July 2023

  • 11:1611:16, 20 July 2023 Powers of two (hist | edit) [1,257 bytes] Schwitters (talk | contribs) (Created page with " """Find the nearest power of 2 below and above an input number, along with the diffs. """ import argparse import math import sys def nearest_powers_of_two(num, output=True): """Find the powers of 2 nearest the input num, along with the diffs. If optional parameter output == True (the default), print the values as well as returning them. Return value is a list of tuples [(low, lowdiff), (high, highdiff)]. """ lg = math.floor(math...") Tag: Visual edit: Switched

19 July 2023

16 July 2023

11 July 2023

10 July 2023