public static function create($realPart, $imaginaryPart = null)
    {
        if (is_string($realPart)) {
            return self::fromString($realPart);
        }

        if ($realPart instanceof ComplexType) {
            return clone $realPart;
        }

        if (is_null($imaginaryPart)) {
            $imaginaryPart = 0;
        }

        $real = self::convertType($realPart);
        $imaginary = self::convertType($imaginaryPart);
        
        if (self::getRequiredType() == self::TYPE_GMP) {
            // @codeCoverageIgnoreStart
            return new GMPComplexType($real, $imaginary);
            // @codeCoverageIgnoreEnd
        }
        
        return new ComplexType($real, $imaginary);
    }