Compute Gauss nodes and weights in O(n) complexity.