aboutsummaryrefslogtreecommitdiffstats
path: root/libj2.7
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-02-12 13:45:48 +0100
committerMattias Andrée <m@maandree.se>2026-02-12 13:45:48 +0100
commit8b1e9c4dd1fd12e3b85750a5c0044b54ced216c7 (patch)
treefbf6b79555576e9005eeb84c0b605985a27fa714 /libj2.7
parentlibj2_j2i_divmod_j2i_to_j2i: test overflow edge case (diff)
downloadlibj2-1.2.tar.gz
libj2-1.2.tar.bz2
libj2-1.2.tar.xz
Add subtraction and addition with carry/borrow and add abs_diff1.2
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--libj2.737
1 files changed, 37 insertions, 0 deletions
diff --git a/libj2.7 b/libj2.7
index ae0cccc..2dfefee 100644
--- a/libj2.7
+++ b/libj2.7
@@ -817,6 +817,15 @@ Calculate the sum of two values, and detect overflow.
.BR libj2_ju_add_j2u_overflow_p (3)
Predict whether adding two values will result in an overflow.
.TP
+.BR libj2_j2i_add_j2i_carry (3),
+.TQ
+.BR libj2_j2i_add_j2i_to_j2i_carry (3),
+.TQ
+.BR libj2_j2u_add_j2u_carry (3),
+.TQ
+.BR libj2_j2u_add_j2u_to_j2u_carry (3)
+Calculate the sum of two values; with overflow carray-over.
+.TP
.BR libj2_j2i_sat_add_j2i (3),
.TQ
.BR libj2_j2i_sat_add_j2i_to_j2i (3),
@@ -932,6 +941,23 @@ Predict whether subtracting a value will result in an overflow.
Predict whether subtracting a value will result in an overflow.
These functions swap the position of the two operands.
.TP
+.BR libj2_j2i_sub_j2i_carry (3),
+.TQ
+.BR libj2_j2i_sub_j2i_to_j2i_carry (3),
+.TQ
+.BR libj2_j2u_sub_j2u_borrow (3),
+.TQ
+.BR libj2_j2u_sub_j2u_to_j2u_borrow (3)
+Calculate the difference between two values; with
+overflow carry-over.
+.TP
+.BR libj2_j2i_rsub_j2i_carry (3),
+.TQ
+.BR libj2_j2u_rsub_j2u_borrow (3)
+Calculate the difference between two values; with
+overflow carry-over. These functions swap the position
+of the two operands.
+.TP
.BR libj2_j2i_sat_sub_j2i (3),
.TQ
.BR libj2_j2i_sat_sub_j2i_to_j2i (3),
@@ -966,6 +992,17 @@ overflow.
Calculate the difference between two values, but saturate on
overflow. These functions swap the position of the two operands.
.TP
+.BR libj2_j2i_abs_diff_j2i_to_j2u (3),
+.TQ
+.BR libj2_j2u_abs_diff_j2u (3),
+.TQ
+.BR libj2_j2u_abs_diff_j2u_to_j2u (3),
+.TQ
+.BR libj2_ju_abs_diff_ji_to_j2u (3),
+.TQ
+.BR libj2_ji_abs_diff_ju_to_j2u (3)
+Calculate the absolute difference between two values.
+.TP
.BR libj2_j2i_mul_j2i (3),
.TQ
.BR libj2_j2i_mul_j2i_to_j2i (3),