git-svn-id: svn://db.shs.com.ru/libs@737 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2020-03-05 10:07:48 +00:00
parent 1bddcd7351
commit eb98c2ee94

View File

@@ -23,9 +23,15 @@ const double rad2deg_qpie = 45. / atan(1.);
inline complexd round_qpie(const complexd & c) {return complexd(round(c.real()), round(c.imag()));}
inline complexd floor_qpie(const complexd & c) {return complexd(floor(c.real()), floor(c.imag()));}
inline complexd ceil_qpie(const complexd & c) {return complexd(ceil(c.real()), ceil(c.imag()));}
inline complexd atanc_qpie(const complexd & c) {return -complexd(-0.5, 1.) * log((complexd_1 + complexd_i * c) / (complexd_1 - complexd_i * c));}
#if (__cplusplus >= 201103L) // стандарт C++ 11 или выше
# define acosc_qpie acos
# define asinc_qpie asin
# define atanc_qpie atan
#else
inline complexd atanc_qpie(const complexd & c) {return complexd(0., 0.5) * log((complexd_1 - complexd_i * c) / (complexd_1 + complexd_i * c));}
inline complexd asinc_qpie(const complexd & c) {return -complexd_i * log(complexd_i * c + sqrt(complexd_1 - c * c));}
inline complexd acosc_qpie(const complexd & c) {return -complexd_i * log(c + complexd_i * sqrt(complexd_1 - c * c));}
#endif
namespace QPIEvaluatorTypes {
static const int operationCount = 14;