[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Viuavm-commits] [SCM] Viua VM branch issue/e8113638/math-on-bits update
From: |
git |
Subject: |
[Viuavm-commits] [SCM] Viua VM branch issue/e8113638/math-on-bits updated. v0.9.0-962-gcf6adf9 |
Date: |
Tue, 26 Dec 2017 11:57:26 +0100 (CET) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Viua VM".
The branch, issue/e8113638/math-on-bits has been updated
via cf6adf9442997d13cc9795e9ecf32b15b8489b9e (commit)
from c39ae97bf7713135c6ea8576d81750cf94fb78a9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cf6adf9442997d13cc9795e9ecf32b15b8489b9e
Author: Marek Marecki <address@hidden>
Date: Tue Dec 26 11:54:14 2017 +0100
A test for one more corner case of saturating arithmetic
This time the corner case was: (X - MINIMUM).
Example: (-1) - (-128).
The result should be 127 as it is perfectly in range for 8-bit integers
but due to all operations being saturating (and a wrap-around effect)
taking the two's complement of -128 got us 127 instead of 128.
And since `(-1) - (-128)` is not the same as `(-1) - (-127)` the result
returned in this case was incorrect.
This was fixed by incrementing the final result if the right hand side
of the saturating signed subtraction is the minimum value.
-----------------------------------------------------------------------
Summary of changes:
...ction.asm => minus_one_minimum_subtraction.asm} | 2 +-
src/types/bits.cpp | 30 +++++++++++++++++++---
tests/tests.py | 7 +++++
3 files changed, 35 insertions(+), 4 deletions(-)
copy
sample/asm/bits/arithmetic/signed_saturating/{minimum_minimum_subtraction.asm
=> minus_one_minimum_subtraction.asm} (95%)
hooks/post-receive
--
Viua VM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Viuavm-commits] [SCM] Viua VM branch issue/e8113638/math-on-bits updated. v0.9.0-962-gcf6adf9,
git <=