RANDEXP in Calligra Sheets: Recognize the Missing Logarithm
Learn Calligra Sheets RANDEXP 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
The inspected RANDEXP(x) implementation does not implement the documented exponential transformation. Although its source comment mentions a logarithm, the executed expression is simply −x × U, where 0 ≤ U < 1. For a positive x, the result is nonpositive. Do not use it as an exponential waiting-time generator in this release without resolving the discrepancy.
Syntax and source behavior
=RANDEXP(x)
One argument is accepted by the default function registration. The handbook describes a positive parameter for an exponential random value. The active wrapper multiplies x by −1 and then by the random value; there is no call to the logarithm helper in that expression and no explicit positive-domain validation.
The KDE RANDEXP documentation gives the intended family. This guide distinguishes that intent from the inspected executable source.
Check the sign and degenerate case
- Enter
=RANDEXP(2)in A2. - Display decimal places. The source-derived interval is −2 < A2 ≤ 0, not a positive waiting time.
- Check
=AND(A2>-2;A2<=0), expected true for the implemented expression. - Enter
=RANDEXP(0)in A3. Source-derived expected result: 0. Zero is an implementation probe, not the handbook’s positive parameter domain.
There is no fixed expected random value for A2. A negative result would be a useful confirmation of the sign problem but would not by itself characterize a distribution. The algebra −2U establishes the interval independently of any particular sample.
Practical consequence for a queue model
Suppose a workbook uses this function for the time until the next arrival. A nonpositive sampled delay can move an event backward in time or collapse multiple arrivals onto one time. Flag the model rather than taking absolute values or changing formatting and assuming the exponential distribution has been restored.
Negating the implemented result would give xU, a bounded scaling of the original sample, not the missing logarithmic transformation. A positive sign alone is therefore not sufficient validation. Use a separately verified generator and test its parameter convention, endpoint handling and units before using it for a simulation.
Limits and availability
- The wrapper does not establish errors for zero or negative x; the lack of a guard is not a recommendation to use those inputs.
- A sampled result is not expected to equal a theoretical mean.
- There is no seed argument and no documented refresh cadence established by this wrapper.
- A source defect is different from deprecation or retirement. The function is still registered in the inspected release.
- Do not infer a repair in another version from its function name; recheck the actual implementation and native behavior.
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.cpplines 195–196 and 688–692;sheets/engine/Function.cpplines 22–30;sheets/engine/ValueCalc.cpplines 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.
Related guides and sources
- AND
- IF
- LN
- EXP
- Calligra function guide index
- KDE formula entry instructions, checked October 18, 2026. Examples use leading
=and semicolons, with a period for decimal numbers. Confirm regional separators in your installation before pasting.
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 |
|---|---|
=RANDEXP(2) |
-0.5421526656 |
=RANDEXP(0) |
0.0000000000 |
The native negative value for the positive parameter 2 confirms the sign problem in 25.04.2. It is consistent with the inspected −2U expression and is not a valid positive exponential waiting-time sample.

Screenshot: Genuine native 25.04.2 capture. Selected F2 contains =RANDEXP(2) and displays -0.5421526656. 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.