Predefined Functions – sqr

Function name: sqr – Calculate square
Synopsis: sqr(x)

Input data type Output data type
real real
complex complex
quaternion quaternion


sqr(z) is identical to z*z, but sqr(z) can be faster than z*z.

Normally ChaosPro recognizes that z*z can be rewritten by the faster routine sqr(z). But if the argument is a more complex expression, ChaosPro won’t recognize it. Thus don’t write (z+sin(a)*4) * (z+sin(a)*4). Please write it as sqr( z+sin(a)*4 ).