Continued fraction/Arithmetic/Construct from rational number: Difference between revisions

Content added Content deleted
(perl 6 entry)
No edit summary
Line 1: Line 1:
{{task}}To understand this task in context please see [http://rosettacode.org/wiki/Continued_fraction_arithmetic Continued fraction arithmetic]
{{task}}To understand this task in context please see [[Continued fraction arithmetic]]


The purpose of this task is to write a function r2cf(int N1, int N2), or r2cf(Fraction N), which will output a continued fraction assuming:
The purpose of this task is to write a function r2cf(int N1, int N2), or r2cf(Fraction N), which will output a continued fraction assuming:
Line 21: Line 21:
: 4142136,10000000
: 4142136,10000000


Demonstrate that this function may be used as generator a in [[http://rosettacode.org/wiki/Continued_fraction Continued fraction]] and obtain a floating point value for 23/8, 13/11, and 22/7
Demonstrate that this function may be used as generator a in [[Continued fraction]] and obtain a floating point value for 23/8, 13/11, and 22/7


=={{header|Perl 6}}==
=={{header|Perl 6}}==