1math::rationalfunctions(n)           Math           math::rationalfunctions(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       math::rationalfunctions - Polynomial functions
9

SYNOPSIS

11       package require Tcl  ?8.4?
12
13       package require math::rationalfunctions  ?1.0.1?
14
15       ::math::rationalfunctions::rationalFunction num den
16
17       ::math::rationalfunctions::ratioCmd num den
18
19       ::math::rationalfunctions::evalRatio rational x
20
21       ::math::rationalfunctions::addRatio ratio1 ratio2
22
23       ::math::rationalfunctions::subRatio ratio1 ratio2
24
25       ::math::rationalfunctions::multRatio ratio1 ratio2
26
27       ::math::rationalfunctions::divRatio ratio1 ratio2
28
29       ::math::rationalfunctions::derivPolyn ratio
30
31       ::math::rationalfunctions::coeffsNumerator ratio
32
33       ::math::rationalfunctions::coeffsDenominator ratio
34
35_________________________________________________________________
36

DESCRIPTION

38       This package deals with rational functions of one variable:
39
40       ·      the  basic  arithmetic operations are extended to rational func‐
41              tions
42
43       ·      computing the derivatives of these functions
44
45       ·      evaluation through a general procedure or  via  specific  proce‐
46              dures)
47

PROCEDURES

49       The package defines the following public procedures:
50
51       ::math::rationalfunctions::rationalFunction num den
52              Return  an  (encoded) list that defines the rational function. A
53              rational function
54
55                           1 + x^3
56                 f(x) = ------------
57                        1 + 2x + x^2
58
59              can be defined via:
60
61                 set f [::math::rationalfunctions::rationalFunction [list 1 0 0 1]  [list 1 2 1]]
62
63
64              num list Coefficients of the numerator of the rational
65                     function (in ascending order)
66
67
68              den list Coefficients of the denominator of the rational
69                     function (in ascending order)
70
71
72       ::math::rationalfunctions::ratioCmd num den
73              Create a new procedure that evaluates the rational function. The
74              name  of  the function is automatically generated. Useful if you
75              need to evaluate the function many times, as the procedure  con‐
76              sists of a single [expr] command.
77
78              num list Coefficients of the numerator of the rational
79                     function (in ascending order)
80
81
82              den list Coefficients of the denominator of the rational
83                     function (in ascending order)
84
85
86       ::math::rationalfunctions::evalRatio rational x
87              Evaluate the rational function at x.
88
89              rational list The rational function's definition (as returned
90                     by the rationalFunction command).  order)
91
92              x float The coordinate at which to evaluate the function
93
94
95       ::math::rationalfunctions::addRatio ratio1 ratio2
96              Return  a new rational function which is the sum of the two oth‐
97              ers.
98
99              ratio1 list The first rational function operand
100
101              ratio2 list The second rational function operand
102
103
104       ::math::rationalfunctions::subRatio ratio1 ratio2
105              Return a new rational function which is the  difference  of  the
106              two others.
107
108              ratio1 list The first rational function operand
109
110              ratio2 list The second rational function operand
111
112
113       ::math::rationalfunctions::multRatio ratio1 ratio2
114              Return  a  new rational function which is the product of the two
115              others.  If one of the arguments is a scalar  value,  the  other
116              rational function is simply scaled.
117
118              ratio1 list The first rational function operand or a scalar
119
120              ratio2 list The second rational function operand or a scalar
121
122
123       ::math::rationalfunctions::divRatio ratio1 ratio2
124              Divide  the first rational function by the second rational func‐
125              tion and return the result. The remainder is dropped
126
127              ratio1 list The first rational function operand
128
129              ratio2 list The second rational function operand
130
131
132       ::math::rationalfunctions::derivPolyn ratio
133              Differentiate the rational function and return the result.
134
135              ratio list The rational function to be differentiated
136
137
138       ::math::rationalfunctions::coeffsNumerator ratio
139              Return the coefficients of the numerator of the  rational  func‐
140              tion.
141
142              ratio list The rational function to be examined
143
144
145       ::math::rationalfunctions::coeffsDenominator ratio
146              Return the coefficients of the denominator of the rational func‐
147              tion.
148
149              ratio list The rational function to be examined
150
151

REMARKS ON THE IMPLEMENTATION

153       The implementation of the rational functions relies on the  math::poly‐
154       nomials  package.  For  further  remarks  see the documentation on that
155       package.
156

KEYWORDS

158       math, rational functions
159
161       Copyright (c) 2005 Arjen Markus <arjenmarkus@users.sourceforge.net>
162
163
164
165
166math                                 1.0.1          math::rationalfunctions(n)
Impressum