Continued fraction: Difference between revisions
m
→{{header|Fōrmulæ}}
(Easylang) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1,699:
The following function definition creates a continued fraction:
[[File:Fōrmulæ - Continued fraction
The function accepts the following parameters:
Line 1,722:
[[File:Fōrmulæ - Continued fraction 02.png]]
[[File:Fōrmulæ - Continued fraction
'''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
[[File:Fōrmulæ - Continued fraction
'''Case 2.''' <math>e</math>
Line 1,753:
* λb is n ↦ 1 if n = 1, n - 1 elsewhere
[[File:Fōrmulæ - Continued fraction
[[File:Fōrmulæ - Continued fraction
'''Case 3.''' <math>\pi</math>
Line 1,765:
* λb is n ↦ 2(n - 1)²
[[File:Fōrmulæ - Continued fraction
[[File:Fōrmulæ - Continued fraction
=={{header|Go}}==
Line 4,036:
=={{header|Wren}}==
{{trans|D}}
<syntaxhighlight lang="
var t = 0
for (i in n..1) {
|