0

I have tried this:

import scipy.special as spec

y=spec.erfi(0.9)
print(y)

The output is

1.37154320157

But the actual answer is 1.16308715367 which can be verified here

Please could someone help me solve this problem?

Thanks

2
  • 2
    I would say look at the definition of erfi in the scipy docs. It's prob a factor
    – wgwz
    Nov 3, 2015 at 20:37
  • @skywalker I've already done that, but thanks anyway, I just don't understand what's wrong, the erf function works fine.
    – BLAZE
    Nov 3, 2015 at 20:39

1 Answer 1

4

erfi is the imaginary error function, -i erf(i z) (docs). You want erfinv:

>>> z = 0.9
>>> spec.erf(z)
0.79690821242283216
>>> spec.erfinv(z)
1.1630871536766736
>>> spec.erf(spec.erfinv(z))
0.89999999999999991
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.