Float decimal precision...Why only two digits?

Hello,

here is my code:

void setup()
{
  Serial.begin(9600);
  
  float value = 28.123456;

  Serial.println(value);
  
    
}

void loop()
{
  

  
}

I always get "28.12" as answer. Is there a workaround to get some more decimal precision? I would need 6 digital digits... :zipper_mouth_face:

  Serial.begin(9600);
  float value = 28.123456;
  Serial.println(value, 6);

Unfortunately the Arduino float (and double) can only store about 6 or 7 decimal digits. Don't expect the digits after 26.1234 to be correct.

Serial.println(value, yourNumberOf PlacesHere);

But, as noted, floats are not good for more than about 6.