Bounds order while using hquadrature
Hi,
I noticed some weird behaviour while using hquadrature:
hquadrature(t->1, 0, -1)[1] outputs 1, while, mathematically speaking, it should be -1. Is this intended, or does anybody have an idea of why is this happening ?
Thank you in advance for your help !
Yes, it seems like the calls to abs on this line and this line may be undesirable. (In the latter case we will have to add abs calls to the Δ[i] > Δ[kdivide] check, however.)
A PR with a test would be welcome.
Thanks, I'll see if I can find some time to come up with a PR !
*** I spent all night from midnight to 5am trying to figure out the mistake in a complicated but working program
quadgk(x -> (gammacdf(shape, scale, S_R-x) - gammacdf(shape, scale, S_L-x)), E_L, S_L, rtol=ε)[1] gave -2.724235379524588 hquadrature(x -> (gammacdf(shape, scale, S_R-x) - gammacdf(shape, scale, S_L-x)), E_L, S_L, rtol=ε)[1] gave 2.724235379524588
Thank you very much!
It looks like I did update my Julia packages, but Jupyter notebook was not updated. I am sorry for disturbing - it looks working perfectly now