Closed Happypig375 closed 5 years ago
@Happypig375, haven't you already implemented something very similar to this? Or at least started?
Nope. Do you mean #402?
I guess that's what I was referring to. Am I getting the two confused. Can the same logic be reused?
If we are going to reuse them, then I'm unsure what to reuse.
This function takes a number and returns a vector representing the continued fraction.
Definition:
continued(number, maxlength)
Example:continued(6/7,7) => [0, 1, 6]
Visual representation: 6/7 = 0+1/(1+1/6)2nd example:
continued(pi, 5) => [3,7,15,1,292]
Visual representation: pi = 3+1/(7+1/(15+1/(1+1/(292+1/(…)))))