Révision a0725e69 src/cvp-run-02.sage
b/src/cvp-run-02.sage | ||
---|---|---|
133 | 133 |
contFracMaxErr) |
134 | 134 |
#print "cr-02 - Chebyshe points list computed." |
135 | 135 |
chebyshevPointsList = chebyshevPointsList + pointsList |
136 |
# |
|
137 |
## Filter out those points that do not have a defined image. |
|
138 |
chebyshevPointsList = cvp_filter_out_undefined_image(chebyshevPointsList, func) |
|
139 |
# |
|
140 |
## |
|
136 | 141 |
poly = cvp_cvp_polynomial(func, |
137 | 142 |
lowerBound, |
138 | 143 |
upperBound, |
... | ... | |
149 | 154 |
upperBound, |
150 | 155 |
realField, |
151 | 156 |
contFracMaxErr) |
157 |
## In some cases |
|
152 | 158 |
#print "cr-02 - mcr-02 maxis list:", maxisList |
153 | 159 |
#print "cr-02 - maxErr:", maxErr |
160 |
#polyRing = PolynomialRing(realField, func.variables()[0]) |
|
161 |
#errFunc(x) = func(x) - polyRing(poly) |
|
162 |
errFunc(x) = func(x) - poly(x) |
|
154 | 163 |
if len(maxisList) != 0: |
155 | 164 |
(maxErrPoint, maxErrPointErr) = \ |
156 |
cvp_func_abs_max_for_points(func, |
|
157 |
maxisList) |
|
165 |
cvp_func_abs_max_for_points(errFunc, |
|
166 |
maxisList, |
|
167 |
realField) |
|
158 | 168 |
sys.stderr.write("# points: " + str(pointsNum)) |
159 | 169 |
sys.stderr.write(" - MaxErr: " + str(maxErr.n(prec=53))) |
160 | 170 |
sys.stderr.write(" - MaxErrPoint: " + str(maxErrPoint) + "\n") |
Formats disponibles : Unified diff