summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cesar/lib/fixed/eval.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cesar/lib/fixed/eval.py b/cesar/lib/fixed/eval.py
index 235f7c33ce..529dead834 100644
--- a/cesar/lib/fixed/eval.py
+++ b/cesar/lib/fixed/eval.py
@@ -4,6 +4,7 @@ import series
from sympy import sin, cos, pi
import matplotlib.pyplot as plt
+import numpy
plot_error = 0
@@ -30,7 +31,8 @@ def prec (expr, order, poly, q, g, lo, hi):
[ hex (i) for i in coeffs_fixed_guard ]
if plot_error:
p = series.refine_precision (expr, coeffs, poly.eval, lo, hi, n)
- plt.plot (p)
+ x = numpy.linspace (lo, hi, n)
+ plt.plot (x, p)
p = series.refine_precision_fixed (q, expr, coeffs_fixed,
poly.eval_fixed, lo, hi, n)
print "precision refined (fixed):", sum (p), "/", n, "max:", max (p)