Continued fraction: Difference between revisions

m
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
Line 1,699:
The following function definition creates a continued fraction:
 
[[File:Fōrmulæ - Continued fraction 01a01.png]]
 
The function accepts the following parameters:
Line 1,722:
[[File:Fōrmulæ - Continued fraction 02.png]]
 
[[File:Fōrmulæ - Continued fraction 03a03.png]]
 
'''Case 1.''' <math>\sqrt 2</math>
Line 1,741:
* The value of the normal (numeric) call, forced to be shown as a decimal number, by using the Math.Numeric expression (the N(x) expression)
 
[[File:Fōrmulæ - Continued fraction 04a04.png]]
 
[[File:Fōrmulæ - Continued fraction 05a05.png]]
 
'''Case 2.''' <math>e</math>
Line 1,753:
* λb is n ↦ 1 if n = 1, n - 1 elsewhere
 
[[File:Fōrmulæ - Continued fraction 06a06.png]]
 
[[File:Fōrmulæ - Continued fraction 07a07.png]]
 
'''Case 3.''' <math>\pi</math>
Line 1,765:
* λb is n ↦ 2(n - 1)²
 
[[File:Fōrmulæ - Continued fraction 08a08.png]]
 
[[File:Fōrmulæ - Continued fraction 09a09.png]]
 
=={{header|Go}}==
2,120

edits