You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In function: finite_difference_derivative with 6th Order, calc step h by :
// Error: h^6f^(7)(x)/140 + 5|f(x)|eps/h
Real h = pow(eps / 168, static_cast<Real>(1) / static_cast<Real>(7));
The coeff number 168 was wrong acrooding to the comment expression below. The Number 168 seems to be calc by 1406/5, which the correct coeff should be 1405/6 = 350/3.
Besides, it should be eps * Coeff instead of eps / 168.
The final expression of step h should be like:
Real h = pow(eps * 350 / 3 , static_cast<Real>(1) / static_cast<Real>(7));
And, every comment about ’eps^2/3, eps^4/5, eps^6/7' were not used in the code, which also attentioned in the website document.
The text was updated successfully, but these errors were encountered:
Version: 1.85.0
file path: boost\math\differentiation\finite_difference.hpp
In function: finite_difference_derivative with 6th Order, calc step h by :
The coeff number 168 was wrong acrooding to the comment expression below. The Number 168 seems to be calc by 1406/5, which the correct coeff should be 1405/6 = 350/3.
Besides, it should be eps * Coeff instead of eps / 168.
The final expression of step h should be like:
And, every comment about ’eps^2/3, eps^4/5, eps^6/7' were not used in the code, which also attentioned in the website document.
The text was updated successfully, but these errors were encountered: