Printing the big output values with RP2040

Hi, is there another way for printing values more than (4294967292) ?
because now I use something like this:
float value;
Serial.print(value);
and I need to use like
Serial.printf("%.10f", value);
Any advice ?
I use Arduino IDE and RP2040

What variable type is the value of 4294967292 held in ?

Supposed is float.

What is the largest number that a float can be on the RP2040 ?

Does the number ever have any decimal places or is it always an integer ?

Ah, Is there a limitation for the number that a float can be on the RP2040 ??

Of course there is

How and where I should find the limitation for each type for the RP2040?

Sorry, I don't know, A datasheet, perhaps

However, if the number is a large as 4294967292 then a decimal place or two is not going to make significance difference to the value is it ?

Are you sure that you need to use a float ?

Ineed to use like Serial.printf("%.10f", value);
"%.10f".

You still have not answered the question as to why you are using a float. Is 4294967292 a float, or is it an integer ?

What exactly are you trying to do ? Where does the number 4294967292 come from, for instance ?

printing floats with Arduino has a "fundamental" flaw in that it expects any printed results to be expressible as an integer part and a decimal part. So:

  float g = 1.23457e12;
  Serial.println(g);
  g = 3.14159e-15;
  Serial.println(g);

Will print

ovf
0

Even though neither is the desirable output, and the actual numbers are well withing the range of allowed values for a float.
(The small number can be sort-of fixed, but who wants to look at "0.00000000000000314159" for Serial.print(g, 20); ?)

"Real" printf has formats "%e" and "%g" to handle cases where scientific notation may be required. I don't know of any other workarounds for Arduino...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.