Skip to content

Instantly share code, notes, and snippets.

@junaidpv
Created December 7, 2010 12:16
Show Gist options
  • Save junaidpv/731734 to your computer and use it in GitHub Desktop.
Save junaidpv/731734 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import math
maximum_num = 65536 # Unicode basic multilingual plate
base = 2 # Base of number system
width = (int) (math.ceil(math.log(maximum_num, base)))
print "Maximum width is: ", width
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment