[libcxx-commits] [PATCH] D71525: [libc++] Fix typo in std::midpoint
Ruslan Baratov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Dec 15 08:34:06 PST 2019
ruslo created this revision.
ruslo added a reviewer: mclow.lists.
Herald added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, ldionne, christof.
Herald added a project: libc++.
Fix typo in std::midpoint
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71525
Files:
libcxx/include/numeric
Index: libcxx/include/numeric
===================================================================
--- libcxx/include/numeric
+++ libcxx/include/numeric
@@ -573,7 +573,7 @@
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
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71525.233969.patch
Type: text/x-patch
Size: 717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20191215/6836ed38/attachment.bin>
More information about the libcxx-commits
mailing list