cyclotomic

The field of cyclotomic numbers.

https://github.com/stla/cyclotomic

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.6%) to scientific vocabulary

Keywords

arithmetic cyclotomic-numbers r
Last synced: 6 months ago · JSON representation

Repository

The field of cyclotomic numbers.

Basic Info
  • Host: GitHub
  • Owner: stla
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 1.98 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • Open Issues: 1
  • Releases: 2
Topics
arithmetic cyclotomic-numbers r
Created almost 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog

README.Rmd

---
title: "cyclotomic"
output: github_document
---


[![R-CMD-check](https://github.com/stla/cyclotomic/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/stla/cyclotomic/actions/workflows/R-CMD-check.yaml)


```{r setup, include=FALSE}
knitr::opts_chunk$set(collapse = TRUE)
```

*The field of cyclotomic numbers.* 

___

The set of cyclotomic numbers is a field obtained by extending the set of 
rational numbers with the complex roots of unity. The main function used to 
construct a cyclotomic number in this package is `zeta`, it returns a primitive 
root of the unity. For example `zeta(4)` is the primitive fourth root of unity, 
that is the imaginary unit.

```{r}
library(cyclotomic)
im <- zeta(4)
im^2
```

Arithmetic on cyclotomic numbers can be performed with this package. 
It is exact. In particular it allows to deal with the Gaussian rational numbers: 
the complex numbers whose both real and imaginary part are rational.

```{r}
a <- as.cyclotomic(5)
b <- as.cyclotomic("3/2")
(a + im * b)^2
```

Note that while `zeta(4)` is printed as `zeta(4)`, this is not the case for all 
roots of unity:

```{r}
zeta(9)
```

The set of cyclotomic numbers contains all the square roots of rational numbers, 
and therefore the package allows exact calculations on such square roots. For 
example, using float numbers, the following equality does not hold true:

```{r}
sqrt(5/3) == sqrt(5) / sqrt(3)
```

But it holds true using the cyclotomic arithmetic:

```{r}
cycSqrt("5/3") == cycSqrt(5) / cycSqrt(3)
```

The set of cyclotomic numbers also contains the cosine and the sine of the 
rational multiples of pi. In particular, it contains the cosine and the sine 
of any rational number when this number represents an angle given in degrees.

```{r}
cosDeg(60)
sinDeg(60) == cycSqrt(3) / 2
```

___

This package is a port of the Haskell library **cyclotomic**, written by 
Scott N. Walck.

Owner

  • Login: stla
  • Kind: user

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 83
  • Total Committers: 1
  • Avg Commits per committer: 83.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Stéphane Laurent l****p@y****r 83

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 9.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • joelcourtheyn (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 244 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: cyclotomic

The Field of Cyclotomic Numbers

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 244 Last month
Rankings
Dependent packages count: 29.6%
Dependent repos count: 35.3%
Average: 51.5%
Downloads: 89.7%
Maintainers (1)
Last synced: 6 months ago