def make_hankel_h2_vals(): from mpmath import hankel2 nu = [ mpf('0.5'), mpf('1.25'), mpf('1.5'), mpf('1.75'), mpf(2), mpf('2.75'), mpf(5), mpf(10), mpf(20) ] x = [ mpf('0.2'), mpf(1), mpf(2), mpf('2.5'), mpf(3), mpf(5), mpf(10), mpf(50) ] nu, x = zip(*outer(nu, x)) h2 = [hankel2(*vals) for vals in zip(nu, x)] return make_special_vals('hankel_h2_vals', ('nu', nu), ('x', x), ('h2', h2))
def make_hankel_h2_vals(): from mpmath import hankel2 nu = [mpf('0.5'), mpf('1.25'), mpf('1.5'), mpf('1.75'), mpf(2), mpf('2.75'), mpf(5), mpf(10), mpf(20)] x = [mpf('0.2'), mpf(1), mpf(2), mpf('2.5'), mpf(3), mpf(5), mpf(10), mpf(50)] nu, x = zip(*outer(nu, x)) h2 = [hankel2(*vals) for vals in zip(nu, x)] return make_special_vals('hankel_h2_vals', ('nu', nu), ('x', x), ('h2', h2))
def test_hankel2(self): assert_mpmath_equal(sc.hankel2, _exception_to_nan(lambda v, x: mpmath.hankel2(v, x, **HYPERKW)), [Arg(-1e20, 1e20), Arg()])
def test_hankel2(self): assert_mpmath_equal( sc.hankel2, _exception_to_nan(lambda v, x: mpmath.hankel2(v, x, **HYPERKW)), [Arg(-1e20, 1e20), Arg()])
def sph_h2n_bessel(n, z): return hankel2(n + mpf(1)/2, z)*sqrt(pi/(2*z))
def sph_h2n_bessel(n, z): return hankel2(n + mpf(1) / 2, z) * sqrt(pi / (2 * z))