Continued fraction: Difference between revisions

Content deleted Content added
m →‎{{header|REXX}}: corrected a misspelling. -- ~~~~
Line 494: Line 494:
<br>any form of REXX numbers (negative, exponentiated, decimal fractions) can be used.
<br>any form of REXX numbers (negative, exponentiated, decimal fractions) can be used.
<br><br>There isn't any realistic limit on the precision that can be used, although 100,000 digits would be a bit unwieldly to display.
<br><br>There isn't any realistic limit on the precision that can be used, although 100,000 digits would be a bit unwieldly to display.
<lang rexx>/*REXX program to calculate some contined fractions. */
<lang rexx>
/*calculate some continous fractions. */


numeric digits 60 /*let's use sixty digits for show&tell*/
numeric digits 60 /*let's use sixty digits for show&tell*/
Line 540: Line 539:


divzero: say; say '***error!***'; say 'division by zero.'; say; exit 13
divzero: say; say '***error!***'; say 'division by zero.'; say; exit 13
tell:parse arg _,v;say right(_,8) '=' format(v) 'a terms='left(a,40);a=;b=;return
tell:parse arg _,v;say right(_,8) '=' format(v) 'a terms='left(a,40);a=;b=;return</lang>
</lang>
Output:
Output:
<pre style="height:25ex;overflow:scroll">
<pre style="height:25ex;overflow:scroll">