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);}}
/** 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); }
@Override protected ExprEval eval(double param) { return ExprEval.of(Math.sinh(param)); } }
public BigDecimal eval(List<? extends Number> parameters) { assertNotNull(parameters.get(0)); double d = Math.sinh(parameters.get(0).doubleValue()); return new BigDecimal(d, mc); } });
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))); }
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); } });
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))); }
public static double coth(double x) { return Math.cosh(x) / Math.sinh(x); }
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; }
/** * 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)); }
/** * 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)); }
public static double sinh(RValue x) throws EvaluationException { return Math.sinh(x.getValue()); }
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);
return Math.atan(expression.getValue()); case SINH: return Math.sinh(expression.getValue()); case COSH: return Math.cosh(expression.getValue());
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))); } }
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))); } }
public Complex cos() { return new Complex(Math.cos(re) * Math.cosh(im), -Math.sin(re) * Math.sinh(im)); }
@FunctionName("Sinh") @Description("Returns the hyperbolic sine of a number.") public static double sinh(double number) { return Math.sinh(number); }
break; case SINH: result = ValueDouble.get(Math.sinh(v0.getDouble())); break; case SQRT:
break; case SINH: result = ValueDouble.get(Math.sinh(v0.getDouble())); break; case SQRT: