Ejemplo n.º 1
0
def test_MpmathPrinter():
    p = MpmathPrinter()
    assert p.doprint(sign(x)) == 'mpmath.sign(x)'
    assert p.doprint(Rational(1, 2)) == 'mpmath.mpf(1)/mpmath.mpf(2)'
    assert p.doprint(loggamma(x)) == 'mpmath.loggamma(x)'
    assert p.doprint(fresnels(x)) == 'mpmath.fresnels(x)'
    assert p.doprint(fresnelc(x)) == 'mpmath.fresnelc(x)'
Ejemplo n.º 2
0
def test_MpmathPrinter():
    p = MpmathPrinter()
    assert p.doprint(sign(x)) == 'mpmath.sign(x)'
    assert p.doprint(Rational(1, 2)) == 'mpmath.mpf(1)/mpmath.mpf(2)'

    assert p.doprint(S.Exp1) == 'mpmath.e'
    assert p.doprint(S.Pi) == 'mpmath.pi'
    assert p.doprint(S.GoldenRatio) == 'mpmath.phi'
    assert p.doprint(S.EulerGamma) == 'mpmath.euler'
    assert p.doprint(S.NaN) == 'mpmath.nan'
    assert p.doprint(S.Infinity) == 'mpmath.inf'
    assert p.doprint(S.NegativeInfinity) == 'mpmath.ninf'
    assert p.doprint(loggamma(x)) == 'mpmath.loggamma(x)'
Ejemplo n.º 3
0
def test_MpmathPrinter():
    p = MpmathPrinter()
    assert p.doprint(sign(x)) == "mpmath.sign(x)"
    assert p.doprint(Rational(1, 2)) == "mpmath.mpf(1)/mpmath.mpf(2)"

    assert p.doprint(S.Exp1) == "mpmath.e"
    assert p.doprint(S.Pi) == "mpmath.pi"
    assert p.doprint(S.GoldenRatio) == "mpmath.phi"
    assert p.doprint(S.EulerGamma) == "mpmath.euler"
    assert p.doprint(S.NaN) == "mpmath.nan"
    assert p.doprint(S.Infinity) == "mpmath.inf"
    assert p.doprint(S.NegativeInfinity) == "mpmath.ninf"
Ejemplo n.º 4
0
def test_MpmathPrinter():
    p = MpmathPrinter()
    assert p.doprint(sign(x)) == 'mpmath.sign(x)'
    assert p.doprint(Rational(1, 2)) == 'mpmath.mpf(1)/mpmath.mpf(2)'
Ejemplo n.º 5
0
def test_MpmathPrinter():
    p = MpmathPrinter()
    assert p.doprint(sign(x)) == 'mpmath.sign(x)'
    assert p.doprint(Rational(1, 2)) == 'mpmath.mpf(1)/mpmath.mpf(2)'
Ejemplo n.º 6
0
def test_MpmathPrinter():
    p = MpmathPrinter()
    assert p.doprint(sign(x)) == 'mpmath.sign(x)'
Ejemplo n.º 7
0
def test_MpmathPrinter():
    p = MpmathPrinter()
    assert p.doprint(sign(x)) == 'mpmath.sign(x)'