Commits

Volker Braun committed 25e9bef

added fix for atan2 bug

Comments (0)

Files changed (2)

 stable_op.patch
 trac_9880_ginac_infinities_rewrite.patch
 trac_9880_reviewer-vb.patch
+trac_11423_atan2.patch

trac_11423_atan2.patch

+# HG changeset patch
+# Parent 7d268b3e86882289dd113430f7199243f247c439
+# HG changeset patch
+# Parent 7d268b3e86882289dd113430f7199243f247c439
+
+Trac #11432: Make atan2(0,0) throw error.
+diff --git a/ginac/inifcns_trans.cpp b/ginac/inifcns_trans.cpp
+--- a/ginac/inifcns_trans.cpp
++++ b/ginac/inifcns_trans.cpp
+@@ -1056,9 +1056,9 @@
+ {
+ 	if (y.is_zero()) {
+ 
+-		// atan2(0, 0) -> 0
++		// atan2(0, 0) -> undefined
+ 		if (x.is_zero())
+-			return _ex0;
++			throw (std::runtime_error("arctan2_eval(): arctan2(0,0) encountered"));
+ 
+ 		// atan2(0, x), x real and positive -> 0
+ 		if (x.info(info_flags::positive))