SHARE
TWEET

Untitled

a guest Dec 13th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <windows.h>
  3. #include <tchar.h>
  4. #include <math.h>
  5.  
  6.  
  7. int main()
  8. {
  9.     float a, c, b, d, x = 4.0, z = 1.0, y = 28, res_c, res_asm = 0;
  10.     printf("a = "); scanf_s("%f", &a);
  11.     printf("b = "); scanf_s("%f", &b);
  12.     printf("c = "); scanf_s("%f", &c);
  13.     printf("d = "); scanf_s("%f", &d);
  14.     res_c = (a + c / b - (float)sqrt(28 * (double)d)) / (4 * b * a + 1);
  15.     printf("Result C = %f\n", res_c);
  16.  
  17.     __asm
  18.     {
  19.         finit;
  20.         fld a;
  21.         fld c;
  22.         fdiv b;
  23.         fadd;
  24.         fld y;
  25.         fmul d;
  26.         fsqrt;
  27.         fsub;
  28.         fld x;
  29.         fmul b;
  30.         fmul a;
  31.         fadd z;
  32.         fdiv;
  33.         fstp res_asm;
  34.     }
  35.     printf("Result ASM = %f\n", res_asm);
  36.     system("Pause");
  37.     return 0;
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top