Simplify IntPower.
Undubiously, special-casing (base = 0.0) and (exponent = 0) has no sense, as the common path already handles this case perfectly.
Dubiously, handling rows of zeros has little sense either: on my computer, present IntPower(x, 1024) is 2 times faster than my version, but IntPower(x, 1023) is 2 times slower, and the average case is equal.
Choose one:
-
intpower.patch (version that avoids last
sqr) -
intpower-clarity.patch (version more clear to read)
Edited by Rika