Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <windows.h>
- #include <tchar.h>
- #include <math.h>
- int main()
- {
- float a, c, b, d, x = 4.0, z = 1.0, y = 28, res_c, res_asm = 0;
- printf("a = "); scanf_s("%f", &a);
- printf("b = "); scanf_s("%f", &b);
- printf("c = "); scanf_s("%f", &c);
- printf("d = "); scanf_s("%f", &d);
- res_c = (a + c / b - (float)sqrt(28 * (double)d)) / (4 * b * a + 1);
- printf("Result C = %f\n", res_c);
- __asm
- {
- finit;
- fld a;
- fld c;
- fdiv b;
- fadd;
- fld y;
- fmul d;
- fsqrt;
- fsub;
- fld x;
- fmul b;
- fmul a;
- fadd z;
- fdiv;
- fstp res_asm;
- }
- printf("Result ASM = %f\n", res_asm);
- system("Pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement