sin 967 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. .TH SIN 2
  2. .SH NAME
  3. sin, cos, tan, asin, acos, atan, atan2 \- trigonometric functions
  4. .SH SYNOPSIS
  5. .B #include <u.h>
  6. .br
  7. .B #include <libc.h>
  8. .PP
  9. .B
  10. double sin(double x)
  11. .PP
  12. .B
  13. double cos(double x)
  14. .PP
  15. .B
  16. double tan(double x)
  17. .PP
  18. .B
  19. double asin(double x)
  20. .PP
  21. .B
  22. double acos(double x)
  23. .PP
  24. .B
  25. double atan(double x)
  26. .PP
  27. .B
  28. double atan2(double y, double x)
  29. .SH DESCRIPTION
  30. .I Sin, cos
  31. and
  32. .I tan
  33. return trigonometric functions of radian arguments.
  34. The magnitude of the argument should be checked
  35. by the caller to make sure the result is meaningful.
  36. .PP
  37. .I Asin
  38. returns the arc sine in the range
  39. \-π/2 to π/2.
  40. .PP
  41. .I Acos
  42. returns the arc cosine in the range
  43. 0 to π.
  44. .PP
  45. .I Atan
  46. returns the arc tangent in the range
  47. \-π/2 to π/2.
  48. .PP
  49. .I Atan2
  50. returns the arc tangent of
  51. .I y/x
  52. in the range
  53. \-π to π.
  54. .SH SOURCE
  55. .B /sys/src/libc/port
  56. .SH SEE ALSO
  57. .IR intro (2)
  58. .SH BUGS
  59. The value of
  60. .I tan
  61. for arguments greater than about
  62. .if t 2\u\s-231\s+2\d
  63. .if n 2^31
  64. is garbage.