While working on a project involing the full range of floats/doubles I discovered Serial.print does not do E format for numbers above 4billion. It just prints ovf. If you look at Serial.print bug? - #21 by wmassano - Programming Questions - Arduino Forum, I have a partial solution which might be improved and added to the Serial .print function. It needs some error checking, but I wrote it to show how it could be done. I was rather upset when I started this thread or I should say disappointed. I hold the arduino development is such high regard, I couldn't believe this was not implemented. Having cooled off, I hope you will consider adding support for this feature.
Thanks,
WM
Agree with your observation that this functionality is lacking.
I rewrote the core print library to do the same - it is under discussion still - to support scientific and engineering notation.
By implementing it in the printlib all derived classes inherit it automatically.
Check the thread here - Proposed update for the printFloat code of print.cpp - Libraries - Arduino Forum - for some inspiration
sample output looks like
3.1416E-35
3.1416E-36
3.1416E-37
(yes that are very small pie's ![]()
I hope it gets implemented ASAP. Incidentally, my code is very compact and treats (somewhat) the problem of small numbers. It automatically switches to E format if exponent is less than the number of decimal places (i.e. where Serial.print would show 0.0000, mine switches to E format. Format widths were not a concern in my quick and dirty code, but its is easy to see how to do it. However you do it PLEASE get it into the library.
WM
I am not the one to decide, however I already brought it under attention of the core developers.
So until then you can patch your local print library code - you have the sources after all