#2985: changed behavior of root simplification (rootSymbol(a,0) => double.NaN) and added comments for performed simplifications.