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

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

本文整理了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

  1. class ASTSinh extends ASTUniPrefixOp { @Override String opStr(){ return "sinh"; } @Override ASTOp make() {return new ASTSinh ();} @Override double op(double d) { return Math.sinh(d);}}
  2. 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

  1. /** Approximation to gamma function. See e.g., http://www.rskey.org/CMS/index.php/the-library/11 .
  2. * Fairly accurate, especially for n greater than 8.
  3. */
  4. public static double gamma(double n) {
  5. 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);
  6. }

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

  1. @Override
  2. protected ExprEval eval(double param)
  3. {
  4. return ExprEval.of(Math.sinh(param));
  5. }
  6. }

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. /**
  2. * Returns the complex sine of this complex number.
  3. *
  4. * @return the complex sine of this complex number
  5. */
  6. public Complex sin() {
  7. return new Complex(Math.sin(re) * Math.cosh(im), Math.cos(re) * Math.sinh(im));
  8. }

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

  1. /**
  2. * Returns the complex cosine of this complex number.
  3. *
  4. * @return the complex cosine of this complex number
  5. */
  6. public Complex cos() {
  7. return new Complex(Math.cos(re) * Math.cosh(im), -Math.sin(re) * Math.sinh(im));
  8. }

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

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

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

  1. a = Math.round(1.5);
  2. a = Math.sin(0.0);
  3. a = Math.sinh(0.0);
  4. a = Math.sqrt(0.0);
  5. a = Math.sqrt(1.0);

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

  1. return Math.atan(expression.getValue());
  2. case SINH:
  3. return Math.sinh(expression.getValue());
  4. case COSH:
  5. return Math.cosh(expression.getValue());

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

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

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

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

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

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

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

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

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

  1. break;
  2. case SINH:
  3. result = ValueDouble.get(Math.sinh(v0.getDouble()));
  4. break;
  5. case SQRT:

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

  1. break;
  2. case SINH:
  3. result = ValueDouble.get(Math.sinh(v0.getDouble()));
  4. break;
  5. case SQRT:

相关文章