We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f630a8 commit e280805Copy full SHA for e280805
ext/random/php_random_uint128.h
@@ -81,7 +81,7 @@ static inline uint64_t php_random_pcgoneseq128xslrr64_rotr64(php_random_uint128_
81
v = (num.hi ^ num.lo),
82
s = num.hi >> 58U;
83
84
- return (v >> s) | (v << ((-s) & 63));
+ return (v >> s) | (v << ((~s + 1) & 63));
85
}
86
# else
87
typedef __uint128_t php_random_uint128_t;
@@ -121,7 +121,7 @@ static inline uint64_t php_random_pcgoneseq128xslrr64_rotr64(php_random_uint128_
121
v = ((uint64_t) (num >> 64U)) ^ (uint64_t) num,
122
s = num >> 122U;
123
124
125
126
# endif
127
0 commit comments