#include <iostream>
#include <climits>
int main()
{
std::cout << std::numeric_limits<double>::max_exponent10 << std::endl;
return 0;
}
/* my output
308
*/
With floating point, accuracy and precision have a tradeoff.
For floating point modulus, there is fmod .
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
You could also use a C++ library called 'apfloat' it's freely available here ...
tux4life
Nearly a Posting Maven
2,350 posts since Feb 2009
Reputation Points: 2,134
Solved Threads: 243