In reply to Anders Sköllermo.

1) Thanks. Fixed.
2) The point of the article is that the QUAD routine automatically sorts the limits, as it says in the documentation. But you are correct that the subroutine does not respect the usual convention.