R.PEXP Function (Gnumeric)
Calculate exponential tail and log probabilities with Gnumeric R.PEXP, using scale rather than rate and checked support and zero-scale distinctions.
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
Parameter note: The second argument is scale, equal to the mean for a positive-scale exponential distribution. Rate is its reciprocal.
Quick answer: =R.PEXP(0,2) gives 0 in Gnumeric 1.12.57.
Availability and version history
- Introduced: First release not established; present in the retained 1.12.57 source.
- 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.PEXP returns
R.PEXP returns an exponential lower-tail probability by default. Setting lower_tail=FALSE returns the survival probability. Setting log_p=TRUE returns the natural log of the chosen tail, which can retain information when ordinary probabilities underflow. Versioned function help.
Syntax and arguments
=R.PEXP(x,scale[,lower_tail[,log_p]])
x: cutoff.scale: required; use a positive value for an ordinary exponential model.lower_tail: optional, TRUE by default.log_p: optional, FALSE by default. Supply the tail flag before the log flag.
Brackets mark optional arguments; do not type them. Current worksheet implementation.
Reproducible examples
These self-contained formulas were recalculated natively and checked against independent mathematics. 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.PEXP(0,2) |
0 |
=R.PEXP(2,2) |
0.632120558829 |
=R.PEXP(4,2) |
0.864664716763 |
=R.PEXP(2,2,FALSE()) |
0.367879441171 |
=R.PEXP(2,2,TRUE(),TRUE()) |
-0.458675145387 |
=R.PEXP(2,2,FALSE(),TRUE()) |
-1 |
=R.PEXP(-1,2) |
0 |
=R.PEXP(400,2,FALSE()) |
1.383896526737E-87 |
Practical worksheet
With scale 2, =R.PEXP(2,2) gives 1−exp(−1)≈0.632120558829. The upper tail =R.PEXP(2,2,FALSE()) gives exp(−1)≈0.367879441171. Their executed sum is 1.
For positive scale, a cutoff at or below zero has lower probability 0 and upper probability 1. An interval probability between positive bounds a and b can be computed by subtracting lower-tail values, or equivalently upper-tail values in the opposite order.
Advanced interpretation and checks
For x>0, the lower tail is 1−EXP(−x/scale) and the upper tail is EXP(−x/scale). The memoryless identity is S(a+b)/S(a)=S(b) for nonnegative a,b. For scale 2 and a=b=2, exp(−2)/exp(−1)=exp(−1). This is a property of the assumed model, not a test that observed waiting times satisfy it.
The native upper tail at x=400, scale=2 is approximately 1.383896526737E−87. At x=1600 it underflows to zero, while the requested log upper probability is exactly −800 in the saved result.
The saved advanced-check result for =R.PEXP(2,2)+R.PEXP(2,2,FALSE()) was 1.
Boundaries and troubleshooting
The tested zero-scale branch returns lower probability 0 at x≤0 and 1 at positive x; it is not an ordinary positive-scale exponential model. A negative scale errors. Requesting the log of a zero lower-tail probability gives #NUM!, whereas log of upper probability 1 is zero. Distinguish mathematical log-zero endpoints from invalid parameter values.
F5 is genuinely empty, rather than a cell containing an empty string. #NUM! can represent an unrepresentable infinite mathematical endpoint as well as an invalid numeric domain; the distinctions above matter.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=R.PEXP(1,0) |
1 |
=R.PEXP(0,0) |
0 |
=R.PEXP(-1,0) |
0 |
=R.PEXP(1,-1) |
#NUM! |
=R.PEXP(0,2,TRUE(),TRUE()) |
#NUM! |
=R.PEXP(0,2,FALSE(),TRUE()) |
0 |
=R.PEXP("abc",2) |
#VALUE! |
=R.PEXP(F5,2) |
0 |
=R.PEXP(1) |
#N/A |
=R.PEXP(1,2,1,0,1) |
#N/A |
=R.PEXP(1600,2,FALSE()) |
0 |
=R.PEXP(1600,2,FALSE(),TRUE()) |
-800 |
Official evidence and checking scope
- Current worksheet callback
- Tested-version worksheet callback
- Current pexp calculation
- Nonfinite worksheet-value handling
- Statistical Functions From R plugin declaration
The relevant worksheet callback is unchanged between the inspected versions. That does not establish later-version numerical execution. Both stale and uncached SUM controls recalculated correctly. Native XML identities were checked; secondary ODF exports retain these functions with the ORG.GNUMERIC namespace. GUI entry, other locales and other spreadsheet products were not tested.