BUG: special.struve: do not return NaN for values close to zeros
Closes #19580, closes #5979
When calculating the struve function using the power series (https://dlmf.nist.gov/11.2.1), if the z is close to giving result that is a zero of the function, the error boundaries don't evaluate the result accordingly, so the value calculated, even tough it is correct, doesn't pass the conditions and returns NaN. With Asymptotic expansions we can catch some of those situations (https://dlmf.nist.gov/11.6.5) and we can also check the error margin to let the values be returned.
Hi @person142 @steppi , sorry to bother, but when you have the chance, can you take a look at my pull request? Thank you.
Hello @steppi, is there a chance you can take a look at my pr?
In the mean time @GreenMemory16 could you resolve the merge conflicts
Hi @GreenMemory16, thanks for submitting this fix. The merge conflict is because we've recently translated all of cephes into C++ which can also run on CUDA as part of the project described here. You can find the the relevant function here now: https://github.com/scipy/scipy/blob/c0fa9e36168c24ce6772e054653c82c73e083d56/scipy/special/special/cephes/struve.h#L293.
Thanks, I'll fix it as soon as possible
Hi @GreenMemory16, did you mean to close this?
Hi @GreenMemory16, did you mean to close this?
No, I'm sorry. But it is reopened now
When you have a chance, can you take a look at this pr @steppi?
@GreenMemory16 Thanks for submitting this. Did you see that you have a review waiting, and were you still interested in finishing?
Hello, sorry for the time it took for me to reply. I don't currently have the time, nor the level of confidence to tackle this issue. I think i''l let someone else grab this
Sorry again for the time it took for me to reply.
Thanks for replying @GreenMemory16! Can you just reply to the questions @steppi wrote above so we can determine whether we should continue with the approach? Specifically, was there a theoretical backing for this, and how was 1e-22 chosen?
Ok, that's @GreenMemory16! In that case, I'll go ahead and close this so others can give it a shot.