upiterbarg / mpmath

Automatically exported from code.google.com/p/mpmath
Other
0 stars 0 forks source link

NameError: global name 'to_float' is not defined #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
>>> from mpmath import *
>>> mp.dps = 300
>>> asin(0.5)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tinuviel/python/mpmath/mpmath/functions.py", line 465, in f
    return make_mpf(real_f(x._mpf_, prec, rounding))
  File "mpmath/libelefun.py", line 1541, in mpf_asin
    r = math.asin(to_float(x))
NameError: global name 'to_float' is not defined

Original issue reported on code.google.com by sanxiyn on 6 Apr 2009 at 5:30

GoogleCodeExporter commented 9 years ago
Acknowledged for current svn. Thank you for spotting this!

Original comment by Vinzent.Steinberg@gmail.com on 6 Apr 2009 at 3:33

GoogleCodeExporter commented 9 years ago
This patch fixes it and adds a test.

Original comment by Vinzent.Steinberg@gmail.com on 6 Apr 2009 at 3:50

Attachments:

GoogleCodeExporter commented 9 years ago
The patch actually tests atan, not asin. Other than that, by all means commit.

Original comment by fredrik....@gmail.com on 6 Apr 2009 at 4:21

GoogleCodeExporter commented 9 years ago
Fixed in r905.

Original comment by Vinzent.Steinberg@gmail.com on 8 Apr 2009 at 11:37