cycSqrt {cyclotomic}R Documentation

Square root as a cyclotomic number

Description

Square root of an integer or a rational number as a cyclotomic number. This is slow.

Usage

cycSqrt(x)

Arguments

x

an integer, a gmp rational number (bigq object), or a fraction given as a string (e.g. "5/3")

Value

The square root of x as a cyclotomic number.

Examples

cycSqrt(2)
phi <- (1 + cycSqrt(5)) / 2 # the golden ratio
phi^2 - phi # should be 1

[Package cyclotomic version 1.3.0 Index]