BUGFIX: corrected typo in branching in sqr()