chibi-scheme/tests
ilammy 8329ee9fd6 Do not lose carry bit in addition edge case
Previous code was losing the carry bit in 'all ones' case, when adata[i]
= bdata[i] = SEXP_UINT_T_MAX, and carry = 1 too. In this case expression
(SEXP_UINT_T_MAX - bdata[i] - carry) overflows and yields an incorrect
value SEXP_UINT_T_MAX which results into carry being incorrectly set to
0 after addition.

We need to avoid the second overflow when calculating the new value of
the carry bit. One way to do this is at first check for the overflow in
(adata[i] + bdata[i]), and then throw in the (previous) carry bit.

I have also given "n" more expressive name and added a comment about
the reason why we need that temporary variable.
2015-03-26 02:30:48 +02:00
..
basic Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
build Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
ffi Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
foreign Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
install Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
memory Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
base64-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
division-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
filesystem-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
flonum-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
generic-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
hash-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
io-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
iset-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
lib-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
loop-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
match-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
md5-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
memoize-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
mime-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
numeric-tests.scm Do not lose carry bit in addition edge case 2015-03-26 02:30:48 +02:00
parse-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
path-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
prime-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
process-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
r5rs-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
r7rs-tests.scm Fixing typo in r7rs-tests. 2015-03-12 22:39:43 +09:00
re-tests.txt Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
record-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
regexp-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
rsa-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
scribble-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
sha-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
show-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
sort-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
srfi-1-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
srfi-2-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
srfi-16-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
srfi-26-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
srfi-27-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
srfi-33-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
srfi-38-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
string-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
system-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
tar-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
term-ansi-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
thread-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
unicode-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
uri-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00
weak-tests.scm Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00