mul and sqr optimizations
for loop nested within while, the nested loop is fully initialized. Benchmarch shows this to be the fastest in both FF and Chrome.
add cleanup
resovled conflict