Closed gorilux closed 12 years ago
I'll give it a test.
Ah, the problem is in dtostre. Right at the top it reads, "if (prec>7) prec = 7;" :P
nothing we can do... and snprintf is not fully supported. So I guess 7 decimal places precision is the max we can get with iostreams in avr.
There is one issue with multiple definition in library that I only managed to solve by adding "-Wl,--allow-multiple-definition". If you include the #include
Oh, I could not repro that. I tried just now with two CPP files each #include
Thanks for this! I had a chance to try it out today. Merged it. Looks good, but I can't get the 8th digit of precision.
This code float fmax = FLT_MAX, fmin = FLT_MIN; cout.precision(8); cout << "Float " << scientific << fmax << endl; cout << "Float " << scientific << fmin << endl;
produces this: Float 3.4028235e+38 Float 1.1754944e-38
should be: Float 3.40282347e+38 Float 1.17549435e-38