converting float and double to char array

Hi everyone, I am trying to convert floats and doubles to char arrays, I am currently using the function dtostrf, but I noticed that It is not working properly, when I called dtostrf with DBL_MAX and FLT_MAX it gives me the same results, so maybe there is a better aproach for converting floats and doubles to a char array, how would you go about this?

In Arduino land double and float are the same (4 byte numbers on 8 bit processors).

groundFungus: In Arduino land double and float are the same (4 byte numbers on 8 bit processors).

Good to know!, I had no idea, thanks for the info groundFungus

Arduino data types.

I know that that is true for the AVR architecture. For SAM architecture as well (if I had a board, I would test)?

For Sam boards, a double (= double float) is an 8 bytes number. Precision with a float is 7 decimals, and 15 decimals with a double.

ard_newbie: For Sam boards, a double (= double float) is an 8 bytes number. Precision with a float is 7 decimals, and 15 decimals with a double.

Thanks.

ard_newbie: For Sam boards, a double (= double float) is an 8 bytes number. Precision with a float is 7 decimals, and 15 decimals with a double.

Have you wanted to mean that double x = 1.25; and double float x = 1.25; are synonymous? Is double float x = 1.25; a syntactically correct declaration?