Continued fraction: Difference between revisions

Content deleted Content added
Hansoft (talk | contribs)
Added Forth
m →‎{{header|REXX}}: deleted a blank line, expanded ''output'' a wee bit. -- ~~~~
Line 548:
/*also: [e+1] / [e-1] */
exit
 
/*────────────────────────────────$CF subroutine────────────────────────*/
$cf: procedure; parse arg c x,y; !=0; numeric digits digits()*2
Line 560 ⟶ 559:
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</lang>
'''output'''
Output:
<pre style="height:25ex30ex;overflow:scroll">
sqrt(2) = 1.41421356237309504880168872420969807856967187537694807317668 a terms= 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
e = 2.71828182845904523536028747135266249775724709369995957496697 a terms= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16