MathLib: improved constness of local variables. No functional change.