Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot handle negative numbers? #11

Open
afzalmushtaque opened this issue Jun 11, 2018 · 0 comments
Open

Cannot handle negative numbers? #11

afzalmushtaque opened this issue Jun 11, 2018 · 0 comments

Comments

@afzalmushtaque
Copy link

'$'+ballpark.business(100000)

Out[23]: '$100K'

'$'+ballpark.business(-100000)

Traceback (most recent call last):
File "C:\Python\Python36\lib\site-packages\IPython\core\interactiveshell.py", line 2963, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
'$'+ballpark.business(-100000)
File "C:\Python\Python36\lib\site-packages\ballpark\utils.py", line 90, in unwrapped_function
results = fn(values, *vargs, **kwargs)
File "C:\Python\Python36\lib\site-packages\ballpark\notation.py", line 130, in business
exponent = order(reference)
File "C:\Python\Python36\lib\site-packages\ballpark\notation.py", line 18, in order
power = log(repel(value), base)
ValueError: math domain error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant