diff --git a/src_main/math/pievaluator.cpp b/src_main/math/pievaluator.cpp index 0c74a6ae..96da7e21 100755 --- a/src_main/math/pievaluator.cpp +++ b/src_main/math/pievaluator.cpp @@ -1039,9 +1039,7 @@ inline void PIEvaluator::execFunction(const Instruction & ci) { tmpvars[oi].value = atanc(value(ci.operators[0])); break; case bfArcctg: - tmp = atanc(value(ci.operators[0])); - if (tmp == complexd_0) tmpvars[oi].value = 0.; - else tmpvars[oi].value = complexd_1 / tmp; + tmpvars[oi].value = atanc(-value(ci.operators[0])) + M_PI_2; break; case bfSh: tmpvars[oi].value = sinh(value(ci.operators[0]));