X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Finifcns_trans.cpp;h=01711a7fa3c9aae70cc9afc536ab651a157d2d34;hp=70eccdceaff8cda1f902d812c8d95379606fdd1b;hb=b0265215a51a081d20fe68475e080716afc2d45a;hpb=24fe247f9ed16114a765a01c593fec5c4a2f591c diff --git a/ginac/inifcns_trans.cpp b/ginac/inifcns_trans.cpp index 70eccdce..01711a7f 100644 --- a/ginac/inifcns_trans.cpp +++ b/ginac/inifcns_trans.cpp @@ -30,7 +30,9 @@ #include "numeric.h" #include "power.h" +#ifndef NO_GINAC_NAMESPACE namespace GiNaC { +#endif // ndef NO_GINAC_NAMESPACE ////////// // exponential function @@ -468,10 +470,10 @@ static ex atan2_diff(ex const & y, ex const & x, unsigned diff_param) if (diff_param==0) { // d/dy atan(y,x) - return pow(x*(1+y*y/(x*x)),-1); + return x*pow(pow(x,2)+pow(y,2),-1); } // d/dx atan(y,x) - return -y*pow(x*x+y*y,-1); + return -y*pow(pow(x,2)+pow(y,2),-1); } REGISTER_FUNCTION(atan2, atan2_eval, atan2_evalf, atan2_diff, NULL); @@ -740,4 +742,6 @@ static ex atanh_diff(ex const & x, unsigned diff_param) REGISTER_FUNCTION(atanh, atanh_eval, atanh_evalf, atanh_diff, NULL); +#ifndef NO_GINAC_NAMESPACE } // namespace GiNaC +#endif // ndef NO_GINAC_NAMESPACE