chipKIT® Development Platform

Inspired by Arduino™

Printing of double (64bit)

Created Sat, 11 Jan 2014 13:32:17 +0000 by pito


pito

Sat, 11 Jan 2014 13:32:17 +0000

The same with double (it is 64bit float). It prints as 32bit float today. Would be great to have it in Print class.

This is a workaround for example:

char buf[25];
double fff = 1.234567890123456e-23;
sprintf(buf,"%1.15e", fff);
Serial.print(buf);

kaaasap

Fri, 24 Jan 2014 19:39:10 +0000

does this help?

gcvt(double,int,char*);

use the int for precision. Example: 4 gives four numbers. 3.1248752 prints as 3.124