#include extern "C" { #include } #include namespace Poincare { HyperbolicArcTangent::HyperbolicArcTangent() : Function("atanh") { } Expression::Type HyperbolicArcTangent::type() const { return Type::HyperbolicArcTangent; } Expression * HyperbolicArcTangent::cloneWithDifferentOperands(Expression** newOperands, int numberOfOperands, bool cloneOperands) const { assert(newOperands != nullptr); HyperbolicArcTangent * t = new HyperbolicArcTangent(); t->setArgument(newOperands, numberOfOperands, cloneOperands); return t; } template Complex HyperbolicArcTangent::templatedComputeComplex(const Complex c) const { if (c.b() != 0) { return Complex::Float(NAN); } return Complex::Float(std::atanh(c.a())); } }