[Haskell] ANNOUNCE: cyclotomic 0.3.1: exact calculations with a subfield of the complex numbers
Scott N. Walck
walck at lvc.edu
Wed Aug 1 17:50:03 CEST 2012
cyclotomic is a library that allows exact calculations with a subfield
of the complex numbers.
The cyclotomic numbers are a subset of the complex numbers with the
following properties:
* The cyclotomic numbers are represented exactly, enabling exact
computations and equality comparisons.
* The cyclotomic numbers contain the Gaussian rationals (complex
numbers of the form p + q i with p and q rational). As a
consequence, the cyclotomic numbers are a dense subset of the
complex numbers.
* The cyclotomic numbers contain the square roots of all rational
numbers.
* The cyclotomic numbers form a field: they are closed under addition,
subtraction, multiplication, and division.
* The cyclotomic numbers contain the sine and cosine of all rational
multiples of pi.
* The cyclotomic numbers can be thought of as the rational field
extended with nth roots of unity for arbitrarily large integers n.
To install, just
cabal install cyclotomic
To use,
import Data.Complex.Cyclotomic
I'm happy to hear about bugs or feature requests.
Scott
--
Scott N. Walck
Chair, Department of Physics
Professor of Physics
Lebanon Valley College
Annville, PA 17003
phone: 717-867-6153
fax: 717-867-6075
email: walck at lvc.edu
More information about the Haskell
mailing list