Contact

R.PRAYLEIGH Function (Gnumeric)

Statistical Intermediate Gnumeric Gnumeric 1.12.25

Calculate Rayleigh probabilities with Gnumeric R.PRAYLEIGH. Verify scale, survival and log-tail inputs, support boundaries and a stable extreme-tail example.

Verification status: 21 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.PRAYLEIGH(1,1) gives 0.393469340287 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.PRAYLEIGH returns

R.PRAYLEIGH returns the Rayleigh cumulative probability P(X≤x), or the upper probability P(X>x). For x>0 and scale σ>0, the survival probability is EXP(−x²/(2σ²)); the lower probability is its complement. The distribution has nonnegative support. Versioned function help.

Syntax and arguments

=R.PRAYLEIGH(x,scale[,lower_tail[,log_p]])

x and scale are required. Scale must be positive and use the same units as x. Optional lower_tail defaults to TRUE; log_p defaults to FALSE and selects the natural logarithm of the requested probability.

Brackets mark optional arguments; do not type them. Current worksheet implementation.

Reproducible examples

These self-contained formulas were recalculated natively. The separate reference column evaluates the stated mathematical distribution; discrepancies are preserved and explained rather than treated as successful mathematical results. Source branches and typed native outputs 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 Independent mathematical reference
=R.PRAYLEIGH(1,1) 0.393469340287 0.393469340287
=R.PRAYLEIGH(2,1) 0.864664716763 0.864664716763
=R.PRAYLEIGH(3,2) 0.675347532642 0.675347532642
=R.PRAYLEIGH(2,1,FALSE()) 0.135335283237 0.135335283237
=R.PRAYLEIGH(2,1,TRUE(),TRUE()) -0.145413457869 -0.145413457869
=R.PRAYLEIGH(2,1,FALSE(),TRUE()) -2 -2
=R.PRAYLEIGH(0,1) 0 0
=R.PRAYLEIGH(4,2) 0.864664716763 0.864664716763

Practical worksheet

For scale 1 and cutoff 2, the lower probability is approximately 0.864664716763 and the upper probability is 0.135335283237. Put a nonnegative cutoff in A2 and use =R.PRAYLEIGH(A2,1) for its cumulative probability.

The same standardized cutoff gives the same probability: x=4 with scale 2 matches x=2 with scale 1. The scale parameter is not the median, and it is not an inverse-rate parameter.

Advanced interpretation and checks

The upper log probability is −x²/(2σ²). At x=2 and scale 1 it is mathematically −2. The stored native value differs by a last binary place because the helper uses the equivalent Weibull distribution with shape 2 and scale SQRT(2)×σ.

At x=1000 and scale 1, the tested upper log call remains finite, approximately −500000. This is useful when the ordinary survival probability is too small to store. The executed complementary-tail sum below equals one. An interval probability, such as 1<X≤2, can be obtained from the difference of two lower CDF values under the same scale.

The saved advanced-check result for =R.PRAYLEIGH(2,1)+R.PRAYLEIGH(2,1,FALSE()) was 1.

Boundaries and troubleshooting

At zero or negative x, the lower probability is zero and the upper probability is one. Their logarithms are respectively negative infinity, shown as #NUM!, and zero. Nonpositive scale gives #NUM! independently of that support rule.

Numeric text is parsed; nonnumeric text gives #VALUE!. Empty F5 behaves as cutoff zero. Missing or excessive arguments give #N/A. Asking for log probabilities avoids the tested survival underflow, but does not establish unlimited precision for every extreme input.

F5 is genuinely empty, rather than a cell containing an empty string.

Formula Gnumeric 1.12.57 result
=R.PRAYLEIGH(-1,1) 0
=R.PRAYLEIGH(0,1,FALSE()) 1
=R.PRAYLEIGH(0,1,TRUE(),TRUE()) #NUM!
=R.PRAYLEIGH(0,1,FALSE(),TRUE()) 0
=R.PRAYLEIGH(1,0) #NUM!
=R.PRAYLEIGH(1,-1) #NUM!
=R.PRAYLEIGH(1000,1,FALSE(),TRUE()) -499999.9999999999
=R.PRAYLEIGH("2",1) 0.864664716763
=R.PRAYLEIGH("abc",1) #VALUE!
=R.PRAYLEIGH(F5,1) 0
=R.PRAYLEIGH(1) #N/A
=R.PRAYLEIGH(1,1,0,0,1) #N/A

Official evidence and checking scope

The relevant complete worksheet callback and inspected calculation helpers are unchanged between the source versions; later numerical execution is not established. 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.