Lines Matching full:integer
47 * @param string|int|array $value value as string or integer or byte array
107 * Gets the integer value as string.
109 * @return string integer value as string
118 * @param GTBigInteger $integer the other GTBigInteger
119 …* @return int 0 if both integers are equal, 1 if current integer is larger than the other, -1 othe…
121 public function comp(GTBigInteger $integer) { argument
122 return bccomp($this->value, $integer->value, 0);
128 * @param GTBigInteger $integer the other GTBigInteger
131 public function add(GTBigInteger $integer) { argument
132 return new GTBigInteger(bcadd($this->value, $integer->value, 0));
136 * Subtracts another GTBigInteger from this integer.
138 * @param GTBigInteger $integer the GTBigInteger to subtract from this one
141 public function sub(GTBigInteger $integer) { argument
142 return new GTBigInteger(bcsub($this->value, $integer->value, 0));
148 * @param GTBigInteger $integer the GTBigInteger to multiply with
151 public function mul(GTBigInteger $integer) { argument
152 return new GTBigInteger(bcmul($this->value, $integer->value, 0));
158 * @param GTBigInteger $integer the GTBigInteger to divide by
161 public function div(GTBigInteger $integer) { argument
162 return new GTBigInteger(bcdiv($this->value, $integer->value, 0));
168 * @param int $integer modulus
178 * @param GTBigInteger $integer power
181 public function pow(GTBigInteger $integer) { argument
182 return new GTBigInteger(bcpow($this->value, $integer->value, 0));
206 * Returns a GTBitInteger whose value is ($this | $integer).
208 * @param GTBigInteger $integer value to be OR'ed with this GTBigInteger
209 * @return GTBigInteger $this | $integer
211 public function bitOr(GTBigInteger $integer) { argument
214 $bytes2 = $integer->toBytes();
231 * Returns a GTBigInteger whose value is ($this ^ $integer).
233 * @param GTBigInteger $integer value to be XOR'ed with this GTBigInteger
234 * @return GTBigInteger $this | $integer
236 public function bitXor(GTBigInteger $integer) { argument
239 $bytes2 = $integer->toBytes();
256 * Returns a GTBigInteger whose value is ($this & $integer).
258 * @param GTBigInteger $integer value to be AND'ed with this GTBigInteger
259 * @return GTBigInteger $this & $integer
261 public function bitAnd(GTBigInteger $integer) { argument
264 $bytes2 = $integer->toBytes();
315 * @return array byte array that contains two's complement representation of this integer
363 // add leading 0x0 so the integer isn't considered negative
375 * Returns a bit string that contains the bits of this integer.
386 * @return string bit string containing the bits of this integer