From 307c6f9e8ad1d0545ffc17f6bec024a4c10b98c0 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Tue, 31 Jul 2001 21:28:10 +0000 Subject: [PATCH] - fixed example of evalf-function. --- doc/tutorial/ginac.texi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.44.0