(ctx, a, z, **kwargs)
r"""
    Gives the parabolic cylinder function `V(a,z)`, which can be
    represented in terms of :func:`~mpmath.pcfu` as

    .. math ::

        V(a,z) = \frac{\Gamma(a+\tfrac{1}{2}) (U(a,-z)-\sin(\pi a) U(a,z)}{\pi}.

    **Examples**

    Wronskian relation between `U` and `V`::

        >>> from sympy.mpmath import *
        >>> mp.dps = 25; mp.pretty = True
        >>> a, z = 2, 3
        >>> pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z)
        0.7978845608028653558798921
        >>> sqrt(2/pi)
        0.7978845608028653558798921
        >>> a, z = 2.5, 3
        >>> pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z)
        0.7978845608028653558798921
        >>> a, z = 0.25, -1
        >>> pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z)
        0.7978845608028653558798921
        >>> a, z = 2+1j, 2+3j
        >>> chop(pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z))
        0.7978845608028653558798921
r"""
    Gives the parabolic cylinder function `V(a,z)`, which can be
    represented in terms of :func:`~mpmath.pcfu` as
r Gives the parabolic cylinder function V ( a z ) which can be represented in terms of : func : ~mpmath . pcfu as
def pcfv(ctx, a, z, **kwargs):
    r"""
    Gives the parabolic cylinder function `V(a,z)`, which can be
    represented in terms of :func:`~mpmath.pcfu` as

    .. math ::

        V(a,z) = \frac{\Gamma(a+\tfrac{1}{2}) (U(a,-z)-\sin(\pi a) U(a,z)}{\pi}.

    **Examples**

    Wronskian relation between `U` and `V`::

        >>> from sympy.mpmath import *
        >>> mp.dps = 25; mp.pretty = True
        >>> a, z = 2, 3
        >>> pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z)
        0.7978845608028653558798921
        >>> sqrt(2/pi)
        0.7978845608028653558798921
        >>> a, z = 2.5, 3
        >>> pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z)
        0.7978845608028653558798921
        >>> a, z = 0.25, -1
        >>> pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z)
        0.7978845608028653558798921
        >>> a, z = 2+1j, 2+3j
        >>> chop(pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z))
        0.7978845608028653558798921

    """
    n, ntype = ctx._convert_param(a)
    z = ctx.convert(z)
    q = ctx.mpq_1_2
    r = ctx.mpq_1_4
    if ntype == 'Q' and ctx.isint(n*2):
        # Faster for half-integers
        def h():
            jz = ctx.fmul(z, -1j, exact=True)
            T1terms = _hermite_param(ctx, -n-q, z, 1)
            T2terms = _hermite_param(ctx, n-q, jz, 1)
            for T in T1terms:
                T[0].append(1j)
                T[1].append(1)
                T[3].append(q-n)
            u = ctx.expjpi((q*n-r)) * ctx.sqrt(2/ctx.pi)
            for T in T2terms:
                T[0].append(u)
                T[1].append(1)
            return T1terms + T2terms
        v = ctx.hypercomb(h, [], **kwargs)
        if ctx._is_real_type(n) and ctx._is_real_type(z):
            v = ctx._re(v)
        return v
    else:
        def h(n):
            w = ctx.square_exp_arg(z, -0.25)
            u = ctx.square_exp_arg(z, 0.5)
            e = ctx.exp(w)
            l = [ctx.pi, q, ctx.exp(w)]
            Y1 = l, [-q, n*q+r, 1], [r-q*n], [], [q*n+r], [q], u
            Y2 = l + [z], [-q, n*q-r, 1, 1], [1-r-q*n], [], [q*n+1-r], [1+q], u
            c, s = ctx.cospi_sinpi(r+q*n)
            Y1[0].append(s)
            Y2[0].append(c)
            for Y in (Y1, Y2):
                Y[1].append(1)
                Y[3].append(q-n)
            return Y1, Y2
        return ctx.hypercomb(h, [n], **kwargs)
def pcfv ( ctx , a , z , * * kwargs ) : n , ntype = ctx . _convert_param ( a ) z = ctx . convert ( z ) q = ctx . mpq_1_2 r = ctx . mpq_1_4 if ntype == 'Q' and ctx . isint ( n * 2 ) : # Faster for half-integers def h ( ) : jz = ctx . fmul ( z , - 1j , exact = True ) T1terms = _hermite_param ( ctx , - n - q , z , 1 ) T2terms = _hermite_param ( ctx , n - q , jz , 1 ) for T in T1terms : T [ 0 ] . append ( 1j ) T [ 1 ] . append ( 1 ) T [ 3 ] . append ( q - n ) u = ctx . expjpi ( ( q * n - r ) ) * ctx . sqrt ( 2 / ctx . pi ) for T in T2terms : T [ 0 ] . append ( u ) T [ 1 ] . append ( 1 ) return T1terms + T2terms v = ctx . hypercomb ( h , [ ] , * * kwargs ) if ctx . _is_real_type ( n ) and ctx . _is_real_type ( z ) : v = ctx . _re ( v ) return v else : def h ( n ) : w = ctx . square_exp_arg ( z , - 0.25 ) u = ctx . square_exp_arg ( z , 0.5 ) e = ctx . exp ( w ) l = [ ctx . pi , q , ctx . exp ( w ) ] Y1 = l , [ - q , n * q + r , 1 ] , [ r - q * n ] , [ ] , [ q * n + r ] , [ q ] , u Y2 = l + [ z ] , [ - q , n * q - r , 1 , 1 ] , [ 1 - r - q * n ] , [ ] , [ q * n + 1 - r ] , [ 1 + q ] , u c , s = ctx . cospi_sinpi ( r + q * n ) Y1 [ 0 ] . append ( s ) Y2 [ 0 ] . append ( c ) for Y in ( Y1 , Y2 ) : Y [ 1 ] . append ( 1 ) Y [ 3 ] . append ( q - n ) return Y1 , Y2 return ctx . hypercomb ( h , [ n ] , * * kwargs )