Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- double x = 0.0, len, b, cc = 100000.0, f = 0.0, lf, five = 5.0, two = 2.0, res = 0.0;
- _asm {
- finit
- fldpi
- fst b
- fadd b
- fst b
- fdiv cc
- fstp len
- mov ecx, 100000
- _loop:
- fld f
- fstp lf
- fld x
- fadd len
- fst x
- fmul x
- fsin
- fstp f
- fld x
- fmul five
- fadd f
- fst f
- fadd lf
- fdiv two
- fmul len
- fadd res
- fstp res
- loop _loop
- }
- cout << res << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment