bn_exp.c: further optimizations using more ideas from