summaryrefslogtreecommitdiffstats
path: root/libcxx/include/numeric
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2019-12-21 01:22:12 -0800
committerFangrui Song <maskray@google.com>2019-12-21 01:26:24 -0800
commit6e8659c351fe3a38ed23f5a5b24c1bc143ea00ed (patch)
treefbea1675385798e2511cc4f38d71439c2c5bd0dd /libcxx/include/numeric
parent60236fedc9bdde70f06c85350b1d10e4dac75e9f (diff)
downloadbcm5719-llvm-6e8659c351fe3a38ed23f5a5b24c1bc143ea00ed.tar.gz
bcm5719-llvm-6e8659c351fe3a38ed23f5a5b24c1bc143ea00ed.zip
[libc++] Fix typo in std::midpoint
Reviewed By: mclow.lists Differential Revision: https://reviews.llvm.org/D71525
Diffstat (limited to 'libcxx/include/numeric')
-rw-r--r--libcxx/include/numeric2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/numeric b/libcxx/include/numeric
index 11a5641bb3b..5ceadc17755 100644
--- a/libcxx/include/numeric
+++ b/libcxx/include/numeric
@@ -573,7 +573,7 @@ midpoint(_Fp __a, _Fp __b) noexcept
return __fp_abs(__a) <= __hi && __fp_abs(__b) <= __hi ? // typical case: overflow is impossible
(__a + __b)/2 : // always correctly rounded
__fp_abs(__a) < __lo ? __a + __b/2 : // not safe to halve a
- __fp_abs(__a) < __lo ? __a/2 + __b : // not safe to halve b
+ __fp_abs(__b) < __lo ? __a/2 + __b : // not safe to halve b
__a/2 + __b/2; // otherwise correctly rounded
}
OpenPOWER on IntegriCloud