fixed distance test by adding a relative difference of 1e-13
reintroduced macro in isValid instead of functions to have the place of
failure thanks to BOOST_THROW_EXCEPTION
all regression test pass, but the distance test takes 2min10s while all the
other regress test take 6s (bug?)