Performs a power operation with the given number.

@param int|string $value The value to perform a power operation with. Should be an integer (or an int-string).
@return BigNumber
766466
public function pow($value)
    {
        if (!is_int($value) && !ctype_digit($value)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid exponent "%s" provided. Only integers are allowed.',
                $value
            ));
        }

        $newValue = bcpow($this->getValue(), $value, $this->getScale());

        return $this->assignValue($newValue);
    }
1146513
public function setStatus(int $value) : Job
    {

        if ($this->data['status'] !== $value) {
            $this->data['status'] = $value;
            $this->setModified('status');
        }

        return $this;
    }
399215
public function lt($value) {
        $this->rule = $value;
        $this->check_role = 'lt';
        $result = !is_null($this->value) && $this->value < $value;
        $this->checkResult($result);
        return $this;
    }
796972
public function subtract($value)
    {
        if (!$value instanceof self) {
            $value = new self($value, $this->getScale(), false);
        }

        $newValue = bcsub($this->getValue(), $value->getValue(), $this->getScale());

        return $this->assignValue($newValue);
    }
170698
public function setCoreUploadMaxsize($value)
    {
        $this->setFieldName('upload_maxsize');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
778427
public function setAllowMaxSize($value) {
        $value = intval($value);
        if ($value > 0) {
            $this->allowMaxSize = $value;
        } else {
            throw new \BadMethodCallException('given $value must be integer, greater them 0');
        }
        return $this;
    }
1195742
public function writeInt16(int $value): self
    {
        $this->bytes .= Writer::bit16($value);

        return $this;
    }
1008539
public function setCurrent($value)
    {
        if (StaticValidator::validates('number', $value)) {
            $this->current = StaticFilter::filter('number',$value);
            $this->offset = $this->rowsPerPage * ($this->current - 1);
        }
        return $this;
    }
376528
public static function fromValue($value) {
        if (is_int($value)) {
            return new Type(Type::TYPE_LONG);
        } elseif (is_bool($value)) {
            return new Type(Type::TYPE_BOOLEAN);
        } elseif (is_double($value)) {
            return new Type(Type::TYPE_DOUBLE);
        } elseif (is_string($value)) {
            return new Type(Type::TYPE_STRING);
        }
        throw new \RuntimeException("Unknown value type found: " . gettype($value));
    }
1002827
public static function fromString($value)
    {
        if (!\is_string($value)) {
            throw new WrongTaskNumberException('Passed task number is not string.');
        }

        if (!\is_numeric($value)) {
            throw new WrongTaskNumberException("Task number '{$value}' is not numeric.");
        }

        $number = (int) $value;

        return new self($number);
    }
804251
public static function int($value=0, bool $flatten=false) {
		ref\cast::int($value, $flatten);
		return $value;
	}
559721
public static int nextPowerOfTwo (int value)
    {
        return (int)Math.pow(2, Math.ceil(Math.log(value) / Math.log(2)));
    }
968193
public function setGrayscaleSaturation($value)
    {
        if (!is_numeric($value) ||
            $value < 0 || $value > 1
        ) {
            throw new \InvalidArgumentException(
                "The grayscale saturation was invalid. ".
                "Only values in the range [0.0, 1.0] are allowed.");
        }
        $this->grayscaleSaturation = (float)$value;
        return $this;
    }
930793
protected function toNumber($value)
    {
        if (is_numeric($value)) {
            return $value + 0; // cast to number
        }
        if (is_bool($value) || is_null($value)) {
            return (int) $value;
        }
        if ($this->getTypeCheck()->isArray($value) && count($value) === 1) {
            return $this->toNumber(reset($value));
        }

        return $value;
    }
1218529
protected function toInteger($value)
    {
        $numberValue = $this->toNumber($value);
        if (is_numeric($numberValue) && (int) $numberValue == $numberValue) {
            return (int) $numberValue; // cast to number
        }

        return $value;
    }
844705
public function max($value)
    {
        $this->requiresCurrentField();
        $this->newObj['$max'][$this->currentField] = $value;
        return $this;
    }
772197
public function setValue($value) {
        switch ($this->type) {
            case self::TYPE_BOOLEAN:
                $this->value = (bool) $value;
                break;
            case self::TYPE_STRING:
                $this->value = (string) $value;
                break;
        }
        return $this;
    }