Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void){
- double x=1.0;
- unsigned long delta= 1ul << 63;
- while(delta >= 1){
- double oldx = x;
- x += delta;
- if(x == x+1){
- x = oldx;
- delta = delta >> 1;
- }
- }
- while(x != x+1){
- x++;
- }
- printf("%f\n", x);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment