BigInteger low = BigInteger.ONE; BigInteger high = BigInteger.ONE; for (int i = 0; i < 500; i++) { System.out.print(low); BigInteger temp = high; high = high.add(low); low = temp; };becomes
BigInteger low = 1; BigInteger high = 1; for (int i = 0; i < 500; i++) { System.out.print(low); BigInteger temp = high; high = high + low; low = temp; };
But these classes are still slow
Not full operator overloading