public function divide($value)
    {
        if (!$value instanceof self) {
            $value = new self($value, $this->getScale(), false);
        }

        $rawValue = $value->getValue();
        if ($rawValue == 0) {
            throw new InvalidArgumentException('Cannot divide by zero.');
        }

        $newValue = bcdiv($this->getValue(), $rawValue, $this->getScale());

        return $this->assignValue($newValue);
    }