java.lang.Math.sinh()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(193)

本文整理了Java中java.lang.Math.sinh()方法的一些代码示例,展示了Math.sinh()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Math.sinh()方法的具体详情如下:
包路径:java.lang.Math
类名称:Math
方法名:sinh

Math.sinh介绍

[英]Returns the closest double approximation of the hyperbolic sine of the argument. The returned result is within 2.5 ulps (units in the last place) of the real result.

Special cases:

  • sinh(+0.0) = +0.0
  • sinh(-0.0) = -0.0
  • sinh(+infinity) = +infinity
  • sinh(-infinity) = -infinity
  • sinh(NaN) = NaN
    [中]返回参数双曲正弦的最接近的双近似值。返回的结果与实际结果相差2.5 ulps(最后一位为单位)。
    特殊情况:
    *信安(+0.0)=+0.0
    *sinh(-0.0)=-0.0
    *正弦(+无穷大)=+无穷大
    *sinh(-无穷大)=-无穷大
    *信(南)=南

代码示例

代码示例来源:origin: h2oai/h2o-2

class ASTSinh extends ASTUniPrefixOp { @Override String opStr(){ return "sinh";  } @Override ASTOp make() {return new ASTSinh ();} @Override double op(double d) { return Math.sinh(d);}}
class ASTTanh extends ASTUniPrefixOp { @Override String opStr(){ return "tanh";  } @Override ASTOp make() {return new ASTTanh ();} @Override double op(double d) { return Math.tanh(d);}}

代码示例来源:origin: stanfordnlp/CoreNLP

/** Approximation to gamma function.  See e.g., http://www.rskey.org/CMS/index.php/the-library/11 .
 *  Fairly accurate, especially for n greater than 8.
 */
public static double gamma(double n) {
 return Math.sqrt(2.0*Math.PI/n) * Math.pow((n/Math.E)*Math.sqrt(n*Math.sinh((1.0/n)+(1/(810*Math.pow(n,6))))),n);
}

代码示例来源:origin: apache/incubator-druid

@Override
 protected ExprEval eval(double param)
 {
  return ExprEval.of(Math.sinh(param));
 }
}

代码示例来源:origin: plantuml/plantuml

public BigDecimal eval(List<? extends Number> parameters) {
    assertNotNull(parameters.get(0));
    double d = Math.sinh(parameters.get(0).doubleValue());
    return new BigDecimal(d, mc);
  }
});

代码示例来源:origin: loklak/loklak_server

private double tile2lat(int y) {
  //return Math.toDegrees(Math.atan(Math.sinh(Math.PI * (1 - 2 * y) / this.n)));
  return Math.toDegrees(Math.atan(Math.sinh(Math.PI - 2.0 * Math.PI * y / this.n)));
}

代码示例来源:origin: plantuml/plantuml

public BigDecimal eval(List<? extends Number> parameters) {
    assertNotNull(parameters.get(0));
    /** Formula: csch(x) = 1 / sinh(x) */
    double one = 1;
    double d = Math.sinh(parameters.get(0).doubleValue());
    return new BigDecimal((one / d), mc);
  }
});

代码示例来源:origin: opentripplanner/OpenTripPlanner

public static double tile2lat(int y, int z) {
  double n = Math.PI - (2.0 * Math.PI * y) / Math.pow(2.0, z);
  return Math.toDegrees(Math.atan(Math.sinh(n)));
}

代码示例来源:origin: querydsl/querydsl

public static double coth(double x) {
  return Math.cosh(x) / Math.sinh(x);
}

代码示例来源:origin: osmandapp/Osmand

public static double getLatitudeFromTile(float zoom, double y) {
  int sign = y < 0 ? -1 : 1;
  return Math.atan(sign * Math.sinh(Math.PI * (1 - 2 * y / getPowZoom(zoom)))) * 180d / Math.PI;
}

代码示例来源:origin: kevin-wayne/algs4

/**
 * Returns the complex sine of this complex number.
 *
 * @return the complex sine of this complex number
 */
public Complex sin() {
  return new Complex(Math.sin(re) * Math.cosh(im), Math.cos(re) * Math.sinh(im));
}

代码示例来源:origin: kevin-wayne/algs4

/**
 * Returns the complex cosine of this complex number.
 *
 * @return the complex cosine of this complex number
 */
public Complex cos() {
  return new Complex(Math.cos(re) * Math.cosh(im), -Math.sin(re) * Math.sinh(im));
}

代码示例来源:origin: EngineHub/WorldEdit

public static double sinh(RValue x) throws EvaluationException {
  return Math.sinh(x.getValue());
}

代码示例来源:origin: spotbugs/spotbugs

a = Math.round(1.5);
a = Math.sin(0.0);
a = Math.sinh(0.0);
a = Math.sqrt(0.0);
a = Math.sqrt(1.0);

代码示例来源:origin: ankidroid/Anki-Android

return Math.atan(expression.getValue());
case SINH:
  return Math.sinh(expression.getValue());
case COSH:
  return Math.cosh(expression.getValue());

代码示例来源:origin: geotools/geotools

public static final double tile2lat(double y, int z) {
    double n = Math.PI - ((2.0 * Math.PI * y) / Math.pow(2.0, z));
    // return 180.0 / Math.PI * Math.atan(0.5 * (Math.exp(n) -
    // Math.exp(-n)));
    return Math.toDegrees(Math.atan(Math.sinh(n)));
  }
}

代码示例来源:origin: westnordost/StreetComplete

private static double tile2lat(int y, int z) {
    double n = Math.PI - (2.0 * Math.PI * y) / Math.pow(2.0, z);
    return Math.toDegrees(Math.atan(Math.sinh(n)));
  }
}

代码示例来源:origin: Cleveroad/WaveInApp

public Complex cos() {
  return new Complex(Math.cos(re) * Math.cosh(im), -Math.sin(re) * Math.sinh(im));
}

代码示例来源:origin: pentaho/mondrian

@FunctionName("Sinh")
@Description("Returns the hyperbolic sine of a number.")
public static double sinh(double number) {
  return Math.sinh(number);
}

代码示例来源:origin: lealone/Lealone

break;
case SINH:
  result = ValueDouble.get(Math.sinh(v0.getDouble()));
  break;
case SQRT:

代码示例来源:origin: com.h2database/h2

break;
case SINH:
  result = ValueDouble.get(Math.sinh(v0.getDouble()));
  break;
case SQRT:

相关文章