asech.java

来自「JAVA 数学程序库 提供常规的数值计算程序包」· Java 代码 · 共 48 行

JAVA
48
字号
package jmathlib.toolbox.trigonometric;

import jmathlib.core.functions.ExternalElementWiseFunction;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;

public class asech extends ExternalElementWiseFunction
{
    
    public asech()
    {
        name = "asech";
    }
    
    /**trigonometric functions -calculates the inverse hperbolic secant
     * @param  double value array
     * @return the result as a double array
     */
    public double[] evaluateValue(double[] arg)
    {
        DoubleNumberToken num       = new DoubleNumberToken();
        acosh       acoshFunc = new acosh();
        
        double[] temp   = num.divide(new double[]{1,0}, arg);
        
        double[] result = acoshFunc.evaluateValue(temp);
        
        return result;
    }

}

/*
@GROUP
trigonometric
@SYNTAX
asech(value)
@DOC
calculates the inverse hperbolic secant
@NOTES
@EXAMPLES
<programlisting>
y = asech(x)
</programlisting>
@SEE
sec, cot, csch, sech, coth
*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?