avoid division by zero and rounding errors for sin(0.5az)==0.