Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int guess_max(double x, int N, int count)
- {
- static double my_max=-1;
- if(count<N)
- {
- if(x>my_max)my_max=x;
- return 0;
- }
- char* start=(char*)&x;
- while(1)
- {
- start+=1;
- double* db=(double*) start;
- if(*db==my_max)break;
- }
- int i=0;
- for(;i<64;i++) // hmm?
- {
- double* db=(double*) start;
- if(*db==my_max)
- *db=x;
- start+=4;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement