From: Richard Kreckel Date: Thu, 4 Oct 2018 19:28:42 +0000 (+0200) Subject: [DOC] Explaining in tutorial sign ambiguity for numer() and denom(). X-Git-Tag: release_1-7-5~6 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=1109fafaa3f5da6d1483744c4bdee6f01a37c5c5 [DOC] Explaining in tutorial sign ambiguity for numer() and denom(). Based on a patch provided by Vladimir V. Kisil . --- diff --git a/doc/tutorial/ginac.texi b/doc/tutorial/ginac.texi index 3742567e..6e4ecb4b 100644 --- a/doc/tutorial/ginac.texi +++ b/doc/tutorial/ginac.texi @@ -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. -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