@Test public void testAcot() { assertPrecisionCalculation( BigComplex.valueOf(new BigDecimal("0.23182380450040305810712811573060720101426852714306013190"), new BigDecimal("-0.40235947810852509365018983330654690988140033856712943047")).round(MC), (mc) -> BigComplexMath.acot(BigComplex.valueOf(1, 2), mc), 5); }
public static BigComplex acot(BigComplex x, MathContext mathContext) { MathContext mc = new MathContext(mathContext.getPrecision() + 4, mathContext.getRoundingMode()); return log(x.add(I, mc).divide(x.subtract(I, mc), mc), mc).divide(I, mc).divide(TWO, mc).round(mathContext); }
BigComplexMath { public static BigComplex acot(BigComplex x, MathContext mathContext) { MathContext mc = new MathContext(mathContext.getPrecision() + 4, mathContext.getRoundingMode()); return log(x.add(I, mc).divide(x.subtract(I, mc), mc), mc).divide(I, mc).divide(TWO, mc).round(mathContext); } }
BigComplexMath { public static BigComplex acot(BigComplex x, MathContext mathContext) { MathContext mc = new MathContext(mathContext.getPrecision() + 4, mathContext.getRoundingMode()); return log(x.add(I, mc).divide(x.subtract(I, mc), mc), mc).divide(I, mc).divide(TWO, mc).round(mathContext); }  }
BigComplexMath { public static BigComplex acot(BigComplex x, MathContext mathContext) { MathContext mc = new MathContext(mathContext.getPrecision() + 4, mathContext.getRoundingMode()); return log(x.add(I, mc).divide(x.subtract(I, mc), mc), mc).divide(I, mc).divide(TWO, mc).round(mathContext); }  static BigComplex reciprocal(BigComplex x, MathContext mathContext); static BigComplex conjugate(BigComplex x); static BigDecimal abs(BigComplex x, MathContext mathContext); static BigDecimal absSquare(BigComplex x, MathContext mathContext); static BigDecimal angle(BigComplex x, MathContext mathContext); static BigComplex factorial(BigComplex x, MathContext mathContext); static BigComplex gamma(BigComplex x, MathContext mathContext); static BigComplex exp(BigComplex x, MathContext mathContext); static BigComplex sin(BigComplex x, MathContext mathContext); static BigComplex cos(BigComplex x, MathContext mathContext); static BigComplex tan(BigComplex x, MathContext mathContext); static BigComplex atan(BigComplex x, MathContext mathContext); static BigComplex acot(BigComplex x, MathContext mathContext); static BigComplex asin(BigComplex x, MathContext mathContext); static BigComplex acos(BigComplex x, MathContext mathContext); static BigComplex sqrt(BigComplex x, MathContext mathContext); static BigComplex log(BigComplex x, MathContext mathContext); static BigComplex pow(BigComplex x, long y, MathContext mathContext); static BigComplex pow(BigComplex x, BigDecimal y, MathContext mathContext); static BigComplex pow(BigComplex x, BigComplex y, MathContext mathContext); static BigComplex root(BigComplex x, BigDecimal n, MathContext mathContext); static BigComplex root(BigComplex x, BigComplex n, MathContext mathContext); }
BigComplexMath { public static BigComplex acot(BigComplex x, MathContext mathContext) { MathContext mc = new MathContext(mathContext.getPrecision() + 4, mathContext.getRoundingMode()); return log(x.add(I, mc).divide(x.subtract(I, mc), mc), mc).divide(I, mc).divide(TWO, mc).round(mathContext); }  static BigComplex reciprocal(BigComplex x, MathContext mathContext); static BigComplex conjugate(BigComplex x); static BigDecimal abs(BigComplex x, MathContext mathContext); static BigDecimal absSquare(BigComplex x, MathContext mathContext); static BigDecimal angle(BigComplex x, MathContext mathContext); static BigComplex factorial(BigComplex x, MathContext mathContext); static BigComplex gamma(BigComplex x, MathContext mathContext); static BigComplex exp(BigComplex x, MathContext mathContext); static BigComplex sin(BigComplex x, MathContext mathContext); static BigComplex cos(BigComplex x, MathContext mathContext); static BigComplex tan(BigComplex x, MathContext mathContext); static BigComplex atan(BigComplex x, MathContext mathContext); static BigComplex acot(BigComplex x, MathContext mathContext); static BigComplex asin(BigComplex x, MathContext mathContext); static BigComplex acos(BigComplex x, MathContext mathContext); static BigComplex sqrt(BigComplex x, MathContext mathContext); static BigComplex log(BigComplex x, MathContext mathContext); static BigComplex pow(BigComplex x, long y, MathContext mathContext); static BigComplex pow(BigComplex x, BigDecimal y, MathContext mathContext); static BigComplex pow(BigComplex x, BigComplex y, MathContext mathContext); static BigComplex root(BigComplex x, BigDecimal n, MathContext mathContext); static BigComplex root(BigComplex x, BigComplex n, MathContext mathContext);  }