Avoid too precise tests with float datatypes

See http://bugs.debian.org/578550 for errors fixed by this commit