Movatterモバイル変換
[0]
ホーム
URL:
画像なし
夜間モード
Jump to content
Main menu
Main menu
move to sidebar
hide
Social
Discord
Facebook
Twitter
Explore
Languages
Tasks
Random page
Rosetta Code
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Contents
move to sidebar
hide
Beginning
1
0815
2
11l
3
360 Assembly
Toggle 360 Assembly subsection
3.1
using fullword integers
3.2
using packed decimals
4
6502 Assembly
5
68000 Assembly
6
8080 Assembly
7
8086 Assembly
Toggle 8086 Assembly subsection
7.1
Calculating the values at runtime
7.2
Using A Lookup Table
8
8th
9
AArch64 Assembly
10
ABAP
Toggle ABAP subsection
10.1
Iterative
10.2
Impure Functional
11
ACL2
12
Action!
13
ActionScript
14
Ada
Toggle Ada subsection
14.1
Recursive
14.2
Iterative, build-in integers
14.3
Iterative, long integers
14.4
Fast method using fast matrix exponentiation
15
AdvPL
Toggle AdvPL subsection
15.1
Recursive
15.2
Iterative
16
Agda
17
Aime
18
ALGOL 60
19
ALGOL 68
Toggle ALGOL 68 subsection
19.1
Analytic
19.2
Iterative
19.3
Recursive
19.4
Generative
19.5
Array (Table) Lookup
20
ALGOL W
21
ALGOL-M
Toggle ALGOL-M subsection
21.1
Iterative
21.2
Naively recursive
22
Alore
23
Amazing Hopper
24
AntLang
25
Apex
26
APL
Toggle APL subsection
26.1
Naive Recursive
26.2
Array
26.3
Analytic
27
AppleScript
Toggle AppleScript subsection
27.1
Imperative
27.2
Functional
28
Arendelle
29
ArkScript
30
ARM Assembly
31
ArnoldC
32
Arturo
Toggle Arturo subsection
32.1
Recursive
32.2
Iterative
33
AsciiDots
34
ATS
Toggle ATS subsection
34.1
Recursive
34.2
Iterative
34.3
Iterative and Verified
34.4
Matrix-based
35
AutoHotkey
Toggle AutoHotkey subsection
35.1
Iterative
35.2
Recursive and iterative
36
AutoIt
Toggle AutoIt subsection
36.1
Iterative
36.2
Recursive
37
AWK
38
Axe
39
Babel
40
bash
Toggle bash subsection
40.1
Iterative
40.2
Recursive
41
BASIC
Toggle BASIC subsection
41.1
ANSI BASIC
41.2
Applesoft BASIC
41.2.1
Iterative
41.2.2
Binet's Formula
41.3
BASIC256
41.4
BBC BASIC
41.5
bootBASIC
41.6
CBASIC
41.7
Chipmunk Basic
41.8
Commodore BASIC
41.9
Craft Basic
41.10
FreeBASIC
41.11
FTCBASIC
41.12
GFA Basic
41.13
GW-BASIC
41.13.1
Iterative
41.13.2
Binet formula
41.14
Integer BASIC
41.15
IS-BASIC
41.16
Liberty BASIC
41.16.1
Iterative/Recursive
41.16.2
Iterative/Negative
41.17
Microsoft Small Basic
41.17.1
Iterative
41.17.2
Binet's Formula
41.18
Minimal BASIC
41.19
MoonRock
41.20
MSX Basic
41.21
Palo Alto Tiny BASIC
41.22
PowerBASIC
41.23
PureBasic
41.23.1
Macro based calculation
41.23.2
Recursive
41.23.3
Recursive & optimized with a static hash table
41.24
QB64
41.25
QBasic
41.25.1
Iterative
41.25.2
Recursive
41.25.3
Array (Table) Lookup
41.26
Quite BASIC
41.27
Run BASIC
41.28
S-BASIC
41.29
Sinclair ZX81 BASIC
41.29.1
Analytic
41.29.2
Iterative
41.29.3
Tail recursive
41.30
smart BASIC
41.31
Softbridge BASIC
41.31.1
Iterative
41.32
TI-83 BASIC
41.32.1
Sequence table
41.32.2
Iterative
41.32.3
Binet's formula
41.33
TI-89 BASIC
41.33.1
Recursive
41.33.2
Iterative
41.34
Tiny BASIC
41.35
True BASIC
41.36
VBA
41.37
VBScript
41.37.1
Non-recursive, object oriented, generator
41.37.1.1
Class Definition:
41.37.1.2
Invocation:
41.38
Visual Basic
41.39
Visual Basic .NET
41.39.1
Iterative
41.39.2
Recursive
41.39.3
BigInteger
41.39.4
BigInteger, speedier method
41.40
Xojo
41.41
Yabasic
41.41.1
Iterative
41.41.2
Recursive
41.41.3
Analytic
41.41.4
Binet's formula
41.42
ZX Spectrum Basic
41.42.1
Iterative
41.42.2
Analytic
42
Batch File
43
Battlestar
44
bc
Toggle bc subsection
44.1
iterative
45
BCPL
46
beeswax
47
Befunge
48
Binary Lambda Calculus
49
BlitzMax
50
Blue
51
BQN
Toggle BQN subsection
51.1
Recursive
51.2
Iterative
52
Bracmat
Toggle Bracmat subsection
52.1
Recursive
52.2
Iterative
53
Brainf***
54
Brat
Toggle Brat subsection
54.1
Recursive
54.2
Tail Recursive
54.3
Memoization
55
Bruijn
56
Burlesque
57
C
Toggle C subsection
57.1
Recursive
57.2
Iterative
57.3
Analytic
57.4
Generative
57.5
Fast method for a single large value
58
C#
Toggle C# subsection
58.1
Recursive
58.2
Tail-Recursive
58.3
Iterative
58.4
Iterative
58.5
Eager-Generative
58.6
Lazy-Generative
58.7
Analytic
58.8
Matrix
58.9
Array (Table) Lookup
58.10
Arbitrary Precision
58.11
Shift PowerMod
59
C++
Toggle C++ subsection
59.1
Using Zeckendorf Numbers
59.2
Using Standard Template Library
60
Calcscript
61
Cat
62
Chapel
63
Chef
64
Chez Scheme
65
Clio
66
Clojure
Toggle Clojure subsection
66.1
Lazy Sequence
66.2
Iterative
66.3
Doubling Algorithm (Fast)
66.4
Recursive
66.5
Using core.async
67
CLU
68
CMake
69
COBOL
Toggle COBOL subsection
69.1
Iterative
69.2
Recursive
70
CoffeeScript
Toggle CoffeeScript subsection
70.1
Analytic
70.2
Iterative
70.3
Recursive
71
Comefrom0x10
Toggle Comefrom0x10 subsection
71.1
Iterative
72
Common Lisp
Toggle Common Lisp subsection
72.1
Iterative
72.2
Recursive
72.3
Alternate solution
72.4
Solution with methods and eql specializers
72.5
List-based iterative
72.6
List-based recursive
73
Computer/zero Assembly
74
Corescript
75
Cowgol
76
Crystal
Toggle Crystal subsection
76.1
Recursive
76.2
Iterative
76.3
Tail Recursive
76.4
Analytic
77
D
Toggle D subsection
77.1
Matrix Exponentiation Version
77.2
Faster Version
78
Dart
Toggle Dart subsection
78.1
Basic
78.2
Iterative Approach
78.3
Recursive Function
78.4
Generator Function
79
Datalog
80
DBL
81
Dc
82
Delphi
Toggle Delphi subsection
82.1
Iterative
82.2
Recursive
82.3
Matrix
83
DIBOL-11
84
DuckDB
Toggle DuckDB subsection
84.1
Part 1: Recursive CTE
84.2
Part 2: Analytic formula
84.3
Part 3: Recursive CTE for PostgreSQL
85
DWScript
86
Dyalect
87
E
88
EasyLang
89
EchoLisp
90
ECL
Toggle ECL subsection
90.1
Analytic
91
EDSAC order code
92
Eiffel
93
Ela
94
Elena
Toggle Elena subsection
94.1
Alternative version using yieldable method
95
Elixir
96
Elm
97
Emacs Lisp
Toggle Emacs Lisp subsection
97.1
version 1
97.2
version 2
98
Erlang
Toggle Erlang subsection
98.1
Recursive
98.2
Iterative
98.3
Iterative 2
99
ERRE
100
Euphoria
Toggle Euphoria subsection
100.1
'Recursive' version
100.2
'Iterative' version
100.3
'Tail recursive' version
100.4
'Paper tape' version
101
Excel
Toggle Excel subsection
101.1
LAMBDA
102
F#
103
Factor
Toggle Factor subsection
103.1
Combinatory
103.2
Iterative
103.3
Recursive
103.4
Tail-Recursive
103.5
Matrix
104
Falcon
Toggle Falcon subsection
104.1
Iterative
104.2
Recursive
104.3
Tail Recursive
105
FALSE
106
Fancy
107
Fantom
108
Fe
109
Fermat
110
Fexl
111
Fish
112
FOCAL
113
Forth
114
Fortran
Toggle Fortran subsection
114.1
FORTRAN IV
114.2
FORTRAN 90
114.3
Recursive
114.4
Iterative
115
Free Pascal
116
Frink
117
FRISC Assembly
118
FunL
Toggle FunL subsection
118.1
Recursive
118.2
Tail Recursive
118.3
Lazy List
118.4
Iterative
118.5
Binet's Formula
118.6
Matrix Exponentiation
119
Futhark
Toggle Futhark subsection
119.1
Iterative
120
FutureBasic
Toggle FutureBasic subsection
120.1
Iterative
120.2
Recursive
121
Fōrmulæ
Toggle Fōrmulæ subsection
121.1
Recursive
121.2
Iterative (3 variables)
121.3
Iterative (2 variables)
121.4
Iterative, using a list
121.5
Using matrix multiplication
121.6
Divide and conquer
121.7
Closed-form
122
GAP
123
Gecho
124
Gleam
Toggle Gleam subsection
124.1
Recursive
124.2
Iterative
125
GML
126
Go
Toggle Go subsection
126.1
Recursive
126.2
Iterative
126.3
Iterative using a closure
126.4
Using a goroutine and channel
127
Golfscript
128
Grain
Toggle Grain subsection
128.1
Recursive
128.2
Iterative
128.3
Iterative with Buffer
129
Groovy
Toggle Groovy subsection
129.1
Recursive
129.2
Iterative
129.3
Analytic
130
Harbour
Toggle Harbour subsection
130.1
Recursive
130.2
Iterative
131
Haskell
Toggle Haskell subsection
131.1
Analytic
131.2
Recursive
131.3
Recursive with Memoization
131.4
Recursive with Memoization using memoized library
131.5
Iterative
131.5.1
With lazy lists
131.5.2
As a fold
131.5.3
As an unfold
131.6
With matrix exponentiation
131.7
Generating Functions
131.8
Escardó-Oliva Functional
131.9
With recurrence relations
132
Haxe
Toggle Haxe subsection
132.1
Iterative
132.2
As Iterator
133
HicEst
134
Hobbes
135
Hoon
136
Hope
Toggle Hope subsection
136.1
Recursive
136.2
Tail-recursive
136.3
With lazy lists
137
Hy
138
IBM 1620 SPS
139
Icon and Unicon
140
IDL
Toggle IDL subsection
140.1
Recursive
140.2
Iterative
140.3
Analytic
141
Idris
Toggle Idris subsection
141.1
Analytic
141.2
Recursive
141.3
Iterative
141.4
Lazy
142
J
Toggle J subsection
142.1
Recursive
142.2
Iterative
143
Jactl
144
Java
Toggle Java subsection
144.1
Iterative
144.2
Recursive
144.3
Caching-recursive
144.4
Analytic
144.5
Tail-recursive
144.6
Streams
145
JavaScript
Toggle JavaScript subsection
145.1
ES5
145.1.1
Recursive
145.2
Iterative
145.2.1
Memoization
145.2.2
Y-Combinator
145.2.3
Generators
145.3
ES6
145.3.1
Memoized
146
Joy
Toggle Joy subsection
146.1
Recursive
146.2
Iterative
147
jq
Toggle jq subsection
147.1
Recursive
147.2
Tail Recursive
147.3
Binet's Formula
147.4
Generator
148
Julia
Toggle Julia subsection
148.1
Recursive
148.2
Iterative
148.3
Matrix form
149
K
Toggle K subsection
149.1
Recursive
149.2
Recursive with memoization
149.3
Analytic
149.4
Iterative
149.5
Sequence to n
150
Kabap
Toggle Kabap subsection
150.1
Sequence to n
151
Klingphix
152
Kotlin
153
L++
154
LabVIEW
155
Lambdatalk
156
Lang
Toggle Lang subsection
156.1
Iterative
156.2
Recursive
157
Lang5
158
langur
159
Lasso
160
Latitude
Toggle Latitude subsection
160.1
Recursive
160.2
Memoization
161
Lean
162
LFE
Toggle LFE subsection
162.1
Recursive
162.2
Iterative
163
Lingo
Toggle Lingo subsection
163.1
Recursive
163.2
Iterative
163.3
Analytic
164
Lisaac
165
LiveCode
166
LLVM
167
Logo
168
LOLCODE
169
LSL
170
Lua
Toggle Lua subsection
170.1
Recursive
170.2
Pedantic Recursive
170.3
Tail Recursive
170.4
Table Recursive
170.5
Table Recursive 2
170.6
Iterative
171
Luck
172
Lush
173
M2000 Interpreter
174
M4
175
MAD
176
Maple
177
Mathematica / Wolfram Language
178
MATLAB
Toggle MATLAB subsection
178.1
Matrix
178.2
Iterative
178.3
Dramadah Matrix Method
178.4
Tartaglia/Pascal Triangle Method
179
Maxima
180
MAXScript
Toggle MAXScript subsection
180.1
Iterative
180.2
Recursive
181
Mercury
Toggle Mercury subsection
181.1
fib.m
181.2
Iterative algorithm
181.3
Memoization
182
Metafont
183
min
184
MiniScript
185
MiniZinc
186
MIPS Assembly
187
Mirah
188
МК-61/52
189
ML
Toggle ML subsection
189.1
Standard ML
189.1.1
Tail Recursion
189.1.2
Recursion
189.2
MLite
189.2.1
Recursion
190
ML/I
191
Modula-2
192
Modula-3
Toggle Modula-3 subsection
192.1
Recursive
192.2
Iterative (with negatives)
193
Monicelli
194
MontiLang
195
MUMPS
Toggle MUMPS subsection
195.1
Iterative
196
Nanoquery
Toggle Nanoquery subsection
196.1
Iterative
197
Nemerle
Toggle Nemerle subsection
197.1
Recursive
197.2
Tail Recursive
198
NESL
Toggle NESL subsection
198.1
Recursive
199
NetRexx
200
NewLISP
Toggle NewLISP subsection
200.1
Iterative
200.2
Recursive
200.3
Matrix multiplication
200.4
With a stack
201
NGS
Toggle NGS subsection
201.1
Iterative
202
Nial
Toggle Nial subsection
202.1
Iterative
202.2
Recursive
202.3
Matrix
203
Nim
Toggle Nim subsection
203.1
Analytic
203.2
Iterative
203.3
Recursive
203.4
Tail-recursive
203.5
Continuations
204
Nix
205
Nu
206
Oberon-2
207
Objeck
Toggle Objeck subsection
207.1
Recursive
208
Objective-C
Toggle Objective-C subsection
208.1
Recursive
208.2
Iterative
209
OCaml
Toggle OCaml subsection
209.1
Tail-Recursive (fast)
209.2
Iterative
209.3
Recursive
209.4
Arbitrary Precision
209.5
O(log(n)) with arbitrary precision
209.6
Matrix Exponentiation
210
Octave
Toggle Octave subsection
210.1
Recursive
210.2
Iterative
210.3
Analytic
210.4
Tail Recursive
211
Odin
212
Oforth
213
Ol
214
Onyx (wasm)
215
OPL
216
Order
Toggle Order subsection
216.1
Recursive
216.2
Memoization
217
Oz
Toggle Oz subsection
217.1
Iterative
217.2
Recursive
217.3
Tail-recursive
217.4
Lazy-recursive
218
PARI/GP
Toggle PARI/GP subsection
218.1
Built-in
218.2
Matrix
218.3
Analytic
218.4
Algebraic
218.5
Combinatorial
218.6
Binary powering
218.7
Recursive
218.8
Anonymous recursion
218.9
Memoization
218.10
Iterative
218.11
Trigonometric
218.12
Chebyshev
218.13
Anti-Hadamard matrix
218.14
Testing adjacent bits
218.15
One-by-one
219
ParaCL
220
Pascal
Toggle Pascal subsection
220.1
using FreePascal with GMP lib
220.1.1
============================
220.1.2
============================
220.1.3
============================
220.1.4
============================
220.1.5
============================
220.1.6
============================
220.2
Analytic
220.3
Recursive
220.4
Iterative
220.5
Analytic2
220.6
Doubling (iterative)
221
PascalABC.NET
222
Perl
Toggle Perl subsection
222.1
Iterative
222.2
Recursive
222.3
Modules
222.4
Array accumulation
223
Phix
224
Phixmonti
225
PHP
Toggle PHP subsection
225.1
Iterative
225.2
Recursive
226
Picat
Toggle Picat subsection
226.1
Function
226.2
Array
226.3
Loop
226.4
Formula
226.5
"Lazy lists"
226.6
Generators idiom
226.7
Reversible
227
PicoLisp
Toggle PicoLisp subsection
227.1
Recursive
227.2
Recursive with Cache
227.3
Iterative
227.4
Coroutines
228
Pike
Toggle Pike subsection
228.1
Iterative
228.2
Recursive
229
PIR
230
PL/0
231
PL/I
232
PL/M
233
PL/pgSQL
Toggle PL/pgSQL subsection
233.1
Recursive
233.2
Calculated
233.3
Linear
233.4
Tail recursive
234
PL/SQL
235
Plain English
236
Pluto
237
Pop11
238
PostScript
Toggle PostScript subsection
238.1
Recursive
238.2
Iterative
239
Potion
Toggle Potion subsection
239.1
Recursive
239.2
Iterative
239.3
Matrix based
239.4
Handling negative values
240
PowerShell
Toggle PowerShell subsection
240.1
Iterative
240.2
Recursive
241
Processing
242
Prolog
Toggle Prolog subsection
242.1
Poor man's memoization