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
a good h value(for the double type) is in the order of 10e-14. Now, the current method uses forward differentiation, however, it's better to switch to centered differentiation instead. The h value might need to be adjusted in this case.
func Derivative(x func(x float64) float64, point float64) float64 {
const h = 1e-14 //not sure what to take here. Anyway, I think our derivative function has to test the errors (flactuation) in advance. Say we start at 1e-10 to 1e14.
return (x(point+h) - x(point-h)) / (2 * h)
}
Activity
artemlos commentedon Mar 29, 2015
a good h value(for the double type) is in the order of 10e-14. Now, the current method uses forward differentiation, however, it's better to switch to centered differentiation instead. The h value might need to be adjusted in this case.
artemlos commentedon Mar 30, 2015
example in GO: