Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/int128.h
| Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
| static SECP256K1_INLINE int64_t secp256k1_i128_to_i64(const secp256k1_int128 *a); | static SECP256K1_INLINE int64_t secp256k1_i128_to_i64(const secp256k1_int128 *a); | ||||
| /* Write a signed 64-bit value to r. */ | /* Write a signed 64-bit value to r. */ | ||||
| static SECP256K1_INLINE void secp256k1_i128_from_i64(secp256k1_int128 *r, int64_t a); | static SECP256K1_INLINE void secp256k1_i128_from_i64(secp256k1_int128 *r, int64_t a); | ||||
| /* Compare two 128-bit values for equality. */ | /* Compare two 128-bit values for equality. */ | ||||
| static SECP256K1_INLINE int secp256k1_i128_eq_var(const secp256k1_int128 *a, const secp256k1_int128 *b); | static SECP256K1_INLINE int secp256k1_i128_eq_var(const secp256k1_int128 *a, const secp256k1_int128 *b); | ||||
| /* Tests if r is equal to 2^n. | /* Tests if r is equal to sign*2^n (sign must be 1 or -1). | ||||
| * n must be strictly less than 127. | * n must be strictly less than 127. | ||||
| */ | */ | ||||
| static SECP256K1_INLINE int secp256k1_i128_check_pow2(const secp256k1_int128 *r, unsigned int n); | static SECP256K1_INLINE int secp256k1_i128_check_pow2(const secp256k1_int128 *r, unsigned int n, int sign); | ||||
| #endif | #endif | ||||
| #endif | #endif | ||||