[llvm-commits] CVS: llvm/lib/Support/APInt.cpp

Reid Spencer reid at x10sys.com
Thu Mar 1 18:01:51 PST 2007



Changes in directory llvm/lib/Support:

APInt.cpp updated: 1.65 -> 1.66
---
Log message:

Add a FIXME


---
Diffs of the changes:  (+3 -0)

 APInt.cpp |    3 +++
 1 files changed, 3 insertions(+)


Index: llvm/lib/Support/APInt.cpp
diff -u llvm/lib/Support/APInt.cpp:1.65 llvm/lib/Support/APInt.cpp:1.66
--- llvm/lib/Support/APInt.cpp:1.65	Thu Mar  1 19:19:42 2007
+++ llvm/lib/Support/APInt.cpp	Thu Mar  1 20:01:34 2007
@@ -1239,6 +1239,9 @@
   }
 
   // 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))






More information about the llvm-commits mailing list