Commit 91f2db3c authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

math/big: test that subVW and addVW work with arbitrary y

Fixes #10525.

Change-Id: I92dc87f5d6db396d8dde2220fc37b7093b772d81
Reviewed-on: https://go-review.googlesource.com/9210Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
parent e589e080
......@@ -196,7 +196,6 @@ func subVV_g(z, x, y []Word) (c Word) {
return
}
// Argument y must be either 0 or 1.
// The resulting carry c is either 0 or 1.
func addVW_g(z, x []Word, y Word) (c Word) {
if use_addWW_g {
......
......@@ -155,6 +155,7 @@ var sumVW = []argVW{
{nat{1}, nat{1}, 0, 0},
{nat{0}, nat{_M}, 1, 1},
{nat{0, 0, 0, 0}, nat{_M, _M, _M, _M}, 1, 1},
{nat{585}, nat{314}, 271, 0},
}
var prodVW = []argVW{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment