#2287: Extended constants optimization evaluator to be able to handle the square root symbol and changed optimization of square.