Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <math.h>
- #include <stdio.h>
- #include <sys/time.h>
- int main(int argc, char *argv[]) {
- double v;
- struct timeval t;
- gettimeofday(&t, NULL);
- v = t.tv_sec;
- printf("v = %f - cos = %f - sin = %f\n", v, cos(v), sin(v));
- v = 123;
- printf("v = %f - cos = %f - sin = %f\n", v, cos(v), sin(v));
- v = 123456;
- printf("v = %f - cos = %f - sin = %f\n", v, cos(v), sin(v));
- v = 1234567890;
- printf("v = %f - cos = %f - sin = %f\n", v, cos(v), sin(v));
- v = 210828714.0;
- printf("v = %f - cos = %f - sin = %f\n", v, cos(v), sin(v));
- v = 210828715.0;
- printf("v = %f - cos = %f - sin = %f\n", v, cos(v), sin(v));
- return 0;
- }
- ## Output
- v = 1317025570.000000 - cos = 1317025570.000000 - sin = 1317025570.000000
- v = 123.000000 - cos = -0.887969 - sin = -0.459903
- v = 123456.000000 - cos = -0.672295 - sin = -0.740283
- v = 1234567890.000000 - cos = 1234567890.000000 - sin = 1234567890.000000
- v = 210828714.000000 - cos = 210828714.000000 - sin = -0.132763
- v = 210828715.000000 - cos = 210828715.000000 - sin = 210828715.000000
Add Comment
Please, Sign In to add comment