Contact

ERFC in Calligra Sheets: Complementary Error Function and Interval Pitfall

Engineering Advanced Calligra Sheets

Calculate complementary Gaussian error-function values, including the surprising two-argument source behavior, with reproducible examples.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer

=ERFC(1) has an independently expected result of 0.157299207050. Beware: the source branch for two arguments makes =ERFC(0;1) expect −0.842700792950, not a positive probability. All results here are independent arithmetic expectations, not Calligra runtime observations. The exact function name and 1–2-argument registration appear in KDE’s pinned 26.08.2 source; details are confirmed with the calculation branch, XML function definition and official handbook. Source consultation: 2026-10-13.

Availability and version history

  • First introduced: Introduction version not established.
  • Current support: Registered in Calligra Sheets 26.08.2; see the function-specific source and official release listing. This is support evidence for that release, not a final supported version.
  • Platform and retirement: The KDE application listing provides Linux installation. Other packaged platforms/builds and a retirement endpoint have not been established.
  • Checked: October 14, 2026. Native test: Not executed in Calligra Sheets.

Examples use semicolons and decimal points, matching the English formula handbook. Numerical results were checked independently against the published implementation. Calligra itself was not run, so packaged-build behavior, locale handling and displayed errors remain untested.

Syntax, arguments and defaults

=ERFC(x)
=ERFC(lower;upper)
Argument Required / source type Interpretation
lower Required; documented Float Single-input case evaluates erfc(lower); with two inputs, first bound.
upper Optional in the registered function; numeric input With two inputs, pinned code computes erfc(upper)-erfc(lower); no default for omitted slot.

The pinned registration permits one or two arguments, with an explicit alternate compatibility name COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETERFC. This is a compatibility spelling of the same registered function; use the shorter name in ordinary formulas. KDE’s engineering XML and C++ registration were checked separately.

Documentation mismatch: The XML’s second parameter is not marked optional, yet the pinned C++ accepts one argument and the handbook shows a one-argument example. Treat one-input support as documented/source-backed, not native-executed. Do not invent a default upper bound: a one-input call uses a distinct calculation branch rather than supplying an upper value.

Reproducible worksheet: 13 independently calculated cases

  1. Open a blank Calligra Sheets document. Enter First input / value in A1, Second input / bound (optional) in B1, and Formula result in C1. Use D1 for notes if recording native observations later. Confirm the formula editor recognizes the = prefix and ; separator in your locale.
  2. Type the numeric values below into A2:B14. Rows labelled omit optional argument are intentionally single-argument formulas; leave the B cell blank and do not pass B in that row’s formula. The blank column cell alone is not a demonstrated default.
  3. Copy the displayed formula text for each row into the corresponding C cell. Each example uses its own references. Do not simply fill down a two-argument formula across single-argument rows.
  4. Format the output column to about 12 decimal places. Compare with the independent expected output column. The values are predictions derived outside Calligra, not screenshots or logs of native runs.
  5. If running the test independently, note Calligra version, operating system, locale and any observed errors; do not treat source predictions as proof that the application returned them.
Row A input B input Formula placed in C Independently expected output
2 0 (blank; omit optional argument) =ERFC(A2) 1
3 1 (blank; omit optional argument) =ERFC(A3) 0.15729920705
4 2 (blank; omit optional argument) =ERFC(A4) 0.004677734981
5 0.4 (blank; omit optional argument) =ERFC(A5) 0.571607644953
6 -1 (blank; omit optional argument) =ERFC(A6) 1.84270079295
7 0.5 (blank; omit optional argument) =ERFC(A7) 0.479500122187
8 0 1 =ERFC(A8;B8) -0.84270079295
9 1 0 =ERFC(A9;B9) 0.84270079295
10 -1 1 =ERFC(A10;B10) -1.685401585899
11 1 2 =ERFC(A11;B11) -0.152621472069
12 -0.5 0.5 =ERFC(A12;B12) -1.040999755626
13 -2 -1 =ERFC(A13;B13) -0.152621472069
14 1.5 (blank; omit optional argument) =ERFC(A14) 0.033894853525

Mathematical meaning and an important two-argument pitfall

The complementary error function is erfc(x) = 1 − erf(x). With one argument the pinned implementation returns calc->erfc(x). Independently, ERFC(0) is expected 1, ERFC(1) approximately 0.157299207050, and ERFC(-1) approximately 1.842700792950. Values above 1 for negative x are normal mathematically; erfc is not inherently a probability for every x.

Important source-code finding: For two arguments the inspected Calligra 26.08.2 implementation returns erfc(upper) − erfc(lower), not erfc(lower) − erfc(upper). Because erfc decreases with x, =ERFC(0;1) is expected from the code to be −0.842700792950. This is the negative of =ERF(0;1). It is not a probability and can surprise users expecting the positive area under an integrand. The XML documentation says only that ERFC returns the complementary error function; it does not spell out this two-bound sign choice. Native execution has not been performed, so the release-pinned branch is strong source evidence but not a screenshot-confirmed application result. KDE code; KDE XML metadata.

One versus two arguments: XML renders both parameter nodes without optional=true, while the C++ registration allows 1–2, and the handbook includes ERFC(0.4) as a one-input example. Both forms are documented in the guide with this inconsistency prominently flagged; the actual function-dialog behavior still requires a native run. Registration; handbook.

Advanced examples and applications

Calculate a one-sided Gaussian tail without subtracting nearly equal numbers

Mathematically, the standard-normal upper-tail probability is 0.5*erfc(z/√2). For z=2, the conceptual Calligra expression =0.5*ERFC(2/SQRT(2)) has an independently calculated expected value 0.022750131948. It uses one input to ERFC and a separate documented SQRT; the full combined formula has not been run in Calligra. The one-input ERFC form is often preferable to subtracting a CDF extremely close to 1, though native numerical accuracy is not established. KDE SQRT handbook.

Cross-check the complement identity for a single input

For x=0.4, =ERF(0.4) is independently expected 0.428392355047 and =ERFC(0.4) 0.571607644953. Adding them mathematically gives exactly 1 within floating-point rounding. This comparison is evidence-based from the two C++ branches and the standard mathematical definitions; it is not an executed worksheet test.

Beware the two-input sign trap

The independent predictions are =ERFC(0;1) −0.842700792950 and =ERFC(1;0) +0.842700792950. The two-input ERF branch has the opposite sign in the corresponding order. If your intent is a positive interval integral, use =ERF(lower;upper) based on the signed interval of erf (with the appropriate model scaling), rather than silently assuming ERFC(lower;upper) returns the same sign. Confirm with the actual application before using in operational analysis.

Troubleshooting, domain and numeric limits

Issue Source/documented explanation Recommended action
Unexpected negative two-bound output Pinned source subtracts erfc(lower) from erfc(upper). Check both inputs’ order; document that two-input sign choice.
Complement expected to stay within 0–1 erfc(x) can exceed 1 for negative x; two-bound signed differences can be negative. Treat it as a special function, not automatically a probability.
XML appears to require two inputs C++ explicitly accepts 1–2, handbook gives one-input example. Validate formula dialog with installed package.
Naive 1-ERF(x) loses tiny tails Subtracting nearly equal floats can lose precision; direct ERFC is mathematically preferable. Use one-input ERFC for tail expressions and independently audit numerical precision.
Output approaches 0 for large positive input The mathematical erfc decreases toward zero; exact underflow threshold depends on implementation. Avoid claiming a particular native saturation or underflow boundary.
String and empty cell cases Declared XML types are floating point; Calligra coercion/errors untested. Validate input types explicitly.
Wrong function/locale parsing Function name is ERFC, English separator ;, not a comma example copied from another software. Check the formula editor and localized conventions.

Relationship to ERF and the normal distribution

ERFC is explicitly listed as related to ERF in KDE’s XML function description. For a single x, ERFC(x)=1-ERF(x) is reliable mathematical reasoning. For two bounds, subtracting two complements cancels 1 and reverses the ERF difference; the exact source branch is critical. This is a concrete reason not to port a similarly named function’s calling convention from Excel, LibreOffice or Google Sheets without verifying Calligra itself.

These are documentation and source checks. All displayed results are independent expectations, not claims of an executed Calligra worksheet.