|email@example.com <firstname.lastname@example.org>||2019-12-05 06:37:39 +0000|
|email@example.com <firstname.lastname@example.org>||2019-12-05 06:37:39 +0000|
[PATCH v2] Force correct sign for intermediate steps of bigmul
Since y1 is usually smaller than y0, the sign of (x0 - x1) * (y1 - y0) is usually the same as that of (x0 - x1). This isn't always the case, though, especially if y is 2^Large * small. Also, the result of umul should be trimmed, so that we can trust that z0, z1 are trimmed in kmul. Otherwise, if their signs are different, bigadd(z1, z0) may become confused about which has greater magnitude and perform an incorrect subtraction. Since the result of kmul comes from bigadd(), which trims already, we need only trim the result of smallmul to ensure that umul's result is trimmed.
Diffstat (limited to 'support')
0 files changed, 0 insertions, 0 deletions