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: wa...@lvc.edu _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell