mpmath icon indicating copy to clipboard operation
mpmath copied to clipboard

quadsing: quadrature for integrals with (fractional power like) singalarities at endpoints

Open thartmann15 opened this issue 4 years ago • 4 comments

Hi.

mpmath's quad is surprisingly bad at integrating something like quad(lambda x: x**(-99999999/mpf(100000000)), [0, 1])

I added the function function quadsing which can handle such integrals. The function works reasonably well for power-like singularities x**e with complex exponent e at endpoints.

Greetings Timo

Edit: The check was not successful because 3.10-dev could not build gmpy as dependency...

thartmann15 avatar Jun 16 '21 22:06 thartmann15

@thartmann15, you can cherry-pick from #601 to fix gmpy2 problem.

skirpichev avatar Jun 21 '21 04:06 skirpichev

Hi. I have cherry-picked the fix.

Edit: the routines which failed pytest-3 are test_quad.py::test_expmath_fail test_matrices.py::test_interval_matrix_matrix_mult

thartmann15 avatar Jun 22 '21 14:06 thartmann15

Please add more tests to cover remaining lines.

skirpichev avatar Jun 23 '21 01:06 skirpichev

more code coverage tests added

thartmann15 avatar Jun 23 '21 20:06 thartmann15

@thartmann15, could you please fix merge conflicts?

skirpichev avatar May 11 '23 06:05 skirpichev

@thartmann15, I'm closing this. Feel free reopen the pr if you wish to continue this work.

skirpichev avatar Oct 07 '23 03:10 skirpichev