convert a rational function to continued-fraction form
procedure or expression representing a rational function
(optional) variable name appearing in r, if r is an expression
This procedure converts a given rational function r into the continued-fraction form which minimizes the number of arithmetic operations required for evaluation.
If the second argument x is present then the first argument must be a rational expression in the variable x. If the second argument is omitted then either r is an operator such that r⁡y yields a rational expression in y, or else r is a rational expression with exactly one indeterminate (determined via indets).
Note that for the purpose of evaluating a rational function efficiently (i.e. minimizing the number of arithmetic operations), the rational function should be converted to continued-fraction form. In general, the cost of evaluating a rational function of degree ⁡m,n when each of numerator and denominator is expressed in Horner (nested multiplication) form, with the denominator made monic, is
m+n mults/divs and m+n adds/subtracts
whereas the same rational function can be evaluated in continued-fraction form with a cost not exceeding
max⁡m,n mults/divs and m+n adds/subtracts
The command with(numapprox,confracform) allows the use of the abbreviated form of this command.
f ≔ t→1.1⁢t2−20.5⁢t+5.3t2+7.6⁢t+0.1
The Horner form can be evaluated in 4 mults/divs
whereas the continued-fraction form can be evaluated in 2 mults/divs
e ≔ pade⁡ⅇx,x,2,2
e ≔ 112⁢x2+12⁢x+1112⁢x2−12⁢x+1
r2,3 ≔ minimax⁡tan⁡xx,x=0..π4,2,3
r2,3 ≔ 1.130422926+−0.07842798254−0.07066118710⁢x⁢x1.130423032+−0.07843711579+−0.4473405792+0.02547897687⁢x⁢x⁢x
Download Help Document
What kind of issue would you like to report? (Optional)
Thank you for submitting feedback on this help document. Your feedback will be used
to improve Maple's help in the future.