[PATCH] D107713: [NFC] Fix the formula for reciprocal calculation.
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 9 01:05:17 PDT 2021
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG53642d5b800c: [NFC] Fix the formula for reciprocal calculation. (authored by LuoYuanke).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107713/new/
https://reviews.llvm.org/D107713
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -22877,7 +22877,7 @@
/// Newton iteration for a function: F(X) is X_{i+1} = X_i - F(X_i)/F'(X_i)
/// For the reciprocal, we need to find the zero of the function:
-/// F(X) = A X - 1 [which has a zero at X = 1/A]
+/// F(X) = 1/X - A [which has a zero at X = 1/A]
/// =>
/// X_{i+1} = X_i (2 - A X_i) = X_i + X_i (1 - A X_i) [this second form
/// does not require additional intermediate precision]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107713.365118.patch
Type: text/x-patch
Size: 643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210809/4f859f52/attachment.bin>
More information about the llvm-commits
mailing list