Apkawa

Untitled

Sep 23rd, 2021
660
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ld x = 30.619, y = -0.002, z = 128 + x*y;
  2.     cout << z << endl;
  3.     z = abs(z);
  4.     for (int i = (1 << 16); i >= 1; i >>= 1) {
  5.         if (z >= i)
  6.             cout << 1,
  7.             z -= i;
  8.         else
  9.             cout << 0;
  10.     }
  11.     cout << '.';
  12.     while (z) {
  13.         z *= 2;
  14.         cout << int(z);
  15.         z -= int(z);
  16.     }
RAW Paste Data