Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //check the infinity
- double x1=(double)0x7ff0000000000000;
- double x2=(double)0x7ff0000000000001; // <=== not the ending 1
- printf("nx1=%f, x2=%f sizeof(double) = %d", x1,x2, sizeof(x2));
- if(x1==x2)
- printf("nx1==x2");
- else
- printf("nx1!=x2");
- x1=9218868437227405300.000000, x2=9218868437227405300.000000 sizeof(double) = 8
- x1==x2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement