Simplify computations of estimateSquaredNorm
Fix compiler warning