src/main/java/Fibonacci.java
/**
     * Simple 2x2 matrix multiplication with BigIntegers
     * Sets a = a * b
     * @param a initial matrix, and will be return value (modified)
     * @param b multiplier (unmodified)
     */
Simple 2x2 matrix multiplication with BigIntegers
Sets a = a * b
@param a initial matrix, and will be return value (modified)
@param b multiplier (unmodified)
Simple 2x2 matrix multiplication with BigIntegers Sets a = a * b @param a initial matrix and will be return value ( modified ) @param b multiplier ( unmodified )
static void multiply(BigInteger[][] a, BigInteger[][] b)
    {
        BigInteger x =  a[0][0].multiply(b[0][0]).add(a[0][1].multiply(b[1][0]));
        BigInteger y =  a[0][0].multiply(b[0][1]).add(a[0][1].multiply(b[1][1]));
        BigInteger z =  a[1][0].multiply(b[0][0]).add(a[1][1].multiply(b[1][0]));
        BigInteger w =  a[1][0].multiply(b[0][1]).add(a[1][1].multiply(b[1][1]));
        a[0][0] = x;
        a[0][1] = y;
        a[1][0] = z;
        a[1][1] = w;
    }
static void multiply ( BigInteger [ ] [ ] a , BigInteger [ ] [ ] b ) { BigInteger x = a [ 0 ] [ 0 ] . multiply ( b [ 0 ] [ 0 ] ) . add ( a [ 0 ] [ 1 ] . multiply ( b [ 1 ] [ 0 ] ) ) ; BigInteger y = a [ 0 ] [ 0 ] . multiply ( b [ 0 ] [ 1 ] ) . add ( a [ 0 ] [ 1 ] . multiply ( b [ 1 ] [ 1 ] ) ) ; BigInteger z = a [ 1 ] [ 0 ] . multiply ( b [ 0 ] [ 0 ] ) . add ( a [ 1 ] [ 1 ] . multiply ( b [ 1 ] [ 0 ] ) ) ; BigInteger w = a [ 1 ] [ 0 ] . multiply ( b [ 0 ] [ 1 ] ) . add ( a [ 1 ] [ 1 ] . multiply ( b [ 1 ] [ 1 ] ) ) ; a [ 0 ] [ 0 ] = x ; a [ 0 ] [ 1 ] = y ; a [ 1 ] [ 0 ] = z ; a [ 1 ] [ 1 ] = w ; }
Simple 2x2 matrix multiplication with BigIntegers
 Sets a = a * b
 @param a initial matrix, and will be return value (modified)
 @param b multiplier (unmodified)
Simple 2x2 matrix multiplication with BigIntegers Sets a = a * b @param a initial matrix and will be return value ( modified ) @param b multiplier ( unmodified )