/** {@inheritDoc} */ public double value(double x) { return FastMath.tan(x); }
/** {@inheritDoc} * @since 3.2 */ public Decimal64 tan() { return new Decimal64(FastMath.tan(value)); }
/** {@inheritDoc} */ public SparseGradient tan() { final double t = FastMath.tan(value); return new SparseGradient(t, 1 + t * t, derivatives); }
/** * {@inheritDoc} * * Returns {@code Double.NEGATIVE_INFINITY} when {@code p == 0} * and {@code Double.POSITIVE_INFINITY} when {@code p == 1}. */ @Override public double inverseCumulativeProbability(double p) throws OutOfRangeException { double ret; if (p < 0 || p > 1) { throw new OutOfRangeException(p, 0, 1); } else if (p == 0) { ret = Double.NEGATIVE_INFINITY; } else if (p == 1) { ret = Double.POSITIVE_INFINITY; } else { ret = median + scale * FastMath.tan(FastMath.PI * (p - .5)); } return ret; }
final double t = FastMath.tan(operand[operandOffset]); function[0] = t;
this.beta = beta; if (alpha < 2d && beta != 0d) { zeta = beta * FastMath.tan(FastMath.PI * alpha / 2); } else { zeta = 0d;
x = FastMath.tan(phi); } else { x = FastMath.pow(omega * FastMath.cos((1 - alpha) * phi), } else { double betaPhi = FastMath.PI / 2 + beta * phi; x = 2d / FastMath.PI * (betaPhi * FastMath.tan(phi) - beta * FastMath.log(FastMath.PI / 2d * omega * cosPhi / betaPhi)); x += beta * FastMath.tan(FastMath.PI * alpha / 2);
@Override public float op(float origin, float other) { return (float) FastMath.tan(origin); }
@Override public double op(double origin, double other) { return FastMath.tan(origin); }
/** {@inheritDoc} * @since 3.2 */ public Decimal64 tan() { return new Decimal64(FastMath.tan(value)); }
/** {@inheritDoc} */ public SparseGradient tan() { final double t = FastMath.tan(value); return new SparseGradient(t, 1 + t * t, derivatives); }
private static double calculateEarthRadius(BinaryRecord sceneRec) { final double platLat = sceneRec.getAttributeDouble("Sensor platform geodetic latitude at nadir"); final double a = FastMath.tan(platLat * Constants.DTOR); final double a2 = a * a; final double ellipmin = Constants.semiMinorAxis; final double ellipmin2 = ellipmin * ellipmin; final double ellipmaj = Constants.semiMajorAxis; final double ellipmaj2 = ellipmaj * ellipmaj; return Constants.semiMinorAxis * (Math.sqrt(1 + a2) / Math.sqrt((ellipmin2 / ellipmaj2) + a2)); }
private static double calculateEarthRadius(BinaryRecord sceneRec) { final double platLat = sceneRec.getAttributeDouble("Sensor platform geodetic latitude at nadir"); final double a = FastMath.tan(platLat * Constants.DTOR); final double a2 = a * a; final double ellipmin = Constants.semiMinorAxis; final double ellipmin2 = ellipmin * ellipmin; final double ellipmaj = Constants.semiMajorAxis; final double ellipmaj2 = ellipmaj * ellipmaj; return Constants.semiMinorAxis * (Math.sqrt(1 + a2) / Math.sqrt((ellipmin2 / ellipmaj2) + a2)); }
@Override public void run() { for (long k = firstIdx; k < lastIdx; k++) { res.setDouble(k, FastMath.tan(a.getDouble(k))); } } });
/** Return the pixel the given latitude falls within */ public static int latToPixel (double lat, int zoom) { double latRad = FastMath.toRadians(lat); return (int) ((1 - log(tan(latRad) + 1 / cos(latRad)) / Math.PI) * Math.pow(2, zoom - 1) * 256); }
/** Return the pixel the given latitude falls within */ public static int latToPixel (double lat, int zoom) { double latRad = FastMath.toRadians(lat); return (int) ((1 - log(tan(latRad) + 1 / cos(latRad)) / Math.PI) * Math.pow(2, zoom - 1) * 256); }
public ValueType tan(CalculatedValue g) { if (g.isComplex()) { return setComplexValue(g.getComplex().tan()); } else { return setValue(FastMath.tan(g.real)); } }
public ValueType cot(CalculatedValue g) { if (g.isComplex()) { return setComplexValue(g.getComplex().tan().reciprocal()); } else { return setValue(1.0f / FastMath.tan(g.real)); } }
/** * Numerical tangent. * * @param complex argument * @return tangent */ public static Complex tan(Complex complex) { if (complex.isReal()) return new Complex(FastMath.tan(complex.getReal().doubleValue())); return new Complex(new org.apache.commons.math3.complex.Complex(complex.getReal().doubleValue(), complex.getImaginary().doubleValue()).tan()); }
/** * Numerical cotangent. * * @param complex argument * @return cotangent */ public static Complex cot(Complex complex) { if (complex.isReal()) return new Complex(1 / FastMath.tan(complex.getReal().doubleValue())); return new Complex(new org.apache.commons.math3.complex.Complex(complex.getReal().doubleValue(), complex.getImaginary().doubleValue()).tan().reciprocal()); }