def make_hankel_h1_vals(): from mpmath import hankel1 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)) h1 = [hankel1(*vals) for vals in zip(nu, x)] return make_special_vals('hankel_h1_vals', ('nu', nu), ('x', x), ('h1', h1))
def make_hankel_h1_vals(): from mpmath import hankel1 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)) h1 = [hankel1(*vals) for vals in zip(nu, x)] return make_special_vals('hankel_h1_vals', ('nu', nu), ('x', x), ('h1', h1))
def test_hankel1(self): assert_mpmath_equal(sc.hankel1, _exception_to_nan(lambda v, x: mpmath.hankel1(v, x, **HYPERKW)), [Arg(-1e20, 1e20), Arg()])
def test_hankel1(self): assert_mpmath_equal( sc.hankel1, _exception_to_nan(lambda v, x: mpmath.hankel1(v, x, **HYPERKW)), [Arg(-1e20, 1e20), Arg()])
def sph_h1n_bessel(n, z): return hankel1(n + mpf(1)/2, z)*sqrt(pi/(2*z))
def sph_h1n_bessel(n, z): return hankel1(n + mpf(1) / 2, z) * sqrt(pi / (2 * z))