Skip to content

Commit f4f1d53

Browse files
authored
Fixed bug
1 parent 33df079 commit f4f1d53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Maths/Fibonacci.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const matrixExpo = (A, n) => {
146146
const TWO = isBigInt ? 2n : 2
147147

148148
// Just like Binary exponentiation mentioned in ./BinaryExponentiationIterative.js
149-
let result = Identity(A.length) // Identity matrix
149+
let result = Identity((isBigInt ? BigInt : Number)(A.length)) // Identity matrix
150150
while (n > ZERO) {
151151
if (n % TWO !== ZERO) result = matrixMultiply(result, A)
152152
n /= TWO

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy