def test_stieltjes(): assert isinstance(stieltjes(x), stieltjes) assert isinstance(stieltjes(x, a), stieltjes) # Zero'th constant EulerGamma assert stieltjes(0) == S.EulerGamma assert stieltjes(0, 1) == S.EulerGamma # Not defined assert stieltjes(nan) == nan assert stieltjes(0, nan) == nan assert stieltjes(-1) == S.ComplexInfinity assert stieltjes(1.5) == S.ComplexInfinity assert stieltjes(z, 0) == S.ComplexInfinity assert stieltjes(z, -1) == S.ComplexInfinity
def test_stieltjes_evalf(): assert abs(stieltjes(0).evalf() - 0.577215664) < 1E-9 assert abs(stieltjes(0, 0.5).evalf() - 1.963510026) < 1E-9 assert abs(stieltjes(1, 2).evalf() + 0.072815845) < 1E-9
def test_stieltjes_evalf(): assert abs(stieltjes(0).evalf() - 0.577215664) < 1e-9 assert abs(stieltjes(0, 0.5).evalf() - 1.963510026) < 1e-9 assert abs(stieltjes(1, 2).evalf() + 0.072815845) < 1e-9