This language bar is your friend. Select your favorite languages!

Idiom #66 Big integer exponentiation

Calculate the result z of x power n, where x is a big integer and n is a positive integer.

#Edit dateEdit SummaryEditor
👁 Δ 330 2019-10-28, 20:50 Maintenance: test reindex programming-idioms.org
👁 Δ 329 2019-10-14, 12:26 [Elixir] Dead link: play.elixirbyexample.com has been down for a while programming-idioms.org
👁 Δ 328 2019-09-27, 03:26 New Csharp implementation by user [Kit Grose] Kit Grose
👁 Δ 327 2019-01-24, 12:05 New JS implementation by user [1.7.4] 1.7.4
👁 Δ 326 2016-11-30, 22:28 [Elixir] +DemoURL. +Warning programming-idioms.org
👁 Δ 325 2016-11-13, 14:34 [Ruby] +DemoURL programming-idioms.org
👁 Δ 324 2016-09-29, 21:24 [Elixir] Exponentiation is in the standard library. Doing it recursively is non-idiomatic. martinsvalin
👁 Δ 323 2016-05-28, 23:57 [Rust] -DocURL dead link programming-idioms.org
👁 Δ 322 2016-02-18, 16:58
👁 Δ 321 2015-11-30, 12:37
👁 Δ 320 2015-11-01, 23:06
👁 Δ 319 2015-11-01, 19:33
👁 Δ 318 2015-11-01, 17:23
👁 Δ 317 2015-11-01, 12:41
👁 Δ 316 2015-11-01, 04:08
👁 Δ 315 2015-11-01, 01:54
👁 Δ 314 2015-10-31, 23:31
👁 Δ 313 2015-10-31, 21:10
👁 Δ 312 2015-10-31, 18:49
👁 Δ 311 2015-10-31, 14:07
👁 Δ 310 2015-10-31, 11:42
👁 Δ 309 2015-10-31, 00:21
👁 Δ 308 2015-10-30, 22:10
👁 Δ 307 2015-10-30, 17:45
👁 Δ 306 2015-10-30, 17:42
👁 Δ 305 2015-10-29, 14:05
👁 Δ 304 2015-10-29, 13:49
👁 Δ 303 2015-10-29, 13:49
👁 Δ 302 2015-10-29, 13:32
👁 Δ 301 2015-10-29, 13:11
👁 Δ 300 2015-10-29, 12:57
👁 Δ 299 2015-10-29, 12:41
👁 Δ 298 2015-10-29, 12:40
👁 Δ 297 2015-10-29, 12:40
👁 Δ 296 2015-10-29, 12:40
👁 Δ 295 2015-10-29, 12:34
👁 Δ 294 2015-10-29, 12:28
👁 Δ 293 2015-10-29, 12:28
👁 Δ 292 2015-10-29, 12:28
👁 Δ 291 2015-10-29, 12:28
👁 Δ 290 2015-10-29, 12:28
👁 Δ 289 2015-10-29, 12:28
👁 Δ 288 2015-10-29, 12:27
👁 Δ 287 2015-10-29, 12:27
👁 Δ 286 2015-10-29, 11:46
👁 Δ 285 2015-10-29, 11:24
👁 Δ 284 2015-10-29, 11:23
👁 Δ 283 2015-10-29, 11:23
👁 Δ 282 2015-10-29, 11:21
👁 Δ 281 2015-10-29, 11:00
👁 Δ 280 2015-10-29, 10:49
👁 Δ 279 2015-10-29, 10:34
👁 Δ 278 2015-10-29, 09:48
👁 Δ 277 2015-10-29, 09:48
👁 Δ 276 2015-10-29, 09:48
👁 Δ 275 2015-10-29, 09:36
👁 Δ 274 2015-10-29, 09:35
👁 Δ 273 2015-10-29, 09:35
👁 Δ 272 2015-10-29, 09:31
👁 Δ 271 2015-10-29, 09:31
👁 Δ 270 2015-10-29, 09:31
👁 Δ 269 2015-10-29, 09:31
👁 Δ 268 2015-10-29, 09:11
👁 Δ 267 2015-10-29, 09:03
👁 Δ 266 2015-10-29, 08:26
👁 Δ 265 2015-10-29, 08:12
👁 Δ 264 2015-10-29, 08:11
👁 Δ 263 2015-10-29, 08:09
👁 Δ 262 2015-10-29, 08:05
👁 Δ 261 2015-10-29, 07:54
👁 Δ 260 2015-10-29, 07:49
👁 Δ 259 2015-10-29, 07:07
👁 Δ 258 2015-10-29, 07:07
👁 Δ 257 2015-10-29, 07:07
👁 Δ 256 2015-10-29, 07:07
👁 Δ 255 2015-10-29, 06:57
👁 Δ 254 2015-10-29, 06:57
👁 Δ 253 2015-10-29, 06:57
👁 Δ 252 2015-10-29, 06:57
👁 Δ 251 2015-10-29, 06:57
👁 Δ 250 2015-10-29, 06:56
👁 Δ 249 2015-10-29, 06:54
👁 Δ 248 2015-10-29, 06:54
👁 Δ 247 2015-10-29, 06:38
👁 Δ 246 2015-10-29, 05:55
👁 Δ 245 2015-10-29, 05:46
👁 Δ 244 2015-10-29, 05:26
👁 Δ 243 2015-10-29, 05:10
👁 Δ 242 2015-10-29, 05:03
👁 Δ 241 2015-10-29, 05:03
👁 Δ 240 2015-10-29, 04:58
👁 Δ 239 2015-10-29, 04:36
👁 Δ 238 2015-10-29, 04:36
👁 Δ 237 2015-10-29, 04:35
👁 Δ 236 2015-10-29, 04:35
👁 Δ 235 2015-10-29, 04:26
👁 Δ 234 2015-10-29, 04:26
👁 Δ 233 2015-10-29, 04:26
👁 Δ 232 2015-10-29, 04:25
👁 Δ 231 2015-10-29, 04:25
👁 Δ 230 2015-10-29, 04:24
👁 Δ 229 2015-10-29, 04:23
👁 Δ 228 2015-10-29, 04:23
👁 Δ 227 2015-10-29, 04:23
👁 Δ 226 2015-10-29, 04:10
👁 Δ 225 2015-10-29, 03:31
👁 Δ 224 2015-10-29, 03:03
👁 Δ 223 2015-10-29, 02:50
👁 Δ 222 2015-10-29, 02:35
👁 Δ 221 2015-10-29, 02:33
👁 Δ 220 2015-10-29, 02:07
👁 Δ 219 2015-10-29, 02:07
👁 Δ 218 2015-10-29, 02:07
👁 Δ 217 2015-10-29, 02:07
👁 Δ 216 2015-10-29, 01:59
👁 Δ 215 2015-10-29, 01:59
👁 Δ 214 2015-10-29, 01:59
👁 Δ 213 2015-10-29, 01:59
👁 Δ 212 2015-10-29, 01:59
👁 Δ 211 2015-10-29, 01:59
👁 Δ 210 2015-10-29, 01:59
👁 Δ 209 2015-10-29, 01:55
👁 Δ 208 2015-10-29, 01:55
👁 Δ 207 2015-10-29, 01:55
👁 Δ 206 2015-10-29, 01:52
👁 Δ 205 2015-10-29, 01:45
👁 Δ 204 2015-10-29, 01:05
👁 Δ 203 2015-10-29, 00:59
👁 Δ 202 2015-10-29, 00:14
👁 Δ 201 2015-10-28, 23:57
👁 Δ 200 2015-10-28, 23:45
👁 Δ 199 2015-10-28, 23:36
👁 Δ 198 2015-10-28, 23:35
👁 Δ 197 2015-10-28, 23:34
👁 Δ 196 2015-10-28, 23:34
👁 Δ 195 2015-10-28, 23:33
👁 Δ 194 2015-10-28, 23:28
👁 Δ 193 2015-10-28, 23:28
👁 Δ 192 2015-10-28, 23:28
👁 Δ 191 2015-10-28, 23:27
👁 Δ 190 2015-10-28, 23:27
👁 Δ 189 2015-10-28, 23:27
👁 Δ 188 2015-10-28, 23:22
👁 Δ 187 2015-10-28, 23:14
👁 Δ 186 2015-10-28, 22:55
👁 Δ 185 2015-10-28, 22:55
👁 Δ 184 2015-10-28, 22:48
👁 Δ 183 2015-10-28, 22:40
👁 Δ 182 2015-10-28, 21:38
👁 Δ 181 2015-10-28, 21:32
👁 Δ 180 2015-10-28, 21:14
👁 Δ 179 2015-10-28, 20:59
👁 Δ 178 2015-10-28, 20:59
👁 Δ 177 2015-10-28, 20:58
👁 Δ 176 2015-10-28, 20:58
👁 Δ 175 2015-10-28, 20:58
👁 Δ 174 2015-10-28, 20:57
👁 Δ 173 2015-10-28, 20:57
👁 Δ 172 2015-10-28, 20:57
👁 Δ 171 2015-10-28, 20:53
👁 Δ 170 2015-10-28, 20:53
👁 Δ 169 2015-10-28, 20:53
👁 Δ 168 2015-10-28, 20:53
👁 Δ 167 2015-10-28, 20:13
👁 Δ 166 2015-10-28, 19:45
👁 Δ 165 2015-10-28, 19:39
👁 Δ 164 2015-10-28, 19:39
👁 Δ 163 2015-10-28, 18:51
👁 Δ 162 2015-10-28, 18:40
👁 Δ 161 2015-10-28, 18:29
👁 Δ 160 2015-10-28, 18:25
👁 Δ 159 2015-10-28, 18:25
👁 Δ 158 2015-10-28, 18:25
👁 Δ 157 2015-10-28, 18:25
👁 Δ 156 2015-10-28, 18:25
👁 Δ 155 2015-10-28, 18:24
👁 Δ 154 2015-10-28, 18:24
👁 Δ 153 2015-10-28, 18:24
👁 Δ 152 2015-10-28, 18:21
👁 Δ 151 2015-10-28, 18:21
👁 Δ 150 2015-10-28, 18:21
👁 Δ 149 2015-10-28, 18:21
👁 Δ 148 2015-10-28, 18:05
👁 Δ 147 2015-10-28, 17:44
👁 Δ 146 2015-10-28, 16:53
👁 Δ 145 2015-10-28, 16:33
👁 Δ 144 2015-10-28, 16:33
👁 Δ 143 2015-10-28, 16:29
👁 Δ 142 2015-10-28, 16:13
👁 Δ 141 2015-10-28, 16:04
👁 Δ 140 2015-10-28, 15:58
👁 Δ 139 2015-10-28, 15:46
👁 Δ 138 2015-10-28, 15:46
👁 Δ 137 2015-10-28, 15:46
👁 Δ 136 2015-10-28, 15:45
👁 Δ 135 2015-10-28, 15:45
👁 Δ 134 2015-10-28, 15:45
👁 Δ 133 2015-10-28, 15:44
👁 Δ 132 2015-10-28, 15:44
👁 Δ 131 2015-10-28, 15:44
👁 Δ 130 2015-10-28, 15:44
👁 Δ 129 2015-10-28, 15:44
👁 Δ 128 2015-10-28, 15:44
👁 Δ 127 2015-10-28, 15:10
👁 Δ 126 2015-10-28, 14:40
👁 Δ 125 2015-10-28, 13:39
👁 Δ 124 2015-10-28, 13:32
👁 Δ 123 2015-10-28, 13:28
👁 Δ 122 2015-10-28, 13:27
👁 Δ 121 2015-10-28, 13:25
👁 Δ 120 2015-10-28, 13:25
👁 Δ 119 2015-10-28, 13:22
👁 Δ 118 2015-10-28, 13:12
👁 Δ 117 2015-10-28, 13:11
👁 Δ 116 2015-10-28, 13:11
👁 Δ 115 2015-10-28, 13:03
👁 Δ 114 2015-10-28, 13:03
👁 Δ 113 2015-10-28, 13:03
👁 Δ 112 2015-10-28, 13:03
👁 Δ 111 2015-10-28, 13:02
👁 Δ 110 2015-10-28, 13:02
👁 Δ 109 2015-10-28, 13:02
👁 Δ 108 2015-10-28, 13:02
👁 Δ 107 2015-10-28, 13:02
👁 Δ 106 2015-10-28, 12:36
👁 Δ 105 2015-10-28, 11:18
👁 Δ 104 2015-10-28, 10:55
👁 Δ 103 2015-10-28, 10:52
👁 Δ 102 2015-10-28, 10:43
👁 Δ 101 2015-10-28, 10:39
👁 Δ 100 2015-10-28, 10:39
👁 Δ 99 2015-10-28, 10:39
👁 Δ 98 2015-10-28, 10:30
👁 Δ 97 2015-10-28, 10:30
👁 Δ 96 2015-10-28, 10:28
👁 Δ 95 2015-10-28, 10:27
👁 Δ 94 2015-10-28, 10:26
👁 Δ 93 2015-10-28, 10:26
👁 Δ 92 2015-10-28, 10:26
👁 Δ 91 2015-10-28, 10:26
👁 Δ 90 2015-10-28, 10:26
👁 Δ 89 2015-10-28, 10:21
👁 Δ 88 2015-10-28, 10:21
👁 Δ 87 2015-10-28, 10:19
👁 Δ 86 2015-10-28, 10:06
👁 Δ 85 2015-10-28, 08:21
👁 Δ 84 2015-10-28, 08:20
👁 Δ 83 2015-10-28, 08:11
👁 Δ 82 2015-10-28, 08:11
👁 Δ 81 2015-10-28, 08:11
👁 Δ 80 2015-10-28, 08:08
👁 Δ 79 2015-10-28, 08:07
👁 Δ 78 2015-10-28, 07:59
👁 Δ 77 2015-10-28, 07:59
👁 Δ 76 2015-10-28, 07:59
👁 Δ 75 2015-10-28, 07:59
👁 Δ 74 2015-10-28, 07:59
👁 Δ 73 2015-10-28, 07:58
👁 Δ 72 2015-10-28, 07:58
👁 Δ 71 2015-10-28, 07:58
👁 Δ 70 2015-10-28, 07:41
👁 Δ 69 2015-10-28, 07:24
👁 Δ 68 2015-10-28, 07:20
👁 Δ 67 2015-10-28, 07:19
👁 Δ 66 2015-10-28, 05:49
👁 Δ 65 2015-10-28, 05:48
👁 Δ 64 2015-10-28, 05:44
👁 Δ 63 2015-10-28, 05:44
👁 Δ 62 2015-10-28, 05:44
👁 Δ 61 2015-10-28, 05:44
👁 Δ 60 2015-10-28, 05:42
👁 Δ 59 2015-10-28, 05:38
👁 Δ 58 2015-10-28, 05:38
👁 Δ 57 2015-10-28, 05:38
👁 Δ 56 2015-10-28, 05:36
👁 Δ 55 2015-10-28, 05:35
👁 Δ 54 2015-10-28, 05:29
👁 Δ 53 2015-10-28, 05:29
👁 Δ 52 2015-10-28, 05:14
👁 Δ 51 2015-10-28, 04:42
👁 Δ 50 2015-10-28, 04:20
👁 Δ 49 2015-10-28, 04:18
👁 Δ 48 2015-10-28, 04:18
👁 Δ 47 2015-10-28, 04:18
👁 Δ 46 2015-10-28, 03:21
👁 Δ 45 2015-10-28, 03:20
👁 Δ 44 2015-10-28, 03:19
👁 Δ 43 2015-10-28, 03:18
👁 Δ 42 2015-10-28, 03:18
👁 Δ 41 2015-10-28, 03:18
👁 Δ 40 2015-10-28, 03:18
👁 Δ 39 2015-10-28, 03:17
👁 Δ 38 2015-10-28, 03:17
👁 Δ 37 2015-10-28, 03:16
👁 Δ 36 2015-10-28, 03:16
👁 Δ 35 2015-10-28, 03:16
👁 Δ 34 2015-10-28, 03:07
👁 Δ 33 2015-10-28, 03:07
👁 Δ 32 2015-10-28, 02:54
👁 Δ 31 2015-10-28, 01:36
👁 Δ 30 2015-10-28, 01:25
👁 Δ 29 2015-10-28, 01:25
👁 Δ 28 2015-10-28, 01:25
👁 Δ 27 2015-10-28, 01:23
👁 Δ 26 2015-10-28, 01:00
👁 Δ 25 2015-10-28, 01:00
👁 Δ 24 2015-10-28, 00:59
👁 Δ 23 2015-10-28, 00:58
👁 Δ 22 2015-10-28, 00:58
👁 Δ 21 2015-10-28, 00:58
👁 Δ 20 2015-10-28, 00:56
👁 Δ 19 2015-10-28, 00:56
👁 Δ 18 2015-10-28, 00:56
👁 Δ 17 2015-10-28, 00:56
👁 Δ 16 2015-10-28, 00:54
👁 Δ 15 2015-10-28, 00:51
👁 Δ 14 2015-10-28, 00:39
👁 Δ 13 2015-10-26, 00:20
👁 Δ 12 2015-09-04, 17:27
👁 Δ 11 2015-09-04, 13:30
👁 Δ 10 2015-09-03, 16:29
👁 Δ 9 2015-08-23, 10:35
👁 Δ 8 2015-08-22, 15:51
👁 Δ 7 2015-08-22, 10:12
👁 Δ 6 2015-08-20, 16:47
👁 Δ 5 2015-07-31, 20:30
👁 Δ 4 2015-05-06, 21:04
👁 Δ 3 2015-04-29, 21:19
👁 Δ 2 2015-04-26, 16:41
1 2015-04-26, 12:05