|
3 | 3 | exp, gamma, have_mpfr, have_mpc, DenseMatrix, sin, cos, tan, cot,
|
4 | 4 | csc, sec, asin, acos, atan, acot, acsc, asec, sinh, cosh, tanh, coth,
|
5 | 5 | asinh, acosh, atanh, acoth, Add, Mul, Pow, diff, GoldenRatio,
|
6 |
| - Catalan, EulerGamma, UnevaluatedExpr) |
| 6 | + Catalan, EulerGamma, UnevaluatedExpr, RealDouble) |
7 | 7 | from symengine.lib.symengine_wrapper import (Subs, Derivative, RealMPFR,
|
8 | 8 | ComplexMPC, PyNumber, Function, LambertW, zeta, dirichlet_eta,
|
9 | 9 | KroneckerDelta, LeviCivita, erf, erfc, lowergamma, uppergamma,
|
@@ -515,7 +515,7 @@ def test_zeta():
|
515 | 515 | e1 = sympy.zeta(sympy.Symbol("x"), sympy.Symbol("y"))
|
516 | 516 | e2 = zeta(x, y)
|
517 | 517 | assert sympify(e1) == e2
|
518 |
| - assert e2._sympy_() == e1 |
| 518 | + assert e2._sympy_() == e1 |
519 | 519 |
|
520 | 520 |
|
521 | 521 | @unittest.skipIf(not have_sympy, "SymPy not installed")
|
@@ -796,3 +796,13 @@ def test_construct_dense_matrix():
|
796 | 796 | B = DenseMatrix(A)
|
797 | 797 | assert B.shape == (2, 2)
|
798 | 798 | assert list(B) == [1, 2, 3, 5]
|
| 799 | + |
| 800 | + |
| 801 | +@unittest.skipIf(not have_sympy, "SymPy not installed") |
| 802 | +def test_conv_doubles(): |
| 803 | + f = 4.347249999999999 |
| 804 | + a = sympify() |
| 805 | + assert isinstance(a, RealDouble) |
| 806 | + assert sympify(a._sympy_()) == a |
| 807 | + assert float(a) == f |
| 808 | + assert float(a._sympy_()) == f |
0 commit comments