Contact

Collabora Office GCD_EXCEL2003: Common divisors with preserved decimal inputs

Mathematical Intermediate Collabora Office Calc

Use GCD_EXCEL2003 for numerical inputs while understanding its floating-point remainder algorithm, zero filtering and difference from integer-floor GCD.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =GCD_EXCEL2003(8;12;20) independently gives 4. In the pinned source, =GCD_EXCEL2003(2.5;7.5) instead gives 2.5, because this add-in preserves positive decimal values before its remainder calculation. It does not apply the unsuffixed GCD function’s integer-floor step.

Syntax and gathered inputs

=GCD_EXCEL2003(Number1 [; Number2 ... Number255])

The official help accepts numbers and references to numerical cells or ranges. Supply at least one argument. For ordinary nonnegative integer data, the result is the greatest positive number dividing every positive input without remainder.

The source gathers values into a positive-number list. Negative values cause an exception; zeros are excluded. If no positive values remain, the function returns 0. A single remaining positive value is returned unchanged, which is important for decimal inputs.

The name describes a compatibility function, but this guide does not assume universal Excel 2003 behavior from that label. The exact selected add-in uses floating-point remainders and has source-specific distinctions from native GCD.

Worked example: equal-sized groups

Enter:

Cell Numerical value
A1 8
A2 12
A3 20

Use =GCD_EXCEL2003(A1:A3). The independent result is 4. Eight, twelve and twenty are all divisible by four, giving 2, 3 and 5 groups respectively. No larger positive integer divides all three.

An independent Euclidean calculation first finds the common divisor of 8 and 12: 12 mod 8 = 4, then 8 mod 4 = 0. Combining 4 with 20 leaves 4 because 20 mod 4 = 0.

This is useful for a common grouping or grid increment. It is not an average, minimum or least common multiple. A result of four does not mean there are four groups of each quantity; the group counts are the original values divided by four.

Decimal behavior: exact controls and a precision warning

The add-in entry point passes positive values to GetGcd, which repeatedly applies floating-point fmod. It does not floor the inputs. Therefore:

Formula Source-derived independent result
=GCD_EXCEL2003(2.5;7.5) 2.5
=GCD_EXCEL2003(2.5) 2.5
=GCD_EXCEL2003(4.5;6) 1.5

These controls use halves, which are exactly representable in binary floating-point. They demonstrate the lack of flooring without relying on awkward decimal rounding. For arbitrary noninteger measurements, repeated floating-point remainder is not a robust guarantee of a meaningful real-number common divisor. Values such as 0.1 are not represented exactly in binary, and a tiny remainder can alter subsequent iterations.

If the data are counts of a known small unit, consider representing them as validated integer counts of that unit before calculating a GCD. For example, 2.5 and 7.5 units become 5 and 15 half-unit ticks; their integer GCD is 5 ticks, or 2.5 original units. This is an explicit unit convention, not a reason to round arbitrary measurements silently.

Zeros, negatives and argument types

=GCD_EXCEL2003(0;12;20) independently gives 4, since the zero is excluded. =GCD_EXCEL2003(0;0) returns 0 because the gathered positive list is empty. =GCD_EXCEL2003(-2;4) causes IllegalArgumentException through the positive-list validation, not an absolute-value conversion.

The first argument is supplied through a numerical-array binding, while later optional arguments use the add-in’s general converter. Numeric text and range contents therefore should not be assumed to share identical conversion rules. The bounded optional-string example =GCD_EXCEL2003(8;"12") is supported by the inspected conversion path and independently gives 4. More complicated numeric text depends on the formatter and locale; prefer real numerical cells.

For ranges, the numerical-array converter gathers numerical values and checks worksheet errors. The examples deliberately use numerical cells. Do not assume a text-filled or error-bearing range behaves like a clean list of numbers, or that every nonnumeric value is silently harmless.

Distinction from GCD

Unsuffixed GCD floors positive values before applying its remainder helper. For 2.5 and 7.5, that means 2 and 7, whose integer GCD is 1, rather than the add-in’s 2.5. The native evaluator makes that conversion explicit.

This distinction also appears for a single decimal argument: the add-in preserves 2.5, whereas an integer-floor contract does not. Keep the intended function name when reviewing an existing workbook. Very large integers can also lose exactness when stored as floating-point numbers, so the simple exact examples do not establish unlimited integer precision or cross-product round-trip behavior.

Product scope, compatibility and evidence

This guide covers the new Collabora Office desktop for Linux, using the Flathub source tag coda-26.04.4.3-1 and commit 81339d176148d0d5c81ff05d82540f58f8aaa117. The official desktop release notes and Linux package manifest identify that product/build. The package manifest is a dated observation from October 18, 2026, rather than an installed-binary check.

The 26.04 function help and exact evaluator source were inspected on October 18, 2026. Expected examples were independently calculated; no Collabora application was run. Expected scalar results were derived from the documented contracts, inspected source and independent calculations; native output formatting and error localization have not been tested. Classic, Online/CODE, other operating systems and file-format round trips require their own checks.

Availability here is established from the function-specific help and the mapped package source. Related functions may have different arguments or boundary rules. The first Collabora release introducing this function is not established by the reviewed sources. No cited retirement or deprecation notice was found. Unknown introduction dates do not imply that the function is deprecated. File-format round trips require separate verification.

  • GCD: compare the native integer-floor contract
  • LCM: find a common multiple under its separate contract