Skip to content

Higher approximation error than interpolation error for Runge's function #1

@vchizhov

Description

@vchizhov

I tried the code with the Runge function and I am getting a larger approximation error than interpolation error, which to me suggests that either something is wrong with the algorithm, or maybe I haven't set up things correctly. Here is how my setup looks like:

fx = "(1.0+25.0 * x**2)**-1"
fx_der = "-50.0*x * (1.0+25.0 * x**2)**-2"
fxn = "runge"
interval = [-1.0, 1.0]
n = 5
px, xn, history = remez(fx, fx_der, interval, n)
visualization(fx, px, xn, history, interval, n, fxn)

I have modified the function visualization to accept a fxn parameter which is the name of the function, in order to avoid issues with savefig. I haven't modified anything else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions