1 | <?php |
||
7 | class Math extends Gmp |
||
8 | { |
||
9 | /** |
||
10 | * @param int|string $first |
||
11 | * @param int|string $second |
||
12 | * @return bool |
||
13 | */ |
||
14 | public function notEq($first, $second) |
||
18 | |||
19 | /** |
||
20 | * @param $first |
||
21 | * @param $second |
||
22 | * @return bool |
||
23 | */ |
||
24 | public function eq($first, $second) |
||
28 | |||
29 | /** |
||
30 | * @param int|string $first |
||
31 | * @param int|string $second |
||
32 | * @return bool |
||
33 | */ |
||
34 | public function greaterThan($first, $second) |
||
38 | |||
39 | /** |
||
40 | * @param int|string $first |
||
41 | * @param int|string $second |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function greatherThanEq($first, $second) |
||
48 | |||
49 | /** |
||
50 | * @param int|string $first |
||
51 | * @param int|string $second |
||
52 | * @return bool |
||
53 | */ |
||
54 | public function lessThan($first, $second) |
||
58 | |||
59 | /** |
||
60 | * @param int|string $first |
||
61 | * @param int|string $second |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function lessThanEq($first, $second) |
||
68 | |||
69 | /** |
||
70 | * @return BinaryMath |
||
71 | */ |
||
72 | 132 | public function getBinaryMath() |
|
76 | |||
77 | /** |
||
78 | * @param $integer |
||
79 | * @return bool |
||
80 | */ |
||
81 | 222 | public function isEven($integer) |
|
85 | |||
86 | /** |
||
87 | * @param int|string $int |
||
88 | * @param int|string $otherInt |
||
89 | * @return string |
||
90 | */ |
||
91 | 864 | public function bitwiseOr($int, $otherInt) |
|
95 | |||
96 | /** |
||
97 | * Similar to gmp_div_qr, return a tuple containing the |
||
98 | * result and the remainder |
||
99 | * |
||
100 | * @param $dividend |
||
101 | * @param integer $divisor |
||
102 | * @return array |
||
103 | */ |
||
104 | 222 | public function divQr($dividend, $divisor) |
|
112 | |||
113 | /** |
||
114 | * @param int|string $compact |
||
115 | * @param bool|false $isNegative |
||
116 | * @param bool|false $isOverflow |
||
117 | * @return int|string |
||
118 | */ |
||
119 | 1260 | public function writeCompact($compact, &$isNegative, &$isOverflow) |
|
141 | |||
142 | /** |
||
143 | * @param int|string $integer |
||
144 | * @return int|string |
||
145 | */ |
||
146 | 108 | public function getLow64($integer) |
|
151 | |||
152 | /** |
||
153 | * @param int|string $integer |
||
154 | * @param bool $fNegative |
||
155 | * @return int|string |
||
156 | */ |
||
157 | 114 | public function parseCompact($integer, $fNegative) |
|
183 | } |
||
184 |