Recursive evaluation of the squared L2 norm of a rational function