zoukankan      html  css  js  c++  java
  • maple minimax函数

    Help

    numapprox[minimax] - minimax rational approximation

    Calling Sequence

     

    minimax(fx=a..b, [mn], w, 'maxerror')

    minimax(fa..b, [mn], w, 'maxerror')

     

    Parameters

     

    f

    -

    procedure or expression representing the function

    x

    -

    variable name appearing in f, if f is an expression

    a, b

    -

    numerical values specifying the interval of approximation

    m

    -

    integer specifying the desired degree of the numerator

    n

    -

    integer specifying the desired degree of the denominator

    w

    -

    (optional) procedure or expression specifying the weight function, default 1

    maxerror

    -

    (optional) a name which will be assigned the minimax norm

     

     

    Description

     
    • 

    This procedure computes the best minimax rational approximation of degree (mn) for a given real function f(x) on the interval [ab] with respect to the positive weight function w(x), via the Remez algorithm.

    • 

    Specifically, it computes the rational expression p(x)/q(x) such that

    max(w(x)*abs(f(x)-p(x)/q(x)), `in`(x, [a, b]))

    (1)

     

      

    is minimized over all rational expressions p(x)/q(x) with numerator of degree <= m and denominator of degree <= n.

    • 

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

    • 

    If the second argument is a range a..b then the first argument is understood to be a Maple operator, and the result will be returned as an operator. If the second argument is an equation x = a .. b then the first argument is understood to be an expression in the variable x, and the result will be returned as an expression. In all cases, the numerator and denominator of the result are each expressed in Horner (nested multiplication) form.

    • 

    Note that for the purpose of evaluating a rational function efficiently (minimizing the number of arithmetic operations), the rational function should be converted to a continued-fraction form. See numapprox[confracform].

    • 

    If n = 0 or if the third argument is simply an integer m then the best minimax polynomial approximation of degreem is computed.

    • 

    If the fourth argument w is specified then it is assumed to be an operator if f is an operator, and it is assumed to be an expression if f is an expression. If the fourth argument is omitted then the weight function is understood to be w(x) = 1 for all x.

    • 

    If the fifth argument 'maxerror' is present then it must be a name. 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[minimax] is assigned values between 1 and 3.

    • 

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

     

    Examples

     

    with(numapprox)

    minimax(exp(x), x = 0 .. 1, 5)

    .9999988706+(1.000079450+(.4990961405+(.1704019041+(0.3480060952e-1+0.1390372558e-1*x)*x)*x)*x)*x

    (1)

    minimax(sin(x)/x, x = 0 .. 2, [2, 2])

    (.9502547393+(-0.529094917e-1-0.8416376466e-1*x)*x)/(.9501754297+(-0.5104192162e-1+0.6724432790e-1*x)*x)

    (2)

    minimax(sin+cos, -1 .. 1, [1, 2])

    proc (x) options operator, arrow; (.8647502927+1.115735845*x)/(.8498225980+(.2651029392+.3003548040*x)*x) end proc

    (3)

    Digits := 14

    Digits := 14

    (4)

    proc (x) options operator, arrow; (1.2602800366369+(.66158211600441+(.14246094729905+0.13527436108012e-1*x)*x)*x)/(1.2602800381631+(-.59869807134142+(.11102132866190-0.82048023700096e-2*x)*x)*x) end proc

    (5)

    0.12110972781516e-8

    (6)
     

    See Also

     

    numapprox[confracform]



  • 相关阅读:
    Ubuntu 开发环境
    机器学习笔记-相似度
    ElasticSearch 笔记-分布式工作原理
    ElasticSearch 笔记-别名
    ElasticSearch 笔记-映射
    ElasticSearch 笔记-基本概念
    Linux 二 常用命令
    经典中的经典算法:动态规划(详细解释,从入门到实践,逐步讲解)
    图解Transformer
    CUDA9.0+tensorflow-gpu1.8.0+Python2.7服务器环境搭建经验
  • 原文地址:https://www.cnblogs.com/llguanli/p/6759072.html
Copyright © 2011-2022 走看看