commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <>
Subject [math] adding absolute accuracy threshold to integrators
Date Sun, 18 Jan 2009 18:05:01 GMT
The UnivariateRealIntegrator interface shares most of the convergence
settings that have been put in the new ConvergenceAlgorithm
super-interface. The only missing part is absolute accuracy settings.

It seems interesting for consistency to follow the same pattern as
UnivariateRealSolver and UnivariateRealMinimizer and to have
UnivariateRealIntegrator implement the ConvergenceAlgorithm interface.

The main change would be that in the Romberg, Simpson and Trapezoid
integrators, the check:

  if (Math.abs(s - olds) <= Math.abs(relativeAccuracy * olds)) {

would be changed to:

  final double error = Math.abs(s - olds);
  if (error <= Math.abs(relativeAccuracy * olds) &&
      error < absoluteAccuracy) {

If nobody complains, I will do this change soon.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message