Commented exponent algorithm