]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_trans.cpp
Improved series expansion synced to HEAD.
[ginac.git] / ginac / inifcns_trans.cpp
index 75b812102bbccef71eb218b24a3e723c2f2e0cea..c12df144c8bcedeb534318f57bba695b2a053520 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2003 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2004 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -124,7 +124,7 @@ static ex log_eval(const ex & x)
        // log(exp(t)) -> t (if -Pi < t.imag() <= Pi):
        if (is_ex_the_function(x, exp)) {
                const ex &t = x.op(0);
-               if (is_a<symbol>(t) && (ex_to<symbol>(t).get_domain() == symbol_options::real)) {
+               if (is_a<symbol>(t) && t.info(info_flags::real)) {
                        return t;
                }
                if (t.info(info_flags::numeric)) {
@@ -472,7 +472,7 @@ static ex tan_series(const ex &x,
        if (!(2*x_pt/Pi).info(info_flags::odd))
                throw do_taylor();  // caught by function::series()
        // if we got here we have to care for a simple pole
-       return (sin(x)/cos(x)).series(rel, order+2, options);
+       return (sin(x)/cos(x)).series(rel, order, options);
 }
 
 REGISTER_FUNCTION(tan, eval_func(tan_eval).
@@ -882,7 +882,7 @@ static ex tanh_series(const ex &x,
        if (!(2*I*x_pt/Pi).info(info_flags::odd))
                throw do_taylor();  // caught by function::series()
        // if we got here we have to care for a simple pole
-       return (sinh(x)/cosh(x)).series(rel, order+2, options);
+       return (sinh(x)/cosh(x)).series(rel, order, options);
 }
 
 REGISTER_FUNCTION(tanh, eval_func(tanh_eval).