Advertisement
math230

Underflow and division

Oct 28th, 2024 (edited)
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. //http://codepad.org/oo8rNQWs
  3. #include <stdio.h>
  4. //http://codepad.org/VZnVZtpm
  5. int main()
  6. {
  7.   int i=1;
  8.   float x=2;
  9.  
  10.   x=x/2;
  11.  
  12.   for(;i<153;i++, x/=2){
  13.     printf("2^-%03d: x/2.0 - division %03d: (%6.3e / 2.0) = %0.3e\n",i,i,x,(x/2) );
  14.   }
  15.  
  16.   return 0;
  17. }
Tags: Overflow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement