R.DRAYLEIGH Function (Gnumeric)
Evaluate Rayleigh density with Gnumeric R.DRAYLEIGH. Verify the scale convention, Weibull relationship, zero boundary and extreme log-density behavior.
Verification status: 20 reference, boundary and advanced-check formulas were recalculated with Gnumeric 1.12.57 ssconvert. Saved identities, the blank input and numerical results were independently checked. Gnumeric 1.12.62 was source-checked only. How formula examples are checked
Quick answer: =R.DRAYLEIGH(1,1) gives 0.606530659713 in Gnumeric 1.12.57.
Availability and version history
- Introduced: Introduced in Gnumeric 1.12.25 release notes.
- Supported in: Gnumeric 1.12.62; no retirement is established.
- Scope: Desktop Gnumeric with its Statistical Functions From R 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 R.DRAYLEIGH returns
R.DRAYLEIGH gives density x/scale²×EXP(−x²/(2scale²)) for positive x, or its natural logarithm. Scale is positive. This is a continuous density on nonnegative observations, not a point probability. Versioned function help.
Syntax and arguments
=R.DRAYLEIGH(x,scale[,give_log])
x and scale are required. Optional give_log defaults to FALSE. x and scale use the same units. The scale is not the Weibull scale: the equivalent Weibull distribution has shape 2 and scale SQRT(2)×RayleighScale.
Brackets mark optional arguments; do not type them. Current worksheet implementation.
Reproducible examples
These self-contained formulas were recalculated natively. Ordinary-domain results were checked against independent mathematics; source guards explain the boundary cases. Results are rounded to twelve decimal places, or thirteen significant digits for small nonzero values. This is presentation precision, not a universal accuracy guarantee.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=R.DRAYLEIGH(1,1) |
0.606530659713 |
=R.DRAYLEIGH(2,1) |
0.270670566473 |
=R.DRAYLEIGH(3,2) |
0.243489350519 |
=R.DRAYLEIGH(1,2) |
0.220624225646 |
=R.DRAYLEIGH(1,1,TRUE()) |
-0.5 |
=R.DRAYLEIGH(2,1,TRUE()) |
-1.30685281944 |
=R.DRAYLEIGH(0,1) |
0 |
=R.DRAYLEIGH(4,2) |
0.135335283237 |
Practical worksheet
At x=1 and scale 1, the density is EXP(−1/2), approximately 0.606530659713. At x=2 it is 2×EXP(−2), approximately 0.270670566473. For scale 2 and x=3, it is approximately 0.243489350519.
A worksheet curve can place nonnegative observations in A2:A20 and use =R.DRAYLEIGH(A2,1). The density is largest at x equal to scale. Probabilities over intervals require integration or the corresponding cumulative model, rather than treating these heights as probability masses.
Advanced interpretation and checks
The executed check compares x=2, scale 1 with Weibull shape 2 and scale SQRT(2), returning zero residual in the selected case. The implementation uses a normal-density relationship instead of directly calling that Weibull expression to avoid introducing an inexact SQRT(2) scale.
The log-density formula is LN(x)−2LN(scale)−x²/(2scale²). At x=1000 and scale 1, the ordinary native density underflows to zero, while the log value remains approximately −499993.092244721. A zero ordinary result at that finite x is numerical underflow, not a zero mathematical density.
The saved advanced-check result for =R.DRAYLEIGH(2,1)-R.DWEIBULL(2,2,SQRT(2)) was 0.
Boundaries and troubleshooting
Zero or negative x returns density zero. Asking for its log reaches negative infinity and displays #NUM!. Nonpositive scale also gives #NUM!, for a different reason.
Numeric text is parsed, nonnumeric text gives #VALUE!, and empty F5 behaves as zero. Wrong arity gives #N/A. The direct and log-density cases establish only the retained 1.12.57 examples; the complete helper is unchanged in inspected 1.12.62 source, but that newer build was not executed.
F5 is genuinely empty, rather than a cell containing an empty string.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=R.DRAYLEIGH(-1,1) |
0 |
=R.DRAYLEIGH(0,1,TRUE()) |
#NUM! |
=R.DRAYLEIGH(1,0) |
#NUM! |
=R.DRAYLEIGH(1,-1) |
#NUM! |
=R.DRAYLEIGH(1000,1) |
0 |
=R.DRAYLEIGH(1000,1,TRUE()) |
-499993.092244721 |
=R.DRAYLEIGH("2",1) |
0.270670566473 |
=R.DRAYLEIGH("abc",1) |
#VALUE! |
=R.DRAYLEIGH(F5,1) |
0 |
=R.DRAYLEIGH(1) |
#N/A |
=R.DRAYLEIGH(1,1,0,1) |
#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
- Statistical Functions From R plugin declaration
The relevant complete worksheet callback and main calculation helper are unchanged between the inspected versions. That does not establish later-version numerical execution. Both stale and uncached SUM controls recalculated correctly. Native XML preserves the R.* identities. The secondary ODF export keeps these calls in the ORG.GNUMERIC namespace; it does not establish execution in another product. GUI entry, other locales and other spreadsheet products were not tested.