Skip to content

Derivative improvement #2

Open
Open

Description

@artemlos
  • change the method so that it takes into account the machine epsilon.
  • use Richardson extrapolation
  • and more (I will wait until I've done the entire numerical analysis course)

Activity

  1. artemlos commented on Mar 29, 2015

    @artemlos
    MemberAuthor

    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.

  2. artemlos commented on Mar 30, 2015

    @artemlos
    MemberAuthor

    example in GO:

    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)
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions