RAYLEIGH Function (Gnumeric)
Calculate Gnumeric Rayleigh densities with RAYLEIGH. See positive scale, magnitude models, tail probabilities, native examples and support limits.
Verification status: 19 selected reference, boundary and advanced-check expressions were recalculated with Gnumeric 1.12.57 ssconvert. Saved identities, the blank input and results were independently checked. Gnumeric 1.12.62 was source-checked only. How formula examples are checked
Quick answer: =RAYLEIGH(0,1) gives 0 in Gnumeric 1.12.57.
Availability and version history
- Introduced: Introduced in Gnumeric 1.1.7 release notes.
- Supported in: Gnumeric 1.12.62; no retirement is established.
- Scope: Desktop Gnumeric with its Statistics plugin. English comma-separated formulas are shown.
- Checked: October 14, 2026. Tables and the named advanced check use 1.12.57 ssconvert. Current 1.12.62 source was inspected; that release was not executed.
What RAYLEIGH returns
RAYLEIGH(x,scale) returns x/scale^2*EXP(-x^2/(2*scale^2)) for nonnegative x and zero below zero. It is a density, not a cumulative probability. The Rayleigh model describes, for example, the magnitude of two independent zero-mean normal components having the same standard deviation, with that component standard deviation used as the Rayleigh scale. Versioned function help.
Syntax and arguments
=RAYLEIGH(x,scale)
| Argument | Meaning |
|---|---|
x |
Nonnegative magnitude; values below zero have density zero. |
scale |
Positive common component standard deviation. |
Both arguments are required. There is no location or cumulative flag.
Reproducible examples
The native column comes from saved recalculated formulas. The separate reference column evaluates the stated mathematical model, preserving approximation differences. Results are rounded to twelve decimal places, or thirteen significant digits for small nonzero values; printed precision is not a universal accuracy guarantee.
| Formula | Gnumeric 1.12.57 result | Independent mathematical reference |
|---|---|---|
=RAYLEIGH(0,1) |
0 |
0 |
=RAYLEIGH(1,1) |
0.606530659713 |
0.606530659713 |
=RAYLEIGH(2,1) |
0.270670566473 |
0.270670566473 |
=RAYLEIGH(3,2) |
0.243489350519 |
0.243489350519 |
=RAYLEIGH(2,2) |
0.303265329856 |
0.303265329856 |
=RAYLEIGH(.4,1) |
0.369246538555 |
0.369246538555 |
=RAYLEIGH(1,.5) |
0.541341132946 |
0.541341132946 |
=RAYLEIGH(4,2) |
0.135335283237 |
0.135335283237 |
Practical worksheet
For a two-component magnitude model with scale 1, =RAYLEIGH(2,1) gives about 0.270670566473. The mathematical probability of a magnitude at most 2 is instead =1-EXP(-2^2/(2*1^2)), about 0.864664716763. The difference matters when choosing a chart height versus a probability threshold.
Put magnitude in A2 and scale in B2, then use =RAYLEIGH(A2,B2). Magnitude and scale must share units. Equal component variance and independence are assumptions of the illustrative model, not properties the function can infer from a column of data.
Advanced interpretation and checks
The density is zero at x = 0, rises to its mode at x = scale, then falls. With scale 1, the mean is SQRT(PI()/2), about 1.253314137316, which differs from both the scale and the mode.
The current callback delegates to the same drayleigh calculation used by R.DRAYLEIGH with logarithmic output disabled. The saved check =RAYLEIGH(2,1)-R.DRAYLEIGH(2,1) returned zero. Use the R-family CDF or quantile guides when you need accumulated probabilities or thresholds; do not sum density samples as though they were discrete probabilities.
The saved advanced-check result for =RAYLEIGH(2,1)-R.DRAYLEIGH(2,1) was 0.
Boundaries and troubleshooting
Negative x returned zero with a valid scale. Zero and negative scales produced #NUM!, including x = 0 with scale zero. =RAYLEIGH(1000,1) underflowed to zero even though the exact positive-x density is nonzero.
Numeric text was accepted, nonnumeric text produced #VALUE!, and the empty x reference acted as zero. Incorrect argument counts produced #N/A. These observations establish the displayed scalar cases, not arbitrary extreme-input accuracy.
F5 is genuinely empty, rather than a cell containing an empty string.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=RAYLEIGH(-1,1) |
0 |
=RAYLEIGH(1,0) |
#NUM! |
=RAYLEIGH(1,-1) |
#NUM! |
=RAYLEIGH(0,0) |
#NUM! |
=RAYLEIGH(1000,1) |
0 |
=RAYLEIGH("1",1) |
0.606530659713 |
=RAYLEIGH("abc",1) |
#VALUE! |
=RAYLEIGH(F5,1) |
0 |
=RAYLEIGH(1) |
#N/A |
=RAYLEIGH(1,1,0) |
#N/A |
Official evidence and checking scope
- Current worksheet callback
- Tested-version worksheet callback
- Current drayleigh calculation
- Tested-version drayleigh calculation
- Nonfinite worksheet-value handling
- Statistics plugin declaration
The complete callback and inspected calculation helpers are unchanged between these source versions. Both stale and uncached SUM controls recalculated correctly. Native XML retains the function identities; secondary ODF export does not establish execution in another product. GUI entry, other locales and newer-release numerical behavior were not tested.