MathHelpers - library for representing scientific notation (and some more)

Long ago I wrote several misc. Math Helper functions. I put the ones I used most often in a small library so other people can use them too.

Most important function is char * sci( float f, int digits); which represents a float in scientific format. Currently Serial.println(f) gives an overflow if abs(f) > MAXLONG or so. The function dtostrf() does not overflow but give ridiculous long strings.

small example, energy of a mass of 75 Kg

float c = 2.99792458E8;      // speed of light;
float m = 7.5E5;             // 75 Kg
float E = m * c * c;         // According to Einstein

Serial.println(sci(E, 4));   // prints 6.7407E+22

Code can be found on Github

As allways comments, remarks, improvements or examples are welcome