/** {@inheritDoc} */ public double value(double x) { return FastMath.sinh(x); }
/** {@inheritDoc} * @since 3.2 */ public Decimal64 sinh() { return new Decimal64(FastMath.sinh(value)); }
/** {@inheritDoc} */ public SparseGradient cosh() { return new SparseGradient(FastMath.cosh(value), FastMath.sinh(value), derivatives); }
/** {@inheritDoc} */ public SparseGradient sinh() { return new SparseGradient(FastMath.sinh(value), FastMath.cosh(value), derivatives); }
/** Compute hyperbolic sine of a derivative structure. * @param operand array holding the operand * @param operandOffset offset of the operand in its array * @param result array where result must be stored (for * hyperbolic sine the result array <em>cannot</em> be the input * array) * @param resultOffset offset of the result in its array */ public void sinh(final double[] operand, final int operandOffset, final double[] result, final int resultOffset) { // create the function value and derivatives double[] function = new double[1 + order]; function[0] = FastMath.sinh(operand[operandOffset]); if (order > 0) { function[1] = FastMath.cosh(operand[operandOffset]); for (int i = 2; i <= order; ++i) { function[i] = function[i - 2]; } } // apply function composition compose(operand, operandOffset, function, result, resultOffset); }
/** Compute hyperbolic cosine of a derivative structure. * @param operand array holding the operand * @param operandOffset offset of the operand in its array * @param result array where result must be stored (for * hyperbolic cosine the result array <em>cannot</em> be the input * array) * @param resultOffset offset of the result in its array */ public void cosh(final double[] operand, final int operandOffset, final double[] result, final int resultOffset) { // create the function value and derivatives double[] function = new double[1 + order]; function[0] = FastMath.cosh(operand[operandOffset]); if (order > 0) { function[1] = FastMath.sinh(operand[operandOffset]); for (int i = 2; i <= order; ++i) { function[i] = function[i - 2]; } } // apply function composition compose(operand, operandOffset, function, result, resultOffset); }
return createComplex(FastMath.sinh(real) * FastMath.cos(imaginary), FastMath.cosh(real) * FastMath.sin(imaginary));
-FastMath.sin(real) * FastMath.sinh(imaginary));
FastMath.sinh(real) * FastMath.sin(imaginary));
FastMath.cos(real) * FastMath.sinh(imaginary));
double d = FastMath.cosh(real2) + FastMath.cos(imaginary2); return createComplex(FastMath.sinh(real2) / d, FastMath.sin(imaginary2) / d);
FastMath.sinh(imaginary2) / d);
@Override public double op(double origin, double other) { return FastMath.sinh(origin); }
@Override public double op(double origin) { return FastMath.sinh(origin); }
@Override public float op(float origin) { return (float) FastMath.sinh(origin); }
/** {@inheritDoc} * @since 3.2 */ public Decimal64 sinh() { return new Decimal64(FastMath.sinh(value)); }
public ValueType sinh(CalculatedValue g) { if (g.isComplex()) { return setComplexValue(g.getComplex().sinh()); } else { return setValue(FastMath.sinh(g.real)); } }
@Override public void run() { double[] elem_res = new double[2]; for (long k = firstIdx; k < lastIdx; k++) { double[] elem_a = _ac.getComplexDouble(k); elem_res[0] = FastMath.sin(elem_a[0]) * FastMath.cosh(elem_a[1]); elem_res[1] = FastMath.cos(elem_a[0]) * FastMath.sinh(elem_a[1]); resc.setComplexDouble(k, elem_res); } } });
@Override public void run() { float[] elem_res = new float[2]; for (long k = firstIdx; k < lastIdx; k++) { float[] elem_a = _ac.getComplexFloat(k); elem_res[0] = (float) (FastMath.cos(elem_a[0]) * FastMath.cosh(elem_a[1])); elem_res[1] = (float) (-FastMath.sin(elem_a[0]) * FastMath.sinh(elem_a[1])); resc.setComplexFloat(k, elem_res); } } });
public ValueType csch(CalculatedValue g) { if (g.isComplex()) { return setComplexValue(g.getComplex().sinh().reciprocal()); } else { return setValue(1.0f / FastMath.sinh(g.real)); } }