Math and trigonometry functions

CSC

Matches all 2,139 recorded answers

Recorded: 2,136 in the answer bank and 3 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicCSC
BulgarianCSC
CzechCSC
DanishCSC
GermanCSC
GreekCSC
English (Australia)CSC
English (United Kingdom)CSC
English (United States)CSC
SpanishCSC
EstonianCSC
FinnishKOSEK
FrenchCSC
HebrewCSC
CroatianCSC
HungarianCSC
IndonesianCSC
ItalianCSC
JapaneseCSC
KoreanCSC
LithuanianCSC
LatvianCSC
NorwegianCSC
DutchCOSEC
PolishCSC
Portuguese (Brazil)CSC
Portuguese (Portugal)CSC
RomanianCSC
RussianCSC
SlovakCSC
SlovenianCSC
Serbian (Latin)CSC
SwedishCSC
ThaiCSC
TurkishCSC
UkrainianCSC
VietnameseCSC
Chinese (Simplified)CSC
Chinese (Hong Kong)CSC
Chinese (Traditional)CSC

Names from Microsoft's support site.

What it does

CSC(number)

CSC(number) returns the cosecant of an angle in radians. Microsoft's page states the identity outright: CSC(n) equals 1/SIN(n).

csc x = 1 / sin x
PropertyStatement
Domainall real x except x = kπ, k ∈ ℤ
Range(-∞, -1] ∪ [1, ∞) — ABS(csc x) ≥ 1 everywhere
Parityodd: csc(-x) = -csc(x)
Period2π
Polessimple, at x = kπ, residue (-1)^k
Extremacsc x = ±1 at x = π/2 + kπ; these are the local extrema, not zeros
Laurent series at 0csc x = 1/x + x/6 + 7x³/360 + … (A&S 4.3.68)
Derivatived/dx csc x = -csc x · cot x
Identitycsc²x - cot²x = 1
Zerosnone — the cosecant is never zero

That last row is the reader's most useful fact: CSC has no zeros, so a CSC result near zero is impossible and a CSC result of small magnitude is a bug. The function's values are bounded away from the origin and unbounded near every multiple of π.

As with COT, the poles matter less than they look. π is irrational, so the only pole that is a binary64 value is x = 0; at every other multiple of π the function returns a large finite number whose magnitude is roughly the reciprocal of the distance from the argument to the true pole.

Arguments

ArgumentMeaningConstraint (as documented)
numberThe angle in radians. Required.ABS(number) < 2^27

The slot takes ordinary to-number coercion; the surface is declared an elementwise scalar kernel. See Coercion and lifting.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Quirks

Result and edge cases

Returns Number with absolute value at least 1.

  • CSC(0) — 1/SIN(0) is a division by zero. Microsoft's page does not state the resulting error, where COT's page states #DIV/0! for the analogous case. #DIV/0! follows from the documented identity, but the identity is a definition, not an error specification, and the Handbook has not checked it. Recorded as a documentation gap.
  • Near other poles — a large finite value, sign alternating with the parity of k.
  • ABS result below 1 — impossible mathematically. A returned value in (-1, 1) would be a defect, and this is the cheapest invariant to test.
  • Beyond 2^27 — documented #NUM!.
  • Small arguments — csc x → 1/x, a huge finite number, overflowing only in the subnormal range.

Errors

As documented on Microsoft's CSC page:

ErrorCondition
#NUM!ABS(number) is not less than 2^27
#VALUE!number is non-numeric

The zero case is not documented on that page. See the note above.

How to implement

Numerical notes

The documented identity is unusually informative, because it tells you what the error looks like without needing an oracle.

Double rounding is structural here. If CSC(x) really is 1/SIN(x) evaluated on the published binary64 sine, then the cosecant's error is the sine's relative error, inverted, plus the rounding of one division. Two consequences follow. The good one: the relative error of CSC is bounded by the relative error of SIN plus half an ulp, so CSC is never much worse than SIN in relative terms. The bad one: it is never better either, and near the poles the sine's own relative error is at its worst, because that is where sin is small and its argument reduction dominates.

The reduction problem, inherited. EV-MATH-0004 identifies the substrate as the x87 FSIN/FPTAN chain with FPREM1 reduction against the 64-bit ROM π, rules out Cody–Waite reduction against extended π, and attaches a host-CPU microcode caveat to all six circular surfaces. The record states each of the six was scored individually, so CSC is a measured surface rather than one whose status was inherited from SIN. Its figures render in the evidence layer beside this page.

Where the amplification lives. Near a pole kπ, write x = kπ + δ. Then csc x ≈ (-1)^k / δ. The reduced argument δ is computed by subtracting a stored multiple of π from x, so its absolute error is roughly ABS(x) · 2^-p for a p-bit reduction constant. The relative error of the result is therefore about ABS(x)·2^-p / ABS(δ) — it grows with the argument and blows up as the argument approaches a pole. This is the analysis that makes a documented 2^27 bound a reasonable engineering decision rather than an arbitrary one: past that magnitude the reduced argument carries no reliable bits at all.

Near zero, use 1/x + x/6 + 7x³/360 (A&S 4.3.68) rather than a division, both for speed and because it gives the deviation from 1/x directly.

A natural-best implementation would not use the published sine. It would perform one reduction, evaluate sin r in extended precision, and reciprocate before rounding — one rounding instead of two, and the pole located consistently with the reduction. That is a different function from the documented one, which is exactly why the flavour distinction in About implementation options exists.

Rust code

Show the CalcFunc source of this function

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.

CSC · 1 lines · calc-func/src/catalogue/math.rs on GitHub
14 csc "CSC" (1, 1) [V "number"] |s, a, sv| { unary(s, a, k::csc::csc_kernel) }
csc_kernel · 9 lines · calc-func/src/ported/csc.rs on GitHub
pub fn csc_kernel(n: f64) -> Result<f64, WorksheetErrorCode> {
    ExcelRealPolicy::CIRCULAR_TRIG.check_arg(n)?;
    // W109 G4-01: CSC = RN53(RN64(1/SIN)) over the published SIN chain.
    let sin = crate::ported::excel_numeric::excel_sin(n);
    if sin == 0.0 {
        return Err(WorksheetErrorCode::Div0);
    }
    Ok(crate::ported::excel_numeric::excel_x87_recip(sin))
}

Kernels shared with other functions

Argument and result plumbing

  • num catalogue/kit
  • out catalogue/kit

No implementation has been published with a Handbook test suite for this function.

Version differences

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 buildPlatform and CPUCaptured inputs
19929Windows, bitness not recorded, CPU not recorded31
20131Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics912
20430Windows, 64-bit, CPU not recorded1,224
  • XC-CSC-001: build 19929 versus build 20430; 1 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.
  • XC-CSC-002: build 20131 versus build 20430; 1 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.

Agreement on these compared inputs does not establish agreement on unmeasured inputs.

Recorded environments and comparison details.

Excel 16.0 build 19929

Windows, bitness not recorded, CPU not recorded

31 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.

Excel 16.0 build 20131

Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics

912 captured inputs are indexed for this environment. Capture dates: 2026-07-11 to 2026-07-11. This is a reading count, not a comparison with another build.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

1,224 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.

Alternatives

Relationships

  • SIN — the reciprocal, named by the documentation itself. EV-MATH-0004 records that the three reciprocal surfaces are built as excel_x87_recip of the published primaries, which is exactly what the documented identity CSC(n) = 1/SIN(n) describes: the reciprocal of the already-rounded binary64 sine, not an independently computed cosecant.
  • SEC, COT — the other two reciprocals from the same 2013 batch, sharing the documentation template and the 2^27 bound.
  • COS, TAN — the primaries. csc x = sec(π/2 - x).
  • ASIN — there is no ACSC on the worksheet surface; ASIN(1/x) is the substitute.
  • CSCH — the hyperbolic partner, csch x = -i·csc(ix), sharing the 1/x leading term and the pole at the origin.
  • IMCSC — the complex version.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents