Fix std::midpoint for denormal values
authorJonathan Wakely <jwakely@redhat.com>
Mon, 24 Jun 2019 12:09:51 +0000 (13:09 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 24 Jun 2019 12:09:51 +0000 (13:09 +0100)
commita3c8d7fbe29d4ab60cc46196a1376854734a4f8d
tree5443500477c03424be3f577a036c328b5802073c
parentff164b601b75a9aba47edfaa9a215cb376ab055e
Fix std::midpoint for denormal values

* include/std/numeric (midpoint(T, T)): Change implementation for
floating-point types to avoid incorrect rounding of denormals.
* testsuite/26_numerics/midpoint/floating.cc: Add check for correct
rounding with denormals.
* testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
* testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.

From-SVN: r272616
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/numeric
libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc
libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc
libstdc++-v3/testsuite/26_numerics/midpoint/floating.cc