Last active
December 16, 2015 22:19
-
-
Save jml/5505671 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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