Jump to content

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

no edit summary
(perl 6 entry)
No edit summary
Line 1:
{{task}}To understand this task in context please see [http://rosettacode.org/wiki/Continued_fraction_arithmetic [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:
Line 21:
: 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
 
=={{header|Perl 6}}==
2,172

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.