Learn R Programming

cyclotomic (version 1.3.0)

trigonometry: Cosine and sine of a rational number

Description

Cosine and sine of a rational angle as a cyclotomic number.

Usage

cosDeg(theta)

sinDeg(theta)

cosRev(theta)

sinRev(theta)

Value

A cyclotomic number.

Arguments

theta

an integer number, a gmp rational number, or a fraction given as a character string (e.g. "2/7")

Details

The function cosDeg, resp. sinDeg, returns the cosine, resp. the sine, of its argument assumed to be given in degrees. The function cosRev, resp. sinRev, returns the cosine, resp. the sine, of its argument assumed to be given in revolutions.

Examples

Run this code
cosDeg(60)
cosDeg("2/3")^2 + sinDeg("2/3")^2 == 1

Run the code above in your browser using DataLab