[libcxx-commits] [PATCH] D60371: Add lerp function to cmath (P0811R3)

S. B. Tam via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 14 22:21:11 PDT 2019


cpplearner added a comment.

As mentioned in https://math.stackexchange.com/questions/907327/accurate-floating-point-linear-interpolation, given

  double a = 4000;
  double t = 0x1.b2f3db7800a39p-2;

`lerp(a,a,t) != a`. This does not conform to the requirement "If isfinite(t) && a == b, then r == a."


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D60371





More information about the libcxx-commits mailing list