From c34e230376df174e4528ae61f7a00b25557d25e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Thu, 5 Mar 2020 09:54:17 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@898 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src_main/math/pimathcomplex.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src_main/math/pimathcomplex.h b/src_main/math/pimathcomplex.h index 254c25b2..28d78ca3 100644 --- a/src_main/math/pimathcomplex.h +++ b/src_main/math/pimathcomplex.h @@ -68,9 +68,16 @@ inline complexd sign(const complexd & x) {return complexd(sign(x.real()), sign(x inline complexd round(const complexd & c) {return complexd(piRound(c.real()), piRound(c.imag()));} inline complexd floor(const complexd & c) {return complexd(floor(c.real()), floor(c.imag()));} inline complexd ceil(const complexd & c) {return complexd(ceil(c.real()), ceil(c.imag()));} + +#ifdef PIP_CXX11_SUPPORT +# define acosc acos +# define asinc asin +# define atanc atan +#else inline complexd atanc(const complexd & c) {return -complexd(-0.5, 1.) * log((complexd_1 + complexd_i * c) / (complexd_1 - complexd_i * c));} inline complexd asinc(const complexd & c) {return -complexd_i * log(complexd_i * c + sqrt(complexd_1 - c * c));} inline complexd acosc(const complexd & c) {return -complexd_i * log(c + complexd_i * sqrt(complexd_1 - c * c));} +#endif #ifdef CC_GCC # if CC_GCC_VERSION <= 0x025F