Formualizer Docs

COT

Returns the cotangent of an angle, defined as 1 / TAN(angle).

COT is useful when working with reciprocal tangent relationships.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=COT(number)

Arguments

ArgumentTypeRequiredDefault
numbernumberRequired—

How it works

Cotangent is cos(x) / sin(x) for a radian angle x. It is undefined at integer multiples of π.

Remarks

  • Domain: valid for all real angles except where TAN(angle) = 0.
  • Radians: input is interpreted in radians.

Error cases

  • Errors: returns #DIV/0! at or near integer multiples of PI().

Examples

Divide cosine by sine at one half radian.

Formula =COT(0.5)

Expected result 1.83048772171245

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Changing the sign of the angle changes the sign of its cotangent.

Formula =COT(-0.5)

Expected result -1.83048772171245

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Near zero, a small positive sine makes the cotangent large.

Formula =COT(0.01)

Expected result 99.9966666444442

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Nonnumeric text cannot be used as the input.

Formula =COT("invalid")

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Cotangent at PI over 4

Formula =COT(PI()/4)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Undefined cotangent at zero

Formula =COT(0)

Expected result #DIV/0!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Why is COT undefined at integer multiples of PI()?

At those points TAN is zero, so 1/TAN triggers a #DIV/0! condition.

Implementation

Engine source

On this page