MMA8452Q Five place decimal, now working on Variable.

I am trying to read the data, off the MMA8452Q 3 Axis Accelerometer.
The data in my code is reading 5 place decimal, on x y and z.
The (the) variable is only reading in two
place decimal. I have tried using float and word.
I have tried this too
the = (accel.cz,5);

Something I need to add to this line, to make it 5 place decimal. the = (accel.cz);

Here is the data one the serial monitor.

0.04532 0.07896 0.15742 0.14

#include <Wire.h> // Must include Wire library for I2C
#include <SparkFun_MMA8452Q.h> // Includes the SFE_MMA8452Q library

float the;

MMA8452Q accel;

void setup()
{
  Serial.begin(9600);
  Serial.println("MMA8452Q Test Code!");
  accel.init();
}

void loop()
{
  
  if (accel.available())
  {
   accel.read();
   printCalculatedAccels();
   Serial.println(); 
  }
}

void printCalculatedAccels()
{ 
     Serial.print(accel.cx,5);
     Serial.print("\t");
     Serial.print(accel.cy,5);
     Serial.print("\t");
     Serial.print(accel.cz,5);
     Serial.print("\t");


  
     the = (accel.cz,5);
     Serial.print(the);


    
   
     delay(1000);
 }

The = operator assigns the whole float, to as many places as it has.

the = (accel.cz,5);

This doesn't work and probably actually assigns 5 to the variable the.

With floats you don't get to specify how many decimals to keep in the variable. You get them all no matter what.

Delta_G you are right if you put the five here, the = (accel.cz,5); The serial monitor will read five.

If you want 5 decimal places of precision and always 5 decimal places of precision then don't use floats. They're inherently inaccurate anyway. Just multiply everything by 100000 and store in a long or unsigned long. All your math steps will run faster that way too. It's called fixed point instead of floating point. You know that the decimal is always 5 places from the end ie fixed point.

For example, when one needs to work in meters to three decimal places, one shouldn't use a float but instead should work in millimeters. If you need meters to 6 decimal places then work in micrometers. That way you only have to work with integers and the Arduino will thank you with smaller, cleaner, more efficient code.