Skip to content

Commit

Permalink
desp
Browse files Browse the repository at this point in the history
  • Loading branch information
autoih committed Oct 8, 2019
1 parent 07e1c09 commit 1c9218b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tensorflow/compiler/xla/client/lib/math.cc
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,10 @@ XlaOp ErfInv(XlaOp x) {
0.00943887047f, 1.00167406f, 2.83297682f};

auto one = ScalarLike(x, 1.0);
// Compute logarithm of (1+arg). (This function is more precise than
// the expression std::log(1+arg) if arg is close to zero.)
// Compute logarithm of (1+arg) using log1p(arg) which is more
// precise than log(1+arg) when arg is close to zero.
// See ref. https://en.cppreference.com/w/cpp/numeric/math/log1p

auto w = -Log1p(- x * x);

auto lt = Lt(w, ScalarLike(x, 5.0));
Expand Down

0 comments on commit 1c9218b

Please sign in to comment.