Fix FP exception in reference build
authorErik Lindahl <erik@kth.se>
Sun, 16 Aug 2015 11:06:56 +0000 (13:06 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sat, 29 Aug 2015 03:23:52 +0000 (05:23 +0200)
commitda4c91583fc9808150682bed866f24fdf2ee3cfe
treeffffcfcaa4fb7629be661435d968f1748b0bb4eb
parent01f0ad327543deb470ab84f2dd79ed39dd8fed48
Fix FP exception in reference build

The introduction of the r=0 case for a bond in the
complex/nbnxn_rzero test case in combination with FP exceptions
being enabled lead to an exception being thrown in the bondeds
routine when using the reference build type. Fixed by adding a
check that x>0 and otherwise return zero when NDEBUG is not set.

Change-Id: If93808e42bb671ef3fd35cc145f2c42807e4d65e
src/gromacs/gmxlib/copyrite.cpp
src/gromacs/math/vec.h