public function mod(BigInteger $d) { $value = gmp_mod($this->value, $d->value); return self::createFromGMPResource($value); }