Skip to content

Commit

Permalink
BUG: special: user fabs in Wright omega instead of abs
Browse files Browse the repository at this point in the history
  • Loading branch information
person142 committed Sep 7, 2019
1 parent e32ccb1 commit 1970f35
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions scipy/special/tests/test_wrightomega.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ def test_wrightomega_exp_approximation_crossover():
)


@pytest.mark.xfail(
run=False,
reason='Fails for old versions of gcc (< 6.5)'
)
def test_wrightomega_real_versus_complex():
x = np.linspace(-500, 500, 1001)
results = sc.wrightomega(x + 0j).real
Expand Down
2 changes: 1 addition & 1 deletion scipy/special/wright.cc
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ wright::wrightomega_real(double x)
w = w*(1.0+e);

/* Iteration two (if needed based on the condition number) */
if (abs((2.0*w*w-8.0*w-1.0)*pow(abs(r),4.0)) >= TWOITERTOL*72.0*pow(abs(wp1),6.0))
if (fabs((2.0*w*w-8.0*w-1.0)*pow(fabs(r),4.0)) >= TWOITERTOL*72.0*pow(fabs(wp1),6.0))
{
r = x - w - log(w);
wp1 = w+1.0;
Expand Down

0 comments on commit 1970f35

Please sign in to comment.