(no commit message)
authorlkcl <lkcl@web>
Sun, 24 Apr 2022 20:47:51 +0000 (21:47 +0100)
committerIkiWiki <ikiwiki.info>
Sun, 24 Apr 2022 20:47:51 +0000 (21:47 +0100)
openpower/sv/biginteger/analysis.mdwn

index 567975d5ac610f9e5daa99de746eb0f8ede5a1e4..c77a7a8598c2502910c1f0afebb6953483c91e58 100644 (file)
@@ -368,3 +368,13 @@ there is no reason why it should not be adapted to Fixed Point.
 In this way a Scalar Integer divide can be performed in the same
 time-order as Newton-Raphson, using two hardware multipliers
 and a subtract.
+
+```
+        k = 0; // the case of a
+        for (j = m - 1; j >= 0; j--)
+        {                                 // single-digit
+            uint64_t dig2 = (k * b + u[j]);
+            q[j] = dig2 / v[0]; // divisor here.
+            k = dig2 % v[0]; // modulo bak into next loop
+        }
+```