git://www.ginac.de
/
ginac.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be6aec5
)
- Fix thinko in csgn_eval().
author
Richard Kreckel
<Richard.Kreckel@uni-mainz.de>
Tue, 15 May 2001 23:26:41 +0000
(23:26 +0000)
committer
Richard Kreckel
<Richard.Kreckel@uni-mainz.de>
Tue, 15 May 2001 23:26:41 +0000
(23:26 +0000)
ginac/inifcns.cpp
patch
|
blob
|
history
diff --git
a/ginac/inifcns.cpp
b/ginac/inifcns.cpp
index 0daa97989abf8260202a0db99cfb572f576379ec..3bf0b2f7e9b93554c9344d357e848be1c9ba4aa3 100644
(file)
--- 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();
}