Learn R Programming

cyclotomic (version 1.3.0)

maybeRational: Cyclotomic as exact rational number if possible

Description

Cyclotomic number as exact rational number if possible.

Usage

maybeRational(cyc)

Value

A maybe value, just a rational number if cyc

is a rational number, nothing otherwise.

Arguments

cyc

a cyclotomic number

See Also

isRational

Examples

Run this code
maybeRational(zeta(4))
maybeRational(cosDeg(60)) # use `from_just` to get the value

Run the code above in your browser using DataLab