|
Contents | Previous | Next | Subchapters |
| Syntax |
lentz(a, b) |
| See Also | polval |
b(i, 1) + a(i, 1)
-------
b(i, 2) + a(i, 2)
-------
b(i, 3) + ...
+ a(i, n)
-----------
b(i, n + 1)
where a and b are real, double-precision or complex matrices
with the same row dimension. The value n in the expression above is the
column dimension of a which must be one less than the column dimension
of b. The return value is a column vector with the same
row dimension as a and has the same type as results from
coercion
between the type of a and
the type of b.
tan(x) = x
--- 2
1 - x
--- 2
3 - x
--- 2
5 - x
---
7 - ...
The tangent of pi / 4 is one. We can compare this to the first
five terms of the continued fraction as follows:
x = PI / 4d0
a = [ x, -x^2, -x^2, -x^2, -x^2]
b = [0, 1, 3, 5, 7, 9]
b = double(b)
print "lentz(a, b) =", lentz(a, b)