Here you can find the source of acot(double x)
public static double acot(double x)
//package com.java2s; /** This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. *//*w w w . jav a 2 s .co m*/ public class Main { public static double acot(double x) { if (x != 0) { return Math.atan(1 / x); } else { throw new ArithmeticException(); } } }