Learn R Programming

cyclotomic (version 1.3.0)

polar: Polar complex number with rational magnitude and angle

Description

Complex number in polar form with rational magnitude and rational angle as a cyclotomic number.

Usage

polarDeg(r, theta)

polarRev(r, theta)

Value

A cyclotomic number.

Arguments

r

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

theta

angle, an integer number, a gmp rational number, or a fraction given as a character string (e.g. "2/7"); for polarDeg the angle is given in degrees and for polarRev it is given in revolutions

Examples

Run this code
polarDeg(1, 90)    # should be zeta(4)
polarRev(1, "1/4") # should be zeta(4) as well

Run the code above in your browser using DataLab