

@defun
def pcfv(ctx, a, z, **kwargs):
    '\n    Gives the parabolic cylinder function `V(a,z)`, which can be\n    represented in terms of :func:`~mpmath.pcfu` as\n\n    .. math ::\n\n        V(a,z) = \\frac{\\Gamma(a+\\tfrac{1}{2}) (U(a,-z)-\\sin(\\pi a) U(a,z)}{\\pi}.\n\n    **Examples**\n\n    Wronskian relation between `U` and `V`::\n\n        >>> from mpmath import *\n        >>> mp.dps = 25; mp.pretty = True\n        >>> a, z = 2, 3\n        >>> pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z)\n        0.7978845608028653558798921\n        >>> sqrt(2/pi)\n        0.7978845608028653558798921\n        >>> a, z = 2.5, 3\n        >>> pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z)\n        0.7978845608028653558798921\n        >>> a, z = 0.25, -1\n        >>> pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z)\n        0.7978845608028653558798921\n        >>> a, z = 2+1j, 2+3j\n        >>> chop(pcfu(a,z)*diff(pcfv,(a,z),(0,1))-diff(pcfu,(a,z),(0,1))*pcfv(a,z))\n        0.7978845608028653558798921\n\n    '
    (n, ntype) = ctx._convert_param(a)
    z = ctx.convert(z)
    q = ctx.mpq_1_2
    r = ctx.mpq_1_4
    if ((ntype == 'Q') and kwargs.isint((n * 2))):

        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)

dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/functions/orthogonal.py pcfv/VarMisuse@64/620 `ctx`->`kwargs`