]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_trans.cpp
cleaned up some is_a<> vs. is_exactly_a<> stuff
[ginac.git] / ginac / inifcns_trans.cpp
index cbf370dbb16542f1be19e16566a547a998e90f01..ec2fb91187f0d22bb4731c3a06f83e5aff54c423 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2002 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
@@ -141,12 +141,20 @@ static ex log_deriv(const ex & x, unsigned deriv_param)
        return power(x, _ex_1);
 }
 
+// This is a strange workaround for a compiliation problem with the try statement
+// below.  With -O1 the exception is not caucht properly as of GCC-2.95.2, at
+// least on i386.  Version 2.95.4 seems to have fixed this silly problem, though.
+// Funnily, with a simple extern declaration here it mysteriously works again.
+#if defined(__GNUC__) && (__GNUC__==2)
+extern "C" int putchar(int);
+#endif
+
 static ex log_series(const ex &arg,
                      const relational &rel,
                      int order,
                      unsigned options)
 {
-       GINAC_ASSERT(is_exactly_a<symbol>(rel.lhs()));
+       GINAC_ASSERT(is_a<symbol>(rel.lhs()));
        ex arg_pt;
        bool must_expand_arg = false;
        // maybe substitution of rel into arg fails because of a pole
@@ -460,7 +468,7 @@ static ex tan_series(const ex &x,
                      int order,
                      unsigned options)
 {
-       GINAC_ASSERT(is_exactly_a<symbol>(rel.lhs()));
+       GINAC_ASSERT(is_a<symbol>(rel.lhs()));
        // method:
        // Taylor series where there is no pole falls back to tan_deriv.
        // On a pole simply expand sin(x)/cos(x).
@@ -626,7 +634,7 @@ static ex atan_series(const ex &arg,
                       int order,
                       unsigned options)
 {
-       GINAC_ASSERT(is_exactly_a<symbol>(rel.lhs()));
+       GINAC_ASSERT(is_a<symbol>(rel.lhs()));
        // method:
        // Taylor series where there is no pole or cut falls back to atan_deriv.
        // There are two branch cuts, one runnig from I up the imaginary axis and
@@ -870,7 +878,7 @@ static ex tanh_series(const ex &x,
                       int order,
                       unsigned options)
 {
-       GINAC_ASSERT(is_exactly_a<symbol>(rel.lhs()));
+       GINAC_ASSERT(is_a<symbol>(rel.lhs()));
        // method:
        // Taylor series where there is no pole falls back to tanh_deriv.
        // On a pole simply expand sinh(x)/cosh(x).
@@ -1011,7 +1019,7 @@ static ex atanh_series(const ex &arg,
                        int order,
                        unsigned options)
 {
-       GINAC_ASSERT(is_exactly_a<symbol>(rel.lhs()));
+       GINAC_ASSERT(is_a<symbol>(rel.lhs()));
        // method:
        // Taylor series where there is no pole or cut falls back to atanh_deriv.
        // There are two branch cuts, one runnig from 1 up the real axis and one