Hallo i am a beginner in c++ and my prof asked us a quastion . so why the result below is (inf). so why it is (inf) and what does inf mean in c++
thx
#include <iostream>
using namespace std;
int main()
{
float x = 1.0e20f,
y = 1.0f,
z = 1.0e20f,
u = 1.0f;
cout << "the result is: " << y /((x+y-z)*u) << endl;
return 0;
}
run:
the result is: inf