function that computes quadruple