remez - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


numapprox

  

remez

  

Remez algorithm for minimax rational approximation

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

remez(w, f, a, b, m, n, crit, 'maxerror')

Parameters

w

-

procedure representing a weight function w(x) > 0 on [a, b]

f

-

procedure representing the function f(x) to be approximated

a, b

-

numeric values specifying the interval [a, b]

m

-

integer specifying the desired degree of the numerator

n

-

integer specifying the desired degree of the denominator

crit

-

Array indexed 1..m+n+2 containing an initial estimate of the critical set (i.e. the points of max/min of the error curve)

maxerror

-

name which will be assigned the minimax norm of wfr

Description

• 

This is not usually invoked as a user-level routine.  See numapprox[minimax] for the standard user interface to the Remez algorithm.

• 

This procedure computes the best minimax rational approximation of degree m,n for a given real function f(x) on the interval [a, b] with respect to the positive weight function w(x).

• 

Specifically, it computes the rational expression r(x) such that

maxwxfxrx,xa,b

(1)

  

is minimized over all rational expressions rx=pxqx with numerator of degree m and denominator of degree n.

• 

The value returned is an operator r such that rx is the desired approximation as a quotient of polynomials in Horner (nested multiplication) form.

• 

Note that if f(x) is nonzero on the interval of approximation then the relative error will be minimized by specifying the weight function wx=1fx.

• 

If n=0 then the best minimax polynomial approximation of degree m is computed.

• 

The last argument 'maxerror' must be a name and upon return, its value will be an estimate of the minimax norm specified by equation (1) above.

• 

Various levels of user information will be displayed during the computation if infolevel[remez] is assigned values between 1 and 3.

• 

The command with(numapprox,remez) allows the use of the abbreviated form of this command.

Examples

withnumapprox:

w := proc(x) 1.0 end proc:

f := proc(x) evalf(exp(x)) end proc:

critArray1..7,0,0.10,0.25,0.50,0.75,0.90,1.0:

remezw,f,0,1,5,0,crit,maxerror

x0.9999988700+1.000079446+0.4990961949+0.1704017036+0.03480086848+0.01390361442xxxxx

(1)

maxerror

1.131059045×10−6

(2)

Digits14

Digits14

(3)

g := proc(x) if x=0 then 1.0 else evalf(tan(x)/x) end if end proc:

critArray1..8,0,0.05,0.15,0.30,0.48,0.63,0.73,0.78:

remezw,g,0,evalfπ4,3,3,crit,maxerror

x1.2864938726745+0.50393137136308+0.084263112185419+0.030873561129257xxx1.2864938819561+0.50393243320449+0.51307429865340+0.19870614448995xxx

(4)

maxerror

7.21510×10−9

(5)

See Also

numapprox[minimax]