Back to library index.

Package series (in series.i) -

Index of documented functions or symbols:

series_n

### series_n

```DOCUMENT series_n(r, s)
returns the minimum number n of terms required for the geometric
series
1 + r + r^2 + r^3 + ... + r^n = s
to reach at least the given value s.  An alternate viewpoint is
that n is the minimum number of terms required to achieve the
sum s, with a ratio no larger than r.
Returns 0 if r<1 and s>1/(1-r), or if s<1.
The routine makes the most sense for r>1 and s substantially
greater than 1.  The intended use is to determine the minimum
number of zones required to span a given thickness t with a given
minimum zone size z, and maximum taper ratio r (assumed >1 here):
n= series_n(r, t/z);
With this n, you have the option of adjusting r or z downwards
(using series_r or series_s, respectively) to achieve the final
desired zoning.
R or S or both may be arrays, as long as they are conformable.```

### series_r

```DOCUMENT series_r(s, n)
returns the ratio r of the finite geometric series, given the sum s:
1 + r + r^2 + r^3 + ... + r^n = s
Using n<0 will return the the reciprocal of n>0 result, that is,
series_r(s, -n) == 1.0/series_r(s, n)
If n==0, returns s-1 (the n==1 result).
S or N or both may be arrays, as long as they are conformable.```

```DOCUMENT series_s(r, n)