Created
June 6, 2017 08:06
-
-
Save kaityo256/858c7c243cd0828aa36197bd44532024 to your computer and use it in GitHub Desktop.
x87 test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <math.h> | |
| double | |
| func(void){ | |
| const int N = 1000000; | |
| const double s = 2.0*M_PI/static_cast<double>(N); | |
| double x = 0.0; | |
| double y = 0.0; | |
| for(int i=0;i<N*100;i++){ | |
| y += sin(x); | |
| x += s; | |
| } | |
| return y; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
will give you the following asm.
Thanks fujitanozomu for the comment on this article.