JuliaMath / Cubature.jl

One- and multi-dimensional adaptive integration routines for the Julia language
Other
126 stars 21 forks source link

Very slow for one-dimensional integral #63

Closed urbainvaes closed 9 months ago

urbainvaes commented 9 months ago

Hi,

I noticed that hquadrature sometimes does not work. For example, the command

hquadrature(sin, -5,  5)

does not terminate. Is this a known issue? Strangely, the command works well if maxevals is provided.

mzaffalon commented 9 months ago

Related to https://github.com/JuliaMath/Cubature.jl/issues/34.

stevengj commented 9 months ago

As explained in the manual:

More precisely, the integration will terminate when either the relative- or the absolute-error tolerances are met. abstol defaults to 0, which means that it is ignored, but it can be useful to specify an absoute error tolerance for integrands that may integrate to zero (or nearly zero) because of large cancellations, in which case the problem is ill-conditioned and a small relative error tolerance may be unachievable.

Closing as a duplicate of #34.

urbainvaes commented 9 months ago

Ah, all right! Thank you very much!