RobinHankin / contfrac

Utilities for creating and evaluating continued fractions in R
0 stars 0 forks source link

Reduce() #2

Open RobinHankin opened 6 years ago

RobinHankin commented 6 years ago

the package should reference the sublime example on Reduce.Rd

RobinHankin commented 5 years ago

For the record, the example given in Reduce.Rd is

> cfrac <- function(x) Reduce(function(u, v) u + 1 / v, x, right = TRUE)
> cfrac(c(3,7,15,1,292))
[1] 3.141593