]> www.ginac.de Git - ginac.git/commitdiff
[DOC] Explaining in tutorial sign ambiguity for numer() and denom().
authorRichard Kreckel <kreckel@ginac.de>
Thu, 4 Oct 2018 19:28:42 +0000 (21:28 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Thu, 4 Oct 2018 19:28:42 +0000 (21:28 +0200)
Based on a patch provided by Vladimir V. Kisil <kisilv@maths.leeds.ac.uk>.

doc/tutorial/ginac.texi

index 3742567eca0ba3d331409d7060ea6caafeb0f6d9..6e4ecb4b1eb4f6c5294521cabd156b81ff639c4a 100644 (file)
@@ -5499,8 +5499,11 @@ ex ex::numer_denom();
 
 These functions will first normalize the expression as described above and
 then return the numerator, denominator, or both as a list, respectively.
 
 These functions will first normalize the expression as described above and
 then return the numerator, denominator, or both as a list, respectively.
-If you need both numerator and denominator, calling @code{numer_denom()} is
-faster than using @code{numer()} and @code{denom()} separately.
+If you need both numerator and denominator, call @code{numer_denom()}: it
+is faster than using @code{numer()} and @code{denom()} separately. And even
+more important: a separate evaluation of @code{numer()} and @code{denom()}
+may result in a spurious sign, e.g. for $x/(x^2-1)$ @code{numer()} may
+return $x$ and @code{denom()} $1-x^2$.
 
 
 @subsection Converting to a polynomial or rational expression
 
 
 @subsection Converting to a polynomial or rational expression