Documentation test corrections to remove python2 rounding errors

Turning on doing the tests in the documentation has brought a couple of rounding errors to the fore, which seem to occur only under python2. This PR rewrites those tests such that -- travis willing -- they won't fail.

EDIT -- I now realise these are not python2 specific; doctests are not run under python3 (I think at least).