if (*it != _ex0) {
all_zero = false;
}
- s.append(+1);
+ if ( !ex_to<numeric>(*it).is_real() && ex_to<numeric>(*it).imag() < 0 ) {
+ s.append(-1);
+ }
+ else {
+ s.append(+1);
+ }
}
if (all_zero) {
return pow(log(y), x.nops()) / factorial(x.nops());
if (*it != _ex0) {
all_zero = false;
}
- s.append(+1);
+ if ( !ex_to<numeric>(*it).is_real() && ex_to<numeric>(*it).imag() < 0 ) {
+ s.append(-1);
+ }
+ else {
+ s.append(+1);
+ }
}
if (all_zero) {
return pow(log(y), x.nops()) / factorial(x.nops());
if (*itx != _ex0) {
all_zero = false;
}
- if (*its >= 0) {
- sn.append(+1);
- } else {
- sn.append(-1);
+ if ( ex_to<numeric>(*itx).is_real() ) {
+ if ( *its >= 0 ) {
+ sn.append(+1);
+ }
+ else {
+ sn.append(-1);
+ }
+ }
+ else {
+ if ( ex_to<numeric>(*itx).imag() > 0 ) {
+ sn.append(+1);
+ }
+ else {
+ sn.append(-1);
+ }
}
}
if (all_zero) {
if (*itx != _ex0) {
all_zero = false;
}
- if (*its >= 0) {
- sn.append(+1);
- } else {
- sn.append(-1);
+ if ( ex_to<numeric>(*itx).is_real() ) {
+ if ( *its >= 0 ) {
+ sn.append(+1);
+ }
+ else {
+ sn.append(-1);
+ }
+ }
+ else {
+ if ( ex_to<numeric>(*itx).imag() > 0 ) {
+ sn.append(+1);
+ }
+ else {
+ sn.append(-1);
+ }
}
}
if (all_zero) {