14 lines
277 B
C++
14 lines
277 B
C++
// fltadd.cpp -- precision problems with float
|
|
#include <iostream>
|
|
int main()
|
|
{
|
|
using namespace std;
|
|
float a = 2.34E+22f;
|
|
float b = a + 1.0f;
|
|
|
|
cout << "a = " << a << endl;
|
|
cout << "b - a = " << b - a << endl;
|
|
// cin.get();
|
|
return 0;
|
|
}
|