[next] [previous] [contents]

  11.1.1.3 SIN, COS, and TAN Functions
  The SIN, COS, and TAN functions return the sine, cosine,
  and tangents of an angle in radians or degrees, depending
  on which angle clause you choose with the OPTION state-
  ment. If you supply a floating-point argument to the SIN,
  COS, and TAN functions, they return a number of the same
  floating-point type. If you supply an integer argument, they
  convert the argument to the default floating-point data type
  and return a floating-point number of that type.

  The following example accepts an angle in degrees, converts
  the angle to radians, and prints the angle's sine, cosine, and
  tangent:
  
EXAMPLE: Click to display example.

  Output
  
EXAMPLE: Click to display example.


                                            Note



        As an angle approaches 90 degrees (PI/2 radians),
        270 degrees (3
                            *

                              PI/2 radians), 450 degrees (5
                                                                        *

                                                                          PI/2
        radians), and so on, the tangent of that angle ap-
        proaches infinity. If your program tries to find the
        tangent of such an angle, BASIC signals ``Division by
        0'' (ERR=61).