Contact

FLT.MAX Function (Gnumeric)

Math Beginner Gnumeric Gnumeric 1.12.57

Use Gnumeric FLT.MAX to inspect the numeric upper limit, distinguish range from precision and build overflow-aware binary64 reference checks.

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

Quick answer: =FLT.MAX() returns the largest positive finite value of the floating-point type used by the build. For an IEEE binary64 build, its reference value is approximately 1.7976931348623157E+308.

Availability and evidence scope

  • Introduced: Gnumeric 1.12.57. Its release notes name all four FLT functions as new testing aids. No exact introduction day is inferred.
  • Source support: Registered in the Floating Point Functions plugin in Gnumeric 1.12.62. No retirement is established. Last functioning application version is unverified for this guide.
  • Build scope: Numeric constants and neighbors depend on the selected floating type. The numeric definitions distinguish double, long-double and experimental decimal64 configurations. Binary64 examples below are explicitly conditional.
  • Evidence dates: Gnumeric release source was retained October 13–14, 2026 and reviewed October 15. Reference calculations and Python library controls ran October 15. They are independent numerical evidence, not native Gnumeric, headless application or GUI execution.

Syntax and meaning

=FLT.MAX()

There are no arguments, defaults or input ranges. The function is a numeric-system diagnostic: it does not find the largest value in selected cells. The pinned callback returns the compile-time GNM_MAX constant. In a default double build this maps to DBL_MAX; a long-double build uses LDBL_MAX, while a decimal64 build uses DECIMAL64_MAX. Consequently, a universal hard-coded decimal answer would be misleading.

For IEEE binary64, the exact mathematical limit is (2-2^-52)*2^1023. That expression describes the format; it is not an instruction to build an overflowing intermediate value. A large finite range also does not mean that every integer up to that limit is exactly representable. Binary64 has 53 significant binary digits. Near its upper limit, neighboring representable numbers are separated by an enormous absolute gap.

Reproducible range worksheet

Create a sheet named RangeAudit. Put Limit in A1 and =FLT.MAX() in B1. Put Half limit in A2 and =B1/2 in B2. Put Restored limit in A3 and =B2*2 in B3. For the binary64 reference model, B2 is approximately 8.988465674311579E+307 and B3 is the original limit. These operations avoid evaluating twice the limit.

Add Minimum normal in A4 and =FLT.MIN() in B4, then Scaled product in A5 and =B1*B4 in B5. The binary64 reference product is 3.9999999999999996, slightly below 4. This combines the upper exponent limit and lower normal exponent limit; it is not a test that all intervening decimal values are available.

Use scientific display with enough significant digits, and retain the original formulas. Typing the rounded caption 1.80E+308 back into a cell is not a faithful reconstruction of FLT.MAX: that decimal is larger than the exact binary64 limit.

Binary64 reference controls

Formula Independent binary64 result
=FLT.MAX() Approximately 1.7976931348623157E+308
=FLT.MAX()/2 Approximately 8.988465674311579E+307
=(FLT.MAX()/2)*2 Original maximum
=FLT.MAX()*FLT.MIN() 3.9999999999999996
=-FLT.MAX() Approximately -1.7976931348623157E+308
=FLT.MAX()-FLT.NEXTAFTER(FLT.MAX(),0) Exactly 2^971, about 1.99584030953472E+292

These are model controls for a declared binary64 implementation, not captured Gnumeric cells. The negative of FLT.MAX is the corresponding most-negative finite binary64 number; FLT.MIN has a different meaning, namely the smallest positive normal value.

Advanced use: avoid an unnecessary overflowing product

Suppose a positive measurement in C2 is the formula =FLT.MAX()/4, and a positive scale factor in D2 is 2. The scaled result =C2*D2 is safely FLT.MAX()/2 in the reference model. A preflight bound can compare C2 with =FLT.MAX()/D2. The latter is also FLT.MAX()/2 here, so the input is below it. If D2 is changed to 8, the bound becomes FLT.MAX()/8 and C2 exceeds it. Do not perform the overflowing multiplication merely to discover the problem.

This bound is for positive finite operands and factors at least 1. Zero, negative inputs, division by zero and factors below 1 need separate logic. Near a rounding boundary, a simple worksheet comparison is not a proof that every rearrangement will round identically. Preserve enough headroom for the actual algorithm rather than treating the largest representable number as a recommended operating scale.

Errors and troubleshooting

The zero-argument function has no data-dependent domain error in its callback. Supplying an argument changes the arity and is outside the registered signature; the exact editor diagnostic has not been tested. If the name is unavailable, check release and Floating Point Functions plugin availability before replacing it with a typed constant.

Do not assume infinity is a normal worksheet result. Gnumeric’s checked value constructor converts a non-finite floating result into #NUM!, but the concrete overflow path of an arbitrary formula also depends on its evaluator. This guide does not present a captured overflow-cell test. Imported workbooks, save/reload precision, alternate numeric builds and locale-specific formatting were not executed. The reference model checks numerical magnitude, not the display string chosen by the spreadsheet.