- throw at atan()'s poles.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 31 Jan 2001 00:55:27 +0000 (00:55 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 31 Jan 2001 00:55:27 +0000 (00:55 +0000)
ginac/inifcns_trans.cpp

index 07f8648a870e8d809dab958a75eed796dac6ed3b..390f84f1a0472d25d82116f95a48d46e92e12921 100644 (file)
@@ -589,6 +589,8 @@ static ex atan_eval(const ex & x)
                // atan(-1) -> -Pi/4
                if (x.is_equal(_ex_1()))
                        return _ex_1_4()*Pi;
+               if (x.is_equal(I) || x.is_equal(-I))
+                       throw (pole_error("atan_eval(): logarithmic pole",0));
                // atan(float) -> float
                if (!x.info(info_flags::crational))
                        return atan_evalf(x);