REDUCEPI Function (Gnumeric)
Reduce angles accurately with Gnumeric REDUCEPI. Learn scale and quotient bits, reconstruct a worked angle and understand tiny residuals at PI().
Verification status: 17 reference, boundary and advanced-check formulas were recalculated with Gnumeric 1.12.57 ssconvert. Retained native records and independent calculations were checked. Version 1.12.62 was source-checked only. How formula examples are checked
Quick answer: =REDUCEPI(10,0) gives 0.575222039231 in the tested Gnumeric 1.12.57 build.
Availability and version history
- Introduced: Gnumeric 1.12.35 release notes explicitly record this function being added.
- Supported in: Gnumeric 1.12.62; no retirement is established.
- Scope: Desktop Gnumeric with the Mathematics plugin. English comma-separated formulas are shown.
- Checked: October 14, 2026. Tables and the named advanced check were recalculated through 1.12.57 ssconvert. Current 1.12.62 source was inspected; the later release was not executed.
What REDUCEPI returns
REDUCEPI expresses x as a small remainder plus an integer multiple of π/2^scale. The remainder’s absolute value is at most π/2^(scale+1). The reduction is specified as if π were exact, which matters when the input itself is a rounded floating-point number. Versioned function help.
Syntax and arguments
=REDUCEPI(x,scale[,quotient])
| Argument | Meaning |
|---|---|
x |
Angle-like numeric value, expressed in radians. |
scale |
Integer scale from −1 through 7. Fractional values are converted to integers; the tested 1.9 became 1. |
quotient |
FALSE by default: return the remainder. TRUE: return the low scale+1 bits of the integer quotient. |
Brackets mark optional arguments; do not type the brackets. Function implementation.
Reproducible examples
Ordinary results are rounded to twelve decimal places; tiny values use scientific notation. The eight reference rows were independently checked.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=REDUCEPI(10,1) |
0.575222039231 |
=REDUCEPI(10,0) |
0.575222039231 |
=REDUCEPI(1,-1) |
1 |
=REDUCEPI(-10,1) |
-0.575222039231 |
=REDUCEPI(0,7) |
0 |
=REDUCEPI(1,7) |
-0.006291396853 |
=REDUCEPI(10,1,TRUE()) |
2 |
=REDUCEPI(-10,1,TRUE()) |
2 |
Practical worksheet
At x = 10 and scale = 1, the period is π/2. The nearest quotient is 6, so the remainder is 10 − 6π/2 = 10 − 3π, approximately 0.575222039231. =REDUCEPI(10,1,TRUE()) returns 2 because only the low two quotient bits are returned: 6 modulo 4 is 2.
For x = −10, the quotient is −6 and the remainder is approximately −0.575222039231. Its low two bits are also 2. Do not use this reduced-bit value as the full quotient when reconstructing the original x; it intentionally loses information about complete cycles.
Advanced interpretation and checks
With scale 7, the period is π/128 and the remainder bound is π/256. For x = 1 the nearest quotient is 41, giving approximately −0.006291396853. The help’s separate sentence describing scale 7 as a period of π/256 conflicts with its defining formula; π/256 is the half-period bound, not the period.
The executed =REDUCEPI(PI(),0) returned approximately −1.224646799147E−16. This is consistent with reducing the stored, rounded PI() input against mathematical π. It is not evidence that π modulo itself is mathematically nonzero. An independent high-precision subtraction reproduces the small residual.
Boundaries and troubleshooting
Invalid scales in the table return #VALUE!, whereas wrong arity returns #N/A. Quotient mode returns low bits rather than a signed full quotient. The later source delegates the reduction to GOffice; the stated sample remainders and bits were checked mathematically and in 1.12.57, without claiming execution of the later library or exhaustive huge-angle accuracy.
F5 is an actually empty cell. Listed errors are native error results, not mathematical zeroes.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=REDUCEPI(1,8) |
#VALUE! |
=REDUCEPI(1,-2) |
#VALUE! |
=REDUCEPI(1,1.9) |
-0.570796326795 |
=REDUCEPI(PI(),0) |
-1.224646799147E-16 |
=REDUCEPI(1,7,TRUE()) |
41 |
=REDUCEPI("abc",1) |
#VALUE! |
=REDUCEPI(F5,1) |
0 |
=REDUCEPI(1) |
#N/A |
Official evidence and checking scope
The retained workbook contained a deliberately stale SUM cache and an uncached SUM formula, both recalculated correctly. Native evidence covers the listed 1.12.57 cases; worksheet layouts and algebraic interpretations are independently specified explanations. Other locales, direct GUI entry and later-release output were not tested.