From: Richard Kreckel Date: Tue, 15 May 2001 23:26:41 +0000 (+0000) Subject: - Fix thinko in csgn_eval(). X-Git-Tag: release_0-9-0~56 X-Git-Url: https://ginac.de/ginac.git/tutorial/ginac.git?a=commitdiff_plain;h=d58aba5750e206575895725df80b65d907196928;p=ginac.git - Fix thinko in csgn_eval(). --- diff --git a/ginac/inifcns.cpp b/ginac/inifcns.cpp index 0daa9798..3bf0b2f7 100644 --- a/ginac/inifcns.cpp +++ b/ginac/inifcns.cpp @@ -82,7 +82,8 @@ static ex csgn_eval(const ex & arg) if (is_ex_exactly_of_type(arg, numeric)) return csgn(ex_to_numeric(arg)); - else if (is_ex_exactly_of_type(arg, mul)) { + else if (is_ex_of_type(arg, mul) && + is_ex_of_type(arg.op(arg.nops()-1),numeric)) { numeric oc = ex_to_numeric(arg.op(arg.nops()-1)); if (oc.is_real()) { if (oc > 0) @@ -101,7 +102,7 @@ static ex csgn_eval(const ex & arg) return -csgn(I*arg/oc).hold(); } } - + return csgn(arg).hold(); }