public static function tan($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $d = cos($z->x)*cos($z->x) + sinh($z->y)*sinh($z->y);
        return static::create(sin($z->x)*cos($z->x)/$d, sinh($z->y)*cosh($z->y)/$d);
    }
public static function tan($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $d = cos($z->x)*cos($z->x) + sinh($z->y)*sinh($z->y);
        return static::create(sin($z->x)*cos($z->x)/$d, sinh($z->y)*cosh($z->y)/$d);
    }
public static function tan ( $ z ) { if ( ! ( $ z instanceof Complex ) ) $ z = static :: parse ( $ z ) ; $ d = cos ( $ z -> x ) * cos ( $ z -> x ) + sinh ( $ z -> y ) * sinh ( $ z -> y ) ; return static :: create ( sin ( $ z -> x ) * cos ( $ z -> x ) / $ d , sinh ( $ z -> y ) * cosh ( $ z -> y ) / $ d ) ; }
complex tangent function

Complex::tan($z) computes and returns tan($z)


@param mixed $z (Complex, or parsable to Complex)
@retval Complex
complex tangent function