View difference between Paste ID: zbNjUAcV and 8Vb9rneJ
SHOW: | | - or go back to the newest paste.
1
#include <stdio.h>
2
int main(void){
3
	double x=1.0;
4
	unsigned long delta= 1ul << 63;
5-
	while(delta >= 1){
5+
	while(delta >= 4){
6
		double oldx = x;
7
		x += delta;
8
		if(x == x+1){
9
			x = oldx;
10
			delta = delta >> 1;
11
		}
12
	}
13
	while(x != x+1){
14
		x++;
15
	}
16
	printf("%f\n", x);
17
	return 0;
18
}