import checkedint.sticky : smartOp; // use IntFlagPolicy.sticky assert(smartOp.pow(-10, 3) == -1_000); assert(smartOp.pow(16, 4uL) == 65536); assert(smartOp.pow(2, -1) == 0); smartOp.pow(-3, 27); assert(IntFlags.local.clear() == IntFlag.negOver); smartOp.pow(0, -5); assert(IntFlags.local.clear() == IntFlag.div0);
Raise base to the exp power.
Errors that may be signalled if neither input is floating-point: