]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_trans.cpp
- dummy index renaming works better
[ginac.git] / ginac / inifcns_trans.cpp
index 89b0454292caf4a0ec4cebe957b590b9e657e55f..150e3428f49fb4323f78dbd011bbee1d8907ff9a 100644 (file)
@@ -56,7 +56,7 @@ static ex exp_eval(const ex & x)
                return _ex1();
        }
        // exp(n*Pi*I/2) -> {+1|+I|-1|-I}
-       ex TwoExOverPiI=(_ex2()*x)/(Pi*I);
+       const ex TwoExOverPiI=(_ex2()*x)/(Pi*I);
        if (TwoExOverPiI.info(info_flags::integer)) {
                numeric z=mod(ex_to<numeric>(TwoExOverPiI),_num4());
                if (z.is_equal(_num0()))
@@ -199,7 +199,7 @@ static ex log_series(const ex &arg,
                const symbol *s = static_cast<symbol *>(rel.lhs().bp);
                const ex point = rel.rhs();
                const symbol foo;
-               ex replarg = series(log(arg), *s==foo, order).subs(foo==point);
+               const ex replarg = series(log(arg), *s==foo, order).subs(foo==point);
                epvector seq;
                seq.push_back(expair(-I*csgn(arg*I)*Pi, _ex0()));
                seq.push_back(expair(Order(_ex1()), order));
@@ -230,7 +230,7 @@ static ex sin_evalf(const ex & x)
 static ex sin_eval(const ex & x)
 {
        // sin(n/d*Pi) -> { all known non-nested radicals }
-       ex SixtyExOverPi = _ex60()*x/Pi;
+       const ex SixtyExOverPi = _ex60()*x/Pi;
        ex sign = _ex1();
        if (SixtyExOverPi.info(info_flags::integer)) {
                numeric z = mod(ex_to<numeric>(SixtyExOverPi),_num120());
@@ -263,7 +263,7 @@ static ex sin_eval(const ex & x)
                        return sign*_ex1();
        }
        
-       if (is_ex_exactly_of_type(x, function)) {
+       if (is_exactly_a<function>(x)) {
                ex t = x.op(0);
                // sin(asin(x)) -> x
                if (is_ex_the_function(x, asin))
@@ -312,7 +312,7 @@ static ex cos_evalf(const ex & x)
 static ex cos_eval(const ex & x)
 {
        // cos(n/d*Pi) -> { all known non-nested radicals }
-       ex SixtyExOverPi = _ex60()*x/Pi;
+       const ex SixtyExOverPi = _ex60()*x/Pi;
        ex sign = _ex1();
        if (SixtyExOverPi.info(info_flags::integer)) {
                numeric z = mod(ex_to<numeric>(SixtyExOverPi),_num120());
@@ -345,7 +345,7 @@ static ex cos_eval(const ex & x)
                        return sign*_ex0();
        }
        
-       if (is_ex_exactly_of_type(x, function)) {
+       if (is_exactly_a<function>(x)) {
                ex t = x.op(0);
                // cos(acos(x)) -> x
                if (is_ex_the_function(x, acos))
@@ -394,7 +394,7 @@ static ex tan_evalf(const ex & x)
 static ex tan_eval(const ex & x)
 {
        // tan(n/d*Pi) -> { all known non-nested radicals }
-       ex SixtyExOverPi = _ex60()*x/Pi;
+       const ex SixtyExOverPi = _ex60()*x/Pi;
        ex sign = _ex1();
        if (SixtyExOverPi.info(info_flags::integer)) {
                numeric z = mod(ex_to<numeric>(SixtyExOverPi),_num60());
@@ -423,7 +423,7 @@ static ex tan_eval(const ex & x)
                        throw (pole_error("tan_eval(): simple pole",1));
        }
        
-       if (is_ex_exactly_of_type(x, function)) {
+       if (is_exactly_a<function>(x)) {
                ex t = x.op(0);
                // tan(atan(x)) -> x
                if (is_ex_the_function(x, atan))
@@ -650,7 +650,7 @@ static ex atan_series(const ex &arg,
                const symbol *s = static_cast<symbol *>(rel.lhs().bp);
                const ex point = rel.rhs();
                const symbol foo;
-               ex replarg = series(atan(arg), *s==foo, order).subs(foo==point);
+               const ex replarg = series(atan(arg), *s==foo, order).subs(foo==point);
                ex Order0correction = replarg.op(0)+csgn(arg)*Pi*_ex_1_2();
                if ((I*arg_pt)<_ex0())
                        Order0correction += log((I*arg_pt+_ex_1())/(I*arg_pt+_ex1()))*I*_ex_1_2();
@@ -736,7 +736,7 @@ static ex sinh_eval(const ex & x)
                ex_to<numeric>(x/Pi).real().is_zero())  // sinh(I*x) -> I*sin(x)
                return I*sin(x/I);
        
-       if (is_ex_exactly_of_type(x, function)) {
+       if (is_exactly_a<function>(x)) {
                ex t = x.op(0);
                // sinh(asinh(x)) -> x
                if (is_ex_the_function(x, asinh))
@@ -791,7 +791,7 @@ static ex cosh_eval(const ex & x)
                ex_to<numeric>(x/Pi).real().is_zero())  // cosh(I*x) -> cos(x)
                return cos(x/I);
        
-       if (is_ex_exactly_of_type(x, function)) {
+       if (is_exactly_a<function>(x)) {
                ex t = x.op(0);
                // cosh(acosh(x)) -> x
                if (is_ex_the_function(x, acosh))
@@ -846,7 +846,7 @@ static ex tanh_eval(const ex & x)
                ex_to<numeric>(x/Pi).real().is_zero())  // tanh(I*x) -> I*tan(x);
                return I*tan(x/I);
        
-       if (is_ex_exactly_of_type(x, function)) {
+       if (is_exactly_a<function>(x)) {
                ex t = x.op(0);
                // tanh(atanh(x)) -> x
                if (is_ex_the_function(x, atanh))
@@ -1043,7 +1043,7 @@ static ex atanh_series(const ex &arg,
                const symbol *s = static_cast<symbol *>(rel.lhs().bp);
                const ex point = rel.rhs();
                const symbol foo;
-               ex replarg = series(atanh(arg), *s==foo, order).subs(foo==point);
+               const ex replarg = series(atanh(arg), *s==foo, order).subs(foo==point);
                ex Order0correction = replarg.op(0)+csgn(I*arg)*Pi*I*_ex1_2();
                if (arg_pt<_ex0())
                        Order0correction += log((arg_pt+_ex_1())/(arg_pt+_ex1()))*_ex1_2();