]> www.ginac.de Git - ginac.git/blobdiff - doc/tutorial/ginac.texi
- fixed example of evalf-function.
[ginac.git] / doc / tutorial / ginac.texi
index 13806b5798abfa89233ef892053c9db6bb645715..81bfb7f7b4725b573b2fcf39f87026a5fd72d75b 100644 (file)
@@ -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<numeric>(x));
+    if (is_a<numeric>(x))
+        return cos(ex_to<numeric>(x));
+    else
+        return cos(x).hold();
 @}
 @end example
 
@@ -5602,6 +5605,10 @@ and George Labahn, ISBN 0-7923-9259-0, 1992, Kluwer Academic Publishers, Norwell
 J.H. Davenport, Y. Siret, and E. Tournier, ISBN 0-12-204230-1, 1988, 
 Academic Press, London
 
+@item
+@cite{The Art of Computer Programming, Vol 2: Seminumerical Algorithms},
+D.E. Knuth, ISBN 0-201-89684-2, 1998, Addison Wesley
+
 @item
 @cite{The Role of gamma5 in Dimensional Regularization}, D. Kreimer, hep-ph/9401354