parameters: (x)
return_statement: return 0.5 * y
docstring: Implements ndtr core logic.
docstring_summary: Implements ndtr core logic.
docstring_tokens: Implements ndtr core logic .
function: def _ndtr(x):
    """Implements ndtr core logic."""
    half_sqrt_2 = constant_op.constant(
        0.5 * np.sqrt(2.), dtype=x.dtype, name="half_sqrt_2")
    w = x * half_sqrt_2
    z = math_ops.abs(w)
    y = array_ops.where_v2(
        math_ops.less(z, half_sqrt_2), 1. + math_ops.erf(w),
        array_ops.where_v2(
            math_ops.greater(w, 0.), 2. - math_ops.erfc(z), math_ops.erfc(z)))
    return 0.5 * y
function_tokens: def _ndtr ( x ) : half_sqrt_2 = constant_op . constant ( 0.5 * np . sqrt ( 2. ) , dtype = x . dtype , name = "half_sqrt_2" ) w = x * half_sqrt_2 z = math_ops . abs ( w ) y = array_ops . where_v2 ( math_ops . less ( z , half_sqrt_2 ) , 1. + math_ops . erf ( w ) , array_ops . where_v2 ( math_ops . greater ( w , 0. ) , 2. - math_ops . erfc ( z ) , math_ops . erfc ( z ) ) ) return 0.5 * y