public function compute(DecimalNumber $number, $precision, $roundingMode)
    {
        switch ($roundingMode) {
            case self::ROUND_HALF_UP:
                return $this->roundHalfUp($number, $precision);
                break;
            case self::ROUND_CEIL:
                return $this->ceil($number, $precision);
                break;
            case self::ROUND_FLOOR:
                return $this->floor($number, $precision);
                break;
            case self::ROUND_HALF_DOWN:
                return $this->roundHalfDown($number, $precision);
                break;
            case self::ROUND_TRUNCATE:
                return $this->truncate($number, $precision);
                break;
            case self::ROUND_HALF_EVEN:
                return $this->roundHalfEven($number, $precision);
                break;
        }

        throw new \InvalidArgumentException(sprintf("Invalid rounding mode: %s", print_r($roundingMode, true)));
    }