# UNO Q: Println() float or double results in "ovf"

**URL:** <https://forum.arduino.cc/t/uno-q-println-float-or-double-results-in-ovf/1442618>\
**Category:** UNO Q\
**Created:** [May 4, 2026, 7:40pm UTC](https://forum.arduino.cc/t/uno-q-println-float-or-double-results-in-ovf/1442618 "2026-05-04T19:40:03Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![robtillaart](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/robtillaart/32/1098811_2.png) [@robtillaart](https://forum.arduino.cc/u/robtillaart)\
**Post date:** [May 13, 2026, 3:07pm UTC](https://forum.arduino.cc/t/uno-q-println-float-or-double-results-in-ovf/1442618/13 "2026-05-13T15:07:49Z")

</div>

> [@KurtE](#):
>
> Where do those numbers (4294967040.0) come from?

I recognize these as MAX\_UINT32-ish,  
In the printFloat of UNO / AVR printFloat it is stated

```arduino
size_t Print::printFloat(double number, uint8_t digits) 
{ 
  size_t n = 0;
  
  if (isnan(number)) return print("nan");
  if (isinf(number)) return print("inf");
  if (number > 4294967040.0) return print ("ovf"); // constant determined empirically
  if (number <-4294967040.0) return print ("ovf"); // constant determined empirically

```

MAX UINT32 == 4.294.967.295 which 0xFFFFFFFF  
4294967040 == 0xFFFFFF00

As a float is only 23 bit mantissa, the float value compares with the max float value that can be represented with an uint32\_t. The rationale is that the printing math in printFloat() is all done with (32 bit) integers.

FYI, exact this (premature) overflow is the reason I wrote the **sci()** and **eng()** functions to have scientific / engineering notation for floats / doubles.  
(see printHelpers library)

* * *

FYI traced the scientific notation back to this post of 13 years ago - 2013-05-12

> [@Proposed update for the printFloat code of print.cpp](https://forum.arduino.cc/t/proposed-update-for-the-printfloat-code-of-print-cpp/162240):
>
> In the Arduino Core library the printing of floats is done with the use of unsigned long numbers. The current 1.0.4 implementation prints "ovf" when a float is larger that maxlong (approx). This is not correct. To solve this I added code to printFloat so it will print print large ( \> 1E+9) and small ( \< 1E-3) numbers automatically in scientific notation: x.xxxxE+nn or x.xxxxE-nn There is also the engineering E-notation that only allows multiples of 3 as exponent. Could be implemented in a si…

---

_[View the full topic](https://forum.arduino.cc/t/uno-q-println-float-or-double-results-in-ovf/1442618)._
