Advertisement
Guest User

Untitled

a guest
May 29th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <math.h>
  2. #include <stdio.h>
  3.  
  4. double test1 = 213.444;
  5. double test3;
  6. float test2 = 213.444;
  7. double test4;
  8. float test5;
  9.  
  10.  
  11. int main(){
  12. test3 = sin(test1);
  13. test4 = sin((double)test2);
  14. test5 = sinf(test2);
  15.  
  16. printf("%f\n", test3);
  17. printf("%f\n", test4);
  18. printf("%f\n", test5);
  19.  
  20. return 0;
  21. }
  22.  
  23.  
  24.  
  25. Results:
  26. xtroseimac:test kevin$ gcc -o mtest mtest.c
  27. xtroseimac:test kevin$ ./mtest
  28. -0.183259
  29. -0.183259
  30. -0.183259
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement