*pr = -(int64_t)r;
} else if (r == ABS_INT64_MIN) {
/* This never happens if INT64_MAX == ABS_INT64_MIN, e.g.
- * on ones'-complement system. */
+ * on ones' complement system. */
*pr = (int64_t)(0 - r);
} else {
ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
if (r < 0) {
/* Most obvious '-r' triggers undefined behaviour for most
* common INT64_MIN. Even though below '0 - (uint64_t)r' can
- * appear two's-complement centric, it does produce correct/
- * expected result even on one's-complement. This is because
+ * appear two's complement centric, it does produce correct/
+ * expected result even on ones' complement. This is because
* cast to unsigned has to change bit pattern... */
off = asn1_put_uint64(tbuf, 0 - (uint64_t)r);
a->type |= V_ASN1_NEG;
* Doubles |b|, which is 16 bytes representing an element
* of GF(2**128) modulo the irreducible polynomial
* x**128 + x**7 + x**2 + x + 1.
- * Assumes two's-complement arithmetic
+ * Assumes two's complement arithmetic
*/
static ossl_inline void siv128_dbl(SIV_BLOCK *b)
{
# define __MAXINT__(T) ((T) ((((T) 1) << ((sizeof(T) * CHAR_BIT) - 1)) ^ __MAXUINT__(T)))
# define __MININT__(T) (-__MAXINT__(T) - 1)
-# elif (-1 & 3) == 0x02 /* One's complement */
+# elif (-1 & 3) == 0x02 /* Ones' complement */
# define __MAXUINT__(T) (((T) -1) + 1)
# define __MAXINT__(T) ((T) ((((T) 1) << ((sizeof(T) * CHAR_BIT) - 1)) ^ __MAXUINT__(T)))
* Even though sizeof(SOCKET) is 8, it's safe to cast it to int, because
* the value constitutes an index in per-process table of limited size
* and not a real pointer. And we also depend on fact that all processors
- * Windows run on happen to be two's-complement, which allows to
+ * Windows run on happen to be two's complement, which allows to
* interchange INVALID_SOCKET and -1.
*/
# define socket(d,t,p) ((int)socket(d,t,p))
*
* block = 0
* for k: 1 -> K
- * block += s[N(k-1)..(N-1)k] (one's complement addition)
+ * block += s[N(k-1)..(N-1)k] (ones' complement addition)
*
* Optimizing for space we compute:
* for each l in L-1 -> 0:
{ 0xffffffffffffffffULL, "%jx", "ffffffffffffffff" },
{ 0x8000000000000000ULL, "%ju", "9223372036854775808" },
/*
- * These tests imply two's-complement, but it's the only binary
+ * These tests imply two's complement, but it's the only binary
* representation we support, see test/sanitytest.c...
*/
{ 0x8000000000000000ULL, "%ji", "-9223372036854775808" },