]> www.ginac.de Git - ginac.git/blobdiff - check/exam_inifcns.cpp
Update copyright statements.
[ginac.git] / check / exam_inifcns.cpp
index 32368e6030a9d92d747ffccf2c2e84c0a1634ecd..46e6f0782f6576f535f8046bcc59e5d87cfb33e7 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2014 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
@@ -310,9 +310,6 @@ static unsigned inifcns_consist_log()
        if (!e1.is_equal(e2))
                ++result;
 
-       if (!ex(log(pow(p,a))).is_equal(a*log(p)))
-               ++result;
-
        // shall not do for non-real powers
        if (ex(log(pow(p,z))).is_equal(z*log(p)))
                ++result;
@@ -321,6 +318,15 @@ static unsigned inifcns_consist_log()
        if (ex(log(pow(a,b))).is_equal(b*log(a)))
                ++result;
 
+       // infinite recursion log_series
+       ex e(log(-p));
+       ex ser = ex_to<pseries>(e.series(z, 1))
+               .convert_to_poly(/* no_order = */ true);
+       if (!ser.is_equal(e)) {
+               clog << "series(" << e << ", " << z << "): wrong result" << endl;
+               ++result;
+       }
+
        return result;
 }