How do I eliminate rounding when converting a string to a double?

Hi,

I have a part of a latitude which I'm trying to convert to a double from a string, however it gets rounded from something like 50.35138 to 50.36. How can eliminate rounding? I'm using a teensy 3.2 and my current code for converting is:

  double x;
  double y;
  double mins = 60;
  x = strtod(latiMin,NULL);
  y=strtod(latiDeg,NULL);
  Serial.println((x/mins)+y);

Any help would be greatly appreciated, thanks!

Henry

Serial.println((x/mins)+y);

Serial print defaults to 2 decimal places when printing floats. You can specify the number of decimals with Serial.print(aFloat, numPlaces) or Serial.println((x/mins)+y, 5) which gives 5 decimal places.

Thank you very much!

But does not matter since floats don't have enough significant figures for what you want.

KeithRB: But does not matter since floats don't have enough significant figures for what you want.

Who said anything about floats? The post is about doubles, on a Teensy, which does have real doubles.