Skip to content

Instantly share code, notes, and snippets.

@jml
Last active December 16, 2015 22:19
Show Gist options
  • Save jml/5505671 to your computer and use it in GitHub Desktop.
Save jml/5505671 to your computer and use it in GitHub Desktop.
def numeric_to_float(numeric):
if numeric.negative_p():
mulitiplier = -1.0
else:
mulitiplier = 1.0
return mulitiplier * numeric.num() / numeric.denom()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment