projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4474d87
)
Add a FIXME
author
Reid Spencer
<rspencer@reidspencer.com>
Fri, 2 Mar 2007 02:01:34 +0000
(
02:01
+0000)
committer
Reid Spencer
<rspencer@reidspencer.com>
Fri, 2 Mar 2007 02:01:34 +0000
(
02:01
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34828
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/APInt.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/APInt.cpp
b/lib/Support/APInt.cpp
index 36f88a24798d48452d62a73a9ead563c613139e0..5ab16448b77f4256fe3c3ea6b3585e1cd0e3c86b 100644
(file)
--- a/
lib/Support/APInt.cpp
+++ b/
lib/Support/APInt.cpp
@@
-1239,6
+1239,9
@@
APInt APInt::sqrt() const {
}
// Make sure we return the closest approximation
+ // FIXME: This still has an off-by-one error in it. Test case:
+ // 190 bits: sqrt(694114394047834196220892040454508646882614255319893124270) =
+ // 26346050824513229049493703285 (not 26346050824513229049493703284)
APInt square(x_old * x_old);
APInt nextSquare((x_old + 1) * (x_old +1));
if (this->ult(square))