Skip to content

Commit

Permalink
apply patch to ensure numerical stability - thanks to Alexander Voigt
Browse files Browse the repository at this point in the history
  • Loading branch information
tst committed Apr 16, 2016
1 parent 99ab79c commit afbb3b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/numerics.cpp
Expand Up @@ -281,7 +281,7 @@ double b0(double p, double m1, double m2, double q) {

const double pTest = divide_finite(pSq, mMaxSq);
/// Decides level at which one switches to p=0 limit of calculations
const double pTolerance = 1.0e-6;
const double pTolerance = 1.0e-10;

/// p is not 0
if (pTest > pTolerance) {
Expand Down Expand Up @@ -453,7 +453,7 @@ double b22(double p, double m1, double m2, double q) {

/// Decides level at which one switches to p=0 limit of calculations
const double p2 = sqr(p), m12 = sqr(m1), m22 = sqr(m2);
const double pTolerance = 1.0e-6;
const double pTolerance = 1.0e-10;

if (p2 < pTolerance * maximum(m12, m22) ) {
// m1 == m2 with good accuracy
Expand Down

0 comments on commit afbb3b3

Please sign in to comment.