package org.matheclipse.core.reflection.system;
import static org.matheclipse.core.expression.F.*;
import org.matheclipse.core.eval.interfaces.AbstractFunctionEvaluator;
import org.matheclipse.core.eval.interfaces.AbstractTrigArg1;
import org.matheclipse.core.expression.F;
import org.matheclipse.core.interfaces.IAST;
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.core.interfaces.ISymbol;
import org.matheclipse.parser.client.SyntaxError;
/**
* Arccotangent hyperbolic
*
* See Inverse hyperbolic functions
*/
public class ArcCoth extends AbstractTrigArg1 {
/*
* { ArcCoth[0]=I*Pi/2 }
*/
final static IAST RULES = List(Set(ArcCoth(C0), Times(CI, C1D2, Pi)));
@Override
public IAST getRuleAST() {
return RULES;
}
public ArcCoth() {
}
@Override
public IExpr evaluateArg1(final IExpr arg1) {
if (AbstractFunctionEvaluator.isNegativeExpression(arg1)) {
return Times(CN1, ArcCoth(Times(CN1, arg1)));
}
IExpr imPart = AbstractFunctionEvaluator.getPureImaginaryPart(arg1);
if (imPart != null) {
return F.Times(F.CNI, F.ArcCot(imPart));
}
return null;
}
@Override
public void setUp(final ISymbol symbol) throws SyntaxError {
symbol.setAttributes(ISymbol.LISTABLE | ISymbol.NUMERICFUNCTION);
super.setUp(symbol);
}
}
Ads help maintain this website.