Contact

RANDNORM in Calligra Sheets: Identify the Broken Normal Transformation

Math Intermediate Calligra Sheets

Learn Calligra Sheets RANDNORM with exact arguments, reproducible inputs, independently checked results and implementation-specific cautions.

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

Quick answer and warning

RANDNORM(mu; sigma) is documented as a normal random generator, but the inspected transformation contains an assignment error. For positive sigma, its accepted mathematical results lie below mu, rather than being centered around it. Do not use this implementation as a verified normal-distribution generator.

Syntax and the active source issue

=RANDNORM(mu; sigma)

Exactly two arguments are required. The KDE RANDNORM entry describes mean and dispersion parameters. The source intends a polar Box–Muller transformation, but after generating x1 and x2 it assigns x1 = x1−1 and then x1 = x2−1, leaving x2 uncentered.

Consequently, if t is that uncentered x2, the accepted squared radius is (t−1)²+t² < 1. Independent algebra gives 0<t<1, hence x1=t−1<0. The square-root factor is positive, so multiplying by a positive sigma and adding mu produces a value below mu. This is a structural source concern, not a statistical conclusion drawn from a few samples.

Reproduce a bounded probe and a constant control

  1. Enter =RANDNORM(10;2) in A2. Do not predict a numerical sample or expect it to equal the mean 10.
  2. Record the actual value with enough precision. The inspected transformation predicts a finite value below 10, subject to displayed rounding.
  3. Enter =RANDNORM(10;0) in A3. The expected result is 10: multiplying the generated component by zero removes it.

The zero-dispersion case checks an arithmetic boundary, not the correctness of the random distribution. A sample below 10 is compatible with an ordinary normal draw too, so one such observation alone would not prove the bug; the assignment and algebra establish the concern.

Practical consequence for simulated measurement error

A model that adds RANDNORM(0;2) as supposedly centered measurement error would receive only nonpositive deviations from this transformation, rather than balanced errors around zero. That can systematically bias scenario results downward.

Do not repair this by merely shifting the empirical sample average to zero. Centering a set of numbers does not establish normality, variance, independence or correct tails. Use a separately verified generator and retain its parameter convention alongside the model before interpreting simulation results.

Limits and cautions

  • There is no explicit sign validation of sigma in this wrapper. Acceptance of a negative value is not a valid standard-deviation convention.
  • No seed argument or fixed sequence is provided.
  • Formatting can round a result close to mu to the same visible number; inspect raw precision.
  • A tiny sample cannot certify distribution shape even after a suspected code repair.
  • This guide scopes the concern to the inspected source; an application carrying a different patch needs its own verification.
  • The function remains registered. An implementation defect is not itself evidence of deprecation or retirement.

Availability and verification

  • Release checked: Calligra Sheets 26.08.2, using KDE’s release source package and release information, inspected on October 18, 2026. Relevant locations: sheets/functions/math.cpp lines 200–202 and 756–780; sheets/engine/ValueCalc.cpp lines 746–754.
  • Introduced: The original introduction version is not established by these sources. Current registration establishes presence in 26.08.2, not the first release.
  • Lifecycle: Registered in the inspected release; no retirement or deprecation marker was found in this function’s registration. Retirement (removed support) and deprecation (discouraged but retained support) are different claims; neither is asserted here.
  • Native testing: Selected cases were recalculated and saved in Calligra Sheets 25.04.2. The source discussion concerns 26.08.2. Unlisted examples and edge cases remain source-derived or independently calculated.

Selected native results and screenshot

These results were observed in Calligra Sheets 25.04.2, using an ODS input evaluated and saved by the native application. Formula references and results were read back from the saved workbook. These are samples from one captured calculation state, not fixed expected future draws or a statistical distribution validation. Reopening or recalculating may produce different samples. The source discussion remains scoped to 26.08.2; native observations are 25.04.2.

Native formula Observed display
=RANDNORM(10;2) 8.9470832066
=RANDNORM(10;0) 10.0000000000

The native sample 8.9470832066 is below the specified mu=10, consistent with the source transformation. This one draw does not independently prove a distribution defect; the assignment error and algebra above establish the structural concern. The sigma=0 control returned 10.

Calligra Sheets 25.04.2 RANDNORM worksheet with F2 selected and formula bar visible

Screenshot: Genuine native 25.04.2 capture. Selected F2 contains =RANDNORM(10;2) and displays 8.9470832066. Column F contains application results; column G contains descriptive formula labels. Column G identifies the full formula. The formula bar can be horizontally clipped on longer function names; the saved workbook independently confirms the expression.