The function simplify always evaluates sqrt instead of leaving some forms such as sqrt(2) unchanged.
To Reproduce
Simplify the following:
The result is a ConstantNode with value 1.4142135623730951, but I expected a FunctionNode where the sqrt function was not applied.
When its argument is an exact, it feels like sqrt should only simplify to a constant if the result is an exact integer. This would be akin to divide that simplifies fractions, but does not apply division if the result is not an integer.
The function
simplifyalways evaluatessqrtinstead of leaving some forms such assqrt(2)unchanged.To Reproduce
Simplify the following:
The result is a
ConstantNodewith value1.4142135623730951, but I expected aFunctionNodewhere thesqrtfunction was not applied.When its argument is an exact, it feels like
sqrtshould only simplify to a constant if the result is an exact integer. This would be akin todividethat simplifies fractions, but does not apply division if the result is not an integer.