diff options
author | Pauli <pauli@openssl.org> | 2022-03-15 14:35:30 +1100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2022-03-30 10:10:25 +1100 |
commit | 87639c6bdfa976f673d37c067e28fc89c1dfaa5e (patch) | |
tree | 1aabee6ffd387a45b1cc8bf288accbe17f8c6965 | |
parent | 330ff7e67d2ecc1c298fe7c4347c2109b4a979de (diff) |
document the safe_div_round_up_TYPE functions
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17884)
-rw-r--r-- | doc/internal/man3/OSSL_SAFE_MATH_SIGNED.pod | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/internal/man3/OSSL_SAFE_MATH_SIGNED.pod b/doc/internal/man3/OSSL_SAFE_MATH_SIGNED.pod index 43f9ab34cc..976b866c55 100644 --- a/doc/internal/man3/OSSL_SAFE_MATH_SIGNED.pod +++ b/doc/internal/man3/OSSL_SAFE_MATH_SIGNED.pod @@ -4,7 +4,7 @@ OSSL_SAFE_MATH_SIGNED, OSSL_SAFE_MATH_UNSIGNED, safe_add_TYPE, safe_sub_TYPE, safe_mul_TYPE, safe_div_TYPE, safe_mod_TYPE, -safe_neg_TYPE +safe_div_round_up_TYPE, safe_neg_TYPE - create helper functions to safely perform non-overflowing integer operations =head1 SYNOPSIS @@ -21,6 +21,7 @@ safe_neg_TYPE TYPE safe_mul_TYPE(TYPE a, TYPE b, int *err); TYPE safe_div_TYPE(TYPE a, TYPE b, int *err); TYPE safe_mod_TYPE(TYPE a, TYPE b, int *err); + TYPE safe_div_round_up_TYPE(TYPE a, TYPE b, int *err); TYPE safe_muldiv_TYPE(TYPE a, TYPE b, TYPE c, int *err); TYPE safe_neg_TYPE(TYPE a, int *err); TYPE safe_abs_TYPE(TYPE a, int *err); @@ -49,6 +50,10 @@ safe_div_TYPE() divides I<a> by I<b>. safe_mod_TYPE() calculates the remainder when I<a> is divided by I<b>. +safe_div_round_up_TYPE() calculates I<a> / I<b> + (I<a> % I<b> != 0). +I.e. it computes the quotient of I<a> and I<b> rounding any remainder towards +positive infinity. + safe_muldiv_TYPE() multiplies I<a> and I<b> together and divides the result by I<c>. |