Avoid inf in SIMD double sqrt()
commit6d32275cd2948aa93949d819b09d3957a2ef48dd
authorBerk Hess <hess@kth.se>
Sat, 22 Apr 2017 09:41:54 +0000 (22 11:41 +0200)
committerErik Lindahl <erik.lindahl@gmail.com>
Sat, 9 Sep 2017 07:24:12 +0000 (9 09:24 +0200)
tree9d76c7edd74fca4eaa958a534812db5539973a70
parentb83e24351c871122d37df345f03d567421d7dae4
Avoid inf in SIMD double sqrt()

Arguments >0 and <float_min to double precision SIMD sqrt()
would produce inf on many SIMD architectures. Now sqrt() will
return 0 for arguments in this range, which is not fully correct,
but should be unproblematic.
Updated the tests to check for this range and to produce output
that checks all double precision mantissa bits.

Fixes #2164.
Refs #2163.

Change-Id: Ic6d2c6d4102d602703b40e7e8bcc1974a7283f7c
src/gromacs/simd/simd_math.h
src/gromacs/simd/tests/simd_math.cpp