Optimize a bit by precomputing ex_re^2