RANDLAPLACE Function (Gnumeric)
RANDLAPLACE(a) generates a zero-centered, two-sided exponential variate. Its parameter is a scale, with ideal standard deviation a×SQRT(2), rather than the standard deviation itself.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: RANDLAPLACE(a) generates a zero-centered, two-sided exponential variate. Its parameter is a scale, with ideal standard deviation a×SQRT(2), rather than the standard deviation itself.
Syntax
=RANDLAPLACE(a)
Availability and evidence
- Introduction: Gnumeric 1.1.6 NEWS explicitly lists this new function. This release-history evidence is separate from a native test of that old version.
- Source support: Registered in the Gnumeric 1.12.62 random plugin. No retirement is established; the last functioning native application version is unverified.
- Evidence dates: Official Gnumeric source retained October 13–14, 2026 was reviewed October 15. Mathematical controls were independently recalculated October 15. No native application, compiled Gnumeric helper or random generator was executed.
Parameter and source contract
The required scale a is nonnegative. Negative a leads to #NUM!. The ideal positive-scale density is EXP(-ABS(x)/a)/(2*a), symmetric about zero, with mean and median 0 and variance 2*a².
The source forms T=2*U-1 from its unit driver and retries if T=0. It then returns a*LN(-T) when T is negative, or -a*LN(T) when T is positive. This is the actual source mapping used for the controls below. It is not a monotone inverse-CDF mapping from U across the whole interval.
Complete worksheet setup
Create LaplaceControls. Put scale 2 in B2 and a separate location 10 in B3. In D2 enter =RANDLAPLACE($B$2). In D3 enter =$B$3+D2 to shift that same variate. Neither random result has a fixed expected value; D3 minus D2 is the deterministic location 10.
The ideal distribution for D2 has standard deviation =B2*SQRT(2), approximately 2.82842712475. D3 has ideal mean 10 and the same standard deviation. Adding a location does not change scale, and the function itself has no location argument.
Deterministic source-transform controls
Put 0.125, 0.25, 0.75 and 0.875 in A7:A10. In B7 enter =2*A7-1. In C7 enter =IF(B7<0,$B$2*LN(-B7),-$B$2*LN(B7)). Fill B7:C7 down through row10. The independent outputs are:
| Supplied input or control | Independent reference result |
|---|---|
| U=.125; T=-0.75 | -0.5753641449036 |
| U=.25; T=-0.5 | -1.38629436112 |
| U=.75; T=0.5 | 1.38629436112 |
| U=.875; T=0.75 | 0.5753641449036 |
Do not put U=0.5 into this literal teaching formula: T would be zero and LN(0) is not the source’s retry operation. The native helper rejects that driver and requests another one. At U=0, T=-1 and the source transform gives 0; zero is therefore a possible finite-driver boundary value, although an ideal continuous model assigns every exact point probability zero.
Advanced: specify a desired standard deviation
If a scenario requires ideal standard deviation 3, the scale is =3/SQRT(2), approximately 2.12132034356. Supplying 3 directly would instead give ideal standard deviation approximately 4.24264068712, and variance 18 rather than 9.
For the original scale 2, variance is 8. This distinction matters whenever the function is used as an additive error model: its argument cannot be copied blindly from a column labeled standard deviation.
Advanced: calculate a two-sided threshold
For the ideal zero-centered Laplace model, the probability of ABS(X)>t is EXP(-t/a) for nonnegative t. With scale 2 and threshold6, enter =EXP(-6/$B$2) in F3. The result is approximately 0.0497870683679.
The probability of lying between -6 and 6 is therefore approximately 0.950212931632. After adding location 10, the corresponding interval is 4 through 16. Those probabilities describe a population model; no count of worksheet successes was generated here.
A threshold based on three times the scale is not the same as three standard deviations. Here 6 is about 2.1213 standard deviations because the standard deviation is2*SQRT(2).
Advanced: keep dependence visible
D3 deliberately references D2 so the shifted value uses the same draw. Replacing it with =10+RANDLAPLACE(2) creates a separate generator call. Conversely, summing ten references to D2 repeats one random value; it is not a ten-observation independent sample.
The symmetric Laplace tails can generate relatively large deviations. Symmetry alone does not give a finite hard upper or lower bound, and finite pseudorandom arithmetic is not proof that arbitrarily extreme mathematical values will appear in a particular workbook.
Zero scale
=RANDLAPLACE(0) gives 0 for the accepted finite transforms. Unlike RANDWEIBULL’s early-return zero-scale branch, this helper still obtains a unit driver and can retry before multiplication. Do not infer that zero scale leaves shared generator state unchanged. =RANDLAPLACE(-2) is the separate #NUM! validation control.
Working with a changing result
The function is registered as volatile. A recalculation can replace its result; neither a copied screenshot nor an earlier value is a promised next draw. There is no seed argument in this function’s worksheet signature. Exact recalculation triggers, shared-generator sequencing and saved-file replay were not tested.
The controls below separate a changing random formula from deterministic arithmetic. The supplied driver values are teaching inputs, not values captured from Gnumeric’s generator. Population summaries describe the ideal continuous distribution and are not empirical certifications of the finite-resolution implementation.
Troubleshooting and verification limits
Use explicit finite numeric inputs for these controls. Text parsing, blank-cell coercion, locale-specific separators and array broadcasting are outside the verified examples. The numeric result constructor turns non-finite arithmetic into #NUM!; very large parameters or extreme transformed values can therefore fail even when the mathematical distribution is defined.
The underlying unit generator has finite resolution. Endpoint exclusions, rounding, overflow and underflow mean a theoretical continuous distribution is not a literal list of every machine output. No random samples, native worksheet execution, distribution-quality test, GUI operation or cross-application file transfer was performed for this guide. The executable checks verify deterministic transformations and mathematical reference values only.