Name:

remez computes the minimax of a function on an interval.

Usage:

remez(f, n, range, w, quality) : (function, integer, range, function, constant) -> function remez(f, L, range, w, quality) : (function, list, range, function, constant) -> function

Parameters:

Description:

Example 1:

   > p = remez(exp(x),5,[0;1]);
   > degree(p);
   5
   > dirtyinfnorm(p-exp(x),[0;1]);
   1.12956984638214536849843017679626063762687501534126e-6

Example 2:

   > p = remez(1,[|0,2,4,6,8|],[0,Pi/4],1/cos(x));
   > canonical=on!;
   > p;
   0.99999999994393749280444571988532724907643631727381 + -0.49999999571557467737204931630836834563663039748203 * x^2 + 4.16666132335010905188253972212748718651775241902969e-2 * x^4 + -1.38865291475286141707180658383176799662601691348739e-3 * x^6 + 2.437267919111162694221738667927916761689966804242e-5 * x^8

Example 3:

   > p1 = remez(exp(x),5,[0;1],default,1e-5);
   > p2 = remez(exp(x),5,[0;1],default,1e-10);
   > p3 = remez(exp(x),5,[0;1],default,1e-15);
   > dirtyinfnorm(p1-exp(x),[0;1]);
   1.12956984638214536849843017679626063762687501534126e-6
   > dirtyinfnorm(p2-exp(x),[0;1]);
   1.12956980227478687332174207517728389861926659249056e-6
   > dirtyinfnorm(p3-exp(x),[0;1]);
   1.12956980227478687332174207517728389861926659249056e-6
See also: dirtyinfnorm, infnorm, fpminimax, guessdegree, taylorform, taylor
Go back to the list of commands