/** * Arctangent function * @param x a number * @return atan(x) */ public static double atan(double x) { return atan(x, 0.0, false); }
/** {@inheritDoc} */ public double value(double x) { return FastMath.atan(x); }
/** {@inheritDoc} */ public double cumulativeProbability(double x) { return 0.5 + (FastMath.atan((x - median) / scale) / FastMath.PI); }
/** {@inheritDoc} * @since 3.2 */ public Decimal64 atan() { return new Decimal64(FastMath.atan(value)); }
/** {@inheritDoc} */ public SparseGradient atan() { return new SparseGradient(FastMath.atan(value), 1.0 / (1 + value * value), derivatives); }
function[0] = FastMath.atan(x); if (order > 0) {
ra = temp; return atan(ra, rb, false);
ra = temp; return atan(ra, rb, x<0);
/** * Arctangent function * @param x a number * @return atan(x) */ public static double atan(double x) { return atan(x, 0.0, false); }
@Override public float op(float origin) { return (float) FastMath.atan(origin); }
@Override public double op(double origin) { return FastMath.atan(origin); }
@Override public double op(double origin, double other) { return FastMath.atan(origin); }
/** {@inheritDoc} * @since 3.2 */ public Decimal64 atan() { return new Decimal64(FastMath.atan(value)); }
/** return the north side of the given pixel (assuming an integer pixel; noninteger pixels will return the appropriate location within the pixel) */ public static double pixelToLat (double pixel, int zoom) { return FastMath.toDegrees(atan(sinh(Math.PI - (pixel / 256d) / Math.pow(2, zoom) * 2 * Math.PI))); }
@Override public void run() { for (long k = firstIdx; k < lastIdx; k++) { res.setDouble(k, FastMath.atan(a.getDouble(k))); } } });
@Test public void testMathATanFast() { for (double i = 0; i < numItr; ++i) { double val = FastMath.atan(i); } }
public ValueType atan(CalculatedValue g) { if (g.isComplex()) { return setComplexValue(g.getComplex().atan()); } else { return setValue(FastMath.atan(g.real)); } }
/** * Numerical arctangent. * * @param complex argument * @return arctangent */ public static Complex arctan(Complex complex) { if (complex.isReal()) return new Complex(FastMath.atan(complex.getReal().doubleValue())); return new Complex(new org.apache.commons.math3.complex.Complex(complex.getReal().doubleValue(), complex.getImaginary().doubleValue()).atan()); }
/** * Numerical arccotangent. * * @param complex argument * @return arccotangent */ public static Complex arccot(Complex complex) { if (complex.isReal()) return new Complex(FastMath.atan(1 / complex.getReal().doubleValue())); return new Complex(new org.apache.commons.math3.complex.Complex(complex.getReal().doubleValue(), complex.getImaginary().doubleValue()).reciprocal().atan()); }