Skip to content

Instantly share code, notes, and snippets.

@MateoV
Created January 13, 2014 04:06
Show Gist options
  • Save MateoV/8394532 to your computer and use it in GitHub Desktop.
Save MateoV/8394532 to your computer and use it in GitHub Desktop.
from decimal import Decimal, getcontext
getcontext().prec = 16
foo = str(Decimal(1)/Decimal(7))
print foo
bar = str(float(1)/float(7))
print bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment