X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=doc%2Ftutorial%2Fginac.texi;h=81bfb7f7b4725b573b2fcf39f87026a5fd72d75b;hp=4794837657af188b83c7b9ce68097b2ee01bcb8d;hb=307c6f9e8ad1d0545ffc17f6bec024a4c10b98c0;hpb=36c5241d290222f71d501b253e3bbe3097221645 diff --git a/doc/tutorial/ginac.texi b/doc/tutorial/ginac.texi index 47948376..81bfb7f7 100644 --- a/doc/tutorial/ginac.texi +++ b/doc/tutorial/ginac.texi @@ -4437,7 +4437,10 @@ function that does so, in this case the one in class @code{numeric}: @example static ex cos_evalf(const ex & x) @{ - return cos(ex_to(x)); + if (is_a(x)) + return cos(ex_to(x)); + else + return cos(x).hold(); @} @end example