You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docs/sphinx_documentation/source/Basics.rst
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -646,7 +646,8 @@ numbers can be computed with ``min`` and ``max``, respectively. It supports
646
646
the Heaviside step function, ``heaviside(x1,x2)`` that gives ``0``, ``x2``,
647
647
``1``, for ``x1 < 0``, ``x1 = 0`` and ``x1 > 0``, respectively.
648
648
It supports the Bessel function of the first kind of order ``n``
649
-
``jn(n,x)``, and the Bessel function of the second kind of order ``n`` ``yn(n,x)``. Complete elliptic integrals of the first and second kind, ``comp_ellint_1(k)`` and ``comp_ellint_2(k)``,
649
+
``jn(n,x)``, and the Bessel function of the second kind of order ``n`` ``yn(n,x)``.
650
+
Complete elliptic integrals of the first and second kind, ``comp_ellint_1(k)`` and ``comp_ellint_2(k)``,
650
651
are supported.
651
652
There is ``if(a,b,c)`` that gives ``b`` or ``c`` depending on the value of
652
653
``a``. A number of comparison operators are supported, including ``<``,
@@ -661,9 +662,9 @@ the parser.
661
662
::
662
663
663
664
Parser parser("if(x>a and x<b, sin(x)*cos(y)*if(z<0, 1.0, exp(-z)), .3*c**2)");
664
-
parser.setConstant(a, ...);
665
-
parser.setConstant(b, ...);
666
-
parser.setConstant(c, ...);
665
+
parser.setConstant("a", ...);
666
+
parser.setConstant("b", ...);
667
+
parser.setConstant("c", ...);
667
668
parser.registerVariables({"x","y","z"});
668
669
auto f = parser.compile<3>(); // 3 because there are three variables.
0 commit comments