J
janzon
The output of the following program
----------------------------------------------------------
#include <iostream>
#include <iomanip>
#include <float.h>
#include <fpu_control.h>
#include <math.h>
using namespace std;
int main()
{
cout << setprecision(20);
cout << nextafter(0.0, 1.0) << endl;
cout << DBL_MIN << endl;
cout << LDBL_MIN << endl;
}
------------------------------------------------------------
is this:
4.9406564584124654418e-324 // The next double after zero ...
2.2250738585072013831e-308 // is not the "smallest
representable double"
3.3621031431120935063e-4932
Compiled with g++. g++ -v says "gcc version 4.1.2 20060928".
----------------------------------------------------------
#include <iostream>
#include <iomanip>
#include <float.h>
#include <fpu_control.h>
#include <math.h>
using namespace std;
int main()
{
cout << setprecision(20);
cout << nextafter(0.0, 1.0) << endl;
cout << DBL_MIN << endl;
cout << LDBL_MIN << endl;
}
------------------------------------------------------------
is this:
4.9406564584124654418e-324 // The next double after zero ...
2.2250738585072013831e-308 // is not the "smallest
representable double"
3.3621031431120935063e-4932
Compiled with g++. g++ -v says "gcc version 4.1.2 20060928".