diff options
Diffstat (limited to 'libj2_j2i_lsh.3')
| -rw-r--r-- | libj2_j2i_lsh.3 | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libj2_j2i_lsh.3 b/libj2_j2i_lsh.3 index 26c2455..aa89dbd 100644 --- a/libj2_j2i_lsh.3 +++ b/libj2_j2i_lsh.3 @@ -27,6 +27,14 @@ int \fBlibj2_ju_lsh_to_j2u_overflow\fP(uintmax_t \fIa\fP, unsigned \fIb\fP, stru int \fBlibj2_j2u_lsh_overflow_p\fP(const struct libj2_j2u *\fIa\fP, unsigned \fIb\fP); int \fBlibj2_ju_lsh_overflow_p\fP(uintmax_t \fIa\fP, unsigned \fIb\fP); + +void \fBlibj2_j2i_sat_lsh\fP(struct libj2_j2i *\fIa\fP, unsigned \fIb\fP); +void \fBlibj2_j2i_sat_lsh_to_j2i\fP(const struct libj2_j2i *\fIa\fP, unsigned \fIb\fP, struct libj2_j2i *\fIr\fP); +void \fBlibj2_ji_sat_lsh_to_j2i\fP(intmax_t \fIa\fP, unsigned \fIb\fP, struct libj2_j2i *\fIr\fP); + +void \fBlibj2_j2u_sat_lsh\fP(struct libj2_j2u *\fIa\fP, unsigned \fIb\fP); +void \fBlibj2_j2u_sat_lsh_to_j2u\fP(const struct libj2_j2u *\fIa\fP, unsigned \fIb\fP, struct libj2_j2u *\fIr\fP); +void \fBlibj2_ju_sat_lsh_to_j2u\fP(uintmax_t \fIa\fP, unsigned \fIb\fP, struct libj2_j2u *\fIr\fP); .fi .PP Link with @@ -83,6 +91,13 @@ if any discarded bit (any of the .I b most significant bits) was set. .PP +The +.BR sat_lsh -functions +use saturated arithmetics, meaning that the result +will be the maximum representable value on positive +overflow and the minimum representable value on +negative overflow. +.PP The arguments are assumed to be .RI non- NULL . @@ -120,8 +135,14 @@ The .BR libj2_j2i_lsh_to_j2i_overflow (), .BR libj2_ji_lsh_to_j2i_overflow (), .BR libj2_j2i_lsh_overflow_p (), +.BR libj2_ji_lsh_overflow_p (), +.BR libj2_j2i_sat_lsh (), +.BR libj2_j2i_sat_lsh_to_j2i (), +.BR libj2_ji_sat_lsh_to_j2i (), +.BR libj2_j2u_sat_lsh (), +.BR libj2_j2u_sat_lsh_to_j2u (), and -.BR libj2_ji_lsh_overflow_p () +.BR libj2_ju_sat_lsh_to_j2u () functions were added in version 1.1 of .BR libj2 . |
