[libcxx-commits] [PATCH] D61014: Implement std::midpoint for floating point types

Marshall Clow via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 25 05:10:21 PDT 2019


mclow.lists closed this revision.
mclow.lists marked 3 inline comments as done.
mclow.lists added a comment.

Committed as revision 359184



================
Comment at: libcxx/test/support/fp_compare.h:40
+	if (percent == zero) return val == expected;
+	T eps = (percent / 100.0) * std::max(std::abs(val), std::abs(expected));
+
----------------
EricWF wrote:
> Should `100.0` be cast to `T` to avoid promotion?
Done.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61014/new/

https://reviews.llvm.org/D61014





More information about the libcxx-commits mailing list