[SciPy-dev] tandg too strict?

Arnd Baecker arnd.baecker at web.de
Thu Dec 22 12:06:58 CST 2005


Is there a reason, why cephes.tandg(45) should
precisely equal 1.0?
On an Itanium 2 I get the following failure:

======================================================================
FAIL: check_tandg (scipy.special.basic.test_basic.test_cephes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/baecker/python2/scipy_lintst_atlas_gcc/lib/python2.4/site-packages/scipy/special/tests/test_basic.py",
line 440, in check_tandg
    assert_equal(cephes.tandg(45),1.0)
  File
"/home/baecker/python2//scipy_lintst_atlas_gcc/lib/python2.4/site-packages/scipy/test/testing.py",
line 666, in assert_equal
    assert desired == actual, msg
AssertionError:
Items are not equal:
DESIRED: 1.0
ACTUAL: 1.0000000000000002

Should the assert_equal be changed into an assert_almost_equal?

Best, Arnd




More information about the Scipy-dev mailing list