Excel 16.0 build 19929
Windows, bitness not recorded, CPU not recorded
45 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.
Math and trigonometry functions
Matches all 16,927 recorded answers
Recorded: 16,924 in the answer bank and 3 workbook cells. How we measure this · See the Rust code
| Language | Name in Excel |
|---|---|
| Arabic | ACOT |
| Bulgarian | ACOT |
| Czech | ACOT |
| Danish | ARCCOT |
| German | ACOT |
| Greek | ACOT |
| English (Australia) | ACOT |
| English (United Kingdom) | ACOT |
| English (United States) | ACOT |
| Spanish | ACOT |
| Estonian | ACOT |
| Finnish | ACOT |
| French | ACOT |
| Hebrew | ACOT |
| Croatian | ACOT |
| Hungarian | ARCCOT |
| Indonesian | ACOT |
| Italian | ACOT |
| Japanese | ACOT |
| Korean | ACOT |
| Lithuanian | ACOT |
| Latvian | ACOT |
| Norwegian | ACOT |
| Dutch | BOOGCOT |
| Polish | ACOT |
| Portuguese (Brazil) | ACOT |
| Portuguese (Portugal) | ACOT |
| Romanian | ACOT |
| Russian | ACOT |
| Slovak | ACOT |
| Slovenian | ACOT |
| Serbian (Latin) | ACOT |
| Swedish | ARCCOT |
| Thai | ACOT |
| Turkish | ACOT |
| Ukrainian | ACOT |
| Vietnamese | ACOT |
| Chinese (Simplified) | ACOT |
| Chinese (Hong Kong) | ACOT |
| Chinese (Traditional) | ACOT |
Names from Microsoft's support site.
ACOT(number)
ACOT(number) is the inverse cotangent: the angle whose cotangent is number.
acot: R -> (0, pi), cot(acot x) = x
ACOS and ASIN, there is no restriction — cot maps
each period onto the whole real line.(0, pi). Microsoft's Learn reference states the range as
0 to pi. Mathematically the endpoints are approached and never reached: acot(x) -> 0+ as
x -> +infinity and acot(x) -> pi- as x -> -infinity.acot(-1) = 3pi/4, acot(0) = pi/2,
acot(1) = pi/4.acot(-x) = pi - acot(x). Antisymmetric about (0, pi/2), like ACOS.d/dx acot x = -1/(1 + x^2) — bounded, never zero, and the negative of
ATAN's. ACOT is smooth and well conditioned everywhere; the difficulties on this page are
about representation, not about conditioning.acot(x) = 1/x - 1/(3x^3) + 1/(5x^5) - ... for large |x| > 1; near zero,
acot(x) = pi/2 - x + x^3/3 - ....There are two incompatible conventions for arccotangent in the literature, and Excel picks one:
| Convention | Range | Behaviour at x -> 0- |
|---|---|---|
| Continuous (Excel, per the Learn reference) | (0, pi) | continuous through zero: acot(0) = pi/2 |
Odd, i.e. atan(1/x) | [-pi/2, 0) ∪ (0, pi/2] | jumps by pi across zero |
On the continuous convention the identity is
acot(x) = pi/2 - atan(x) for every real x
which is smooth everywhere. On the odd convention acot(x) = atan(1/x), which is undefined at
zero and discontinuous across it. The two agree for x > 0 and differ by exactly pi for
x < 0.
This is not a pedantic distinction. ACOT(-1) is 3pi/4 on Excel's stated convention and
-pi/4 on the other, and a formula ported from a language whose acot is atan(1/x) will
silently be wrong by pi on every negative input. Abramowitz & Stegun record both conventions;
Kahan's branch-cut paper is the standard argument for treating the choice as a real decision.
| Argument | Meaning | Default |
|---|---|---|
number | The cotangent of the angle you want. Required. | — |
That description is Microsoft's, from the Learn reference: "the cotangent of the angle that you want". No constraint on the argument is documented, and none is needed.
The misunderstood position is, again, not the slot: it is that number is a cotangent, not an
angle, and that a reader who wants "the angle whose tangent is x" wants ATAN.
Returns Number — an angle in radians.
pi/2. This is the case that separates the two branch conventions, and it is
the one worth checking first in any implementation.(pi/2, pi) on the documented convention — never
negative. A negative result from ACOT would be evidence of the other convention.pi from below, and the
corresponding question is whether they saturate at exactly pi.pi/2, indistinguishably from zero.ACOT is one of the trigonometric surfaces added in Excel 2013, alongside ACOTH, SEC, CSC,
COT and their hyperbolic partners. Workbooks that must open in earlier versions substitute
PI()/2 - ATAN(x), which is the same function on the documented convention.
| Error | Condition | Source |
|---|---|---|
#VALUE! | The argument does not convert to a number | Shared coercion rules |
| propagated | An error value in the argument is returned unchanged | Shared coercion rules |
ACOT is analytically the tamest function on this batch of pages — bounded derivative, no
singularities, no domain edge — and it has one sharp numerical problem, which comes entirely from
how it is usually computed.
Catastrophic cancellation in pi/2 - atan(x). The identity is exact in mathematics. In binary64
it is not: as x grows, atan(x) approaches pi/2, and the subtraction of two nearly equal
quantities destroys the relative accuracy of a result that is itself near zero. The failure is
progressive and total:
atan(x) becomes exactly the double nearest pi/2 once x exceeds
roughly 2^53 — beyond which the subtraction returns a fixed, tiny residue and then, past
another threshold, exactly zero.acot(x) at those arguments is approximately 1/x, a perfectly representable positive
number all the way down to the subnormal floor.1e16, which is more than
290 decades of the double range — on which pi/2 - atan(x) has no correct significant digits
at all, and eventually returns a value outside the function's own open range.This is the mirror image of the ATAN situation: ATAN is accurate for large x because its
answer is large; ACOT's answer is small there, and small answers reached by subtraction are
where relative accuracy goes to die.
The standard remedy is the reciprocal reduction, and it is one line:
acot(x) = atan(1/x) for x >= 1 (result in (0, pi/4])
acot(x) = pi + atan(1/x) for x <= -1 (result in [3pi/4, pi))
acot(x) = pi/2 - atan(x) for |x| < 1
Inside the unit interval the subtraction is harmless — both terms are of order one and the answer
is of order one. Outside it, 1/x is small and atan of a small argument is accurate to the last
bit, so acot(x) inherits full relative accuracy right down to the subnormals. Cody & Waite give
this reduction for the ATAN/ACOT pair; it is the same trick, run the other way, that makes
ATAN accurate for large arguments.
Cost of the remedy: one division and one comparison. There is no accuracy trade-off, no extra
polynomial, and no branch subtlety beyond getting the x <= -1 offset right.
A self-test without an oracle. TAN(ACOT(x)) * x should be 1, and ACOT(x) + ACOT(-x)
should be PI(). Sweeping the first across many decades of x shows the exact point where the
subtraction stops carrying information, without needing any high-precision reference.
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
ACOT · 1 lines · calc-func/src/catalogue/math.rs on GitHub3 acot "ACOT" (1, 1) [V "number"] |s, a, sv| { unary(s, a, k::acot::acot_kernel) }
acot_kernel · 20 lines · calc-func/src/ported/acot.rs on GitHubpub fn acot_kernel(n: f64) -> Result<f64, WorksheetErrorCode> {
// W111 distinguishes this reciprocal/angle graph from direct atan2 and
// from a binary64-only reciprocal. It is an observed arithmetic model,
// not a claim about Excel internals or universal FPATAN parity.
if n == 0.0 {
return Ok(std::f64::consts::FRAC_PI_2);
}
let reciprocal = crate::ported::excel_numeric::excel_x87_recip(n);
let angle = crate::ported::excel_numeric::excel_atan_reduced(reciprocal);
let result = if n < 0.0 {
angle + std::f64::consts::PI
} else {
angle
};
Ok(if result.abs() < f64::MIN_POSITIVE {
0.0
} else {
result
})
}
unary catalogue/mathatan_with ported/excel_numericatan_reduced_with ported/excel_numericbinary_with ported/excel_numericexcel_x87_recip ported/excel_numericexcel_atan_reduced ported/excel_numericpack_raw ported/excel_numeric/soft87zero ported/excel_numeric/soft87inf ported/excel_numeric/soft87pack ported/excel_numeric/soft87ext_pi ported/excel_numeric/soft87ext_one ported/excel_numeric/soft87atan ported/excel_numeric/x87atan_reduced ported/excel_numeric/x87recip ported/excel_numeric/x87No implementation has been published with a Handbook test suite for this function.
The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.
| Excel 16.0 build | Platform and CPU | Captured inputs |
|---|---|---|
| 19929 | Windows, bitness not recorded, CPU not recorded | 45 |
| 20430 | Windows, 64-bit, CPU not recorded | 16,924 |
Agreement on these compared inputs does not establish agreement on unmeasured inputs.
Recorded environments and comparison details.
Windows, bitness not recorded, CPU not recorded
45 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.
Windows, 64-bit, CPU not recorded
16,924 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.
COT — the forward function. COT(ACOT(x)) = x to rounding; ACOT(COT(t)) recovers t
only for t in (0, pi).ACOTH — the hyperbolic namesake, and a genuinely different shape: its domain excludes
[-1, 1] entirely, where ACOT accepts everything.ACOS — shares the stated range 0 to pi, and shares nothing else. The discriminator is
the domain: ACOS takes [-1, 1], ACOT takes all of R. Two surfaces with the same stated
range are a live confusion, and this is the pair.ATAN2 — the four-quadrant route. ACOT(x) is ATAN2(x, 1) in Excel's x-first argument
order, and that formulation is better behaved at large |x| than the subtraction is.1/ATAN(x), which is not any inverse cotangent; and ATAN(1/x), which is
the other branch convention and differs by pi for negative arguments.No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents