X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=doc%2Ftutorial%2Fginac.texi;h=abcb90c6fc7bc61582e64cc5231f1a7a5eca2ccd;hp=53cf596990eadd0d32eacd248ce1a50d933ed27e;hb=2565309dd7c38635c191eacf2a4af9b23fc0d310;hpb=5de2047da59ab541288dd8383fd8eed55e6dfd1c diff --git a/doc/tutorial/ginac.texi b/doc/tutorial/ginac.texi index 53cf5969..abcb90c6 100644 --- a/doc/tutorial/ginac.texi +++ b/doc/tutorial/ginac.texi @@ -1316,7 +1316,7 @@ being polynomials in the remaining variables. The method @code{collect()} accomplishes this task. Here is its declaration: @example -ex ex::collect(symbol const & s); +ex ex::collect(const symbol & s); @end example Note that the original polynomial needs to be in expanded form in order @@ -1326,8 +1326,8 @@ coefficients can be checked using the two methods @cindex @code{degree()} @cindex @code{ldegree()} @example -int ex::degree(symbol const & s); -int ex::ldegree(symbol const & s); +int ex::degree(const symbol & s); +int ex::ldegree(const symbol & s); @end example where @code{degree()} returns the highest coefficient and @@ -1677,7 +1677,7 @@ function that is called when one wishes to @code{eval} it. It could look something like this: @example -static ex cos_eval_method(ex const & x) +static ex cos_eval_method(const ex & x) @{ // if (!x%(2*Pi)) return 1 // if (!x%Pi) return -1 @@ -1696,7 +1696,7 @@ lazy we sweep the problem under the rug by calling someone else's function that does so, in this case the one in class @code{numeric}: @example -static ex cos_evalf_method(ex const & x) +static ex cos_evalf_method(const ex & x) @{ return sin(ex_to_numeric(x)); @} @@ -1706,7 +1706,7 @@ Differentiation will surely turn up and so we need to tell @code{sin} how to differentiate itself: @example -static ex cos_diff_method(ex const & x, unsigned diff_param) +static ex cos_diff_method(const ex & x, unsigned diff_param) @{ return cos(x); @}