name: quadratic-irrational category: Math, Algorithms, Data version: 0.0.3 license: MIT license-file: LICENSE author: Johan Kiviniemi maintainer: Johan Kiviniemi stability: provisional homepage: https://github.com/ion1/quadratic-irrational bug-reports: https://github.com/ion1/quadratic-irrational/issues copyright: Copyright © 2014 Johan Kiviniemi synopsis: An implementation of quadratic irrationals description: An implementation of with support for conversion from and to . . A quadratic irrational is a number that can be expressed in the form . > (a + b √c) / d . where @a@, @b@ and @d@ are integers and @c@ is a square-free natural number. . Some examples of such numbers are . * @7/2@, . * @√2@, . * @(1 + √5)\/2@ (), . * solutions to some quadratic equations – the has a familiar shape. . A continued fraction is a number that can be expressed in the form . > a + 1/(b + 1/(c + 1/(d + 1/(e + …)))) . alternatively expressed using the notation . > [a; b, c, d, e, …] . where @a@ is an integer and @b@, @c@, @d@, @e@, … are positive integers. . Every finite continued fraction represents a rational number and every infinite, periodic continued fraction represents a quadratic irrational. . > 3.5 = [3; 2] > (1+√5)/2 = [1; 1, 1, 1, …] > √2 = [1; 2, 2, 2, …] tested-with: GHC == 7.6.3 build-type: Simple cabal-version: >= 1.10 extra-source-files: .gitignore .travis.yml ChangeLog.md README.md source-repository head type: git location: https://github.com/ion1/quadratic-irrational.git library exposed-modules: Numeric.QuadraticIrrational , Numeric.QuadraticIrrational.CyclicList , Numeric.QuadraticIrrational.Internal.Lens hs-source-dirs: src build-depends: base >= 4.6 && < 4.8 , arithmoi == 0.4.* , containers == 0.5.* , mtl == 2.1.* , transformers == 0.3.* default-language: Haskell2010 ghc-options: -Wall -O2 -funbox-strict-fields test-suite tasty-tests type: exitcode-stdio-1.0 main-is: tasty.hs other-modules: QuadraticIrrational , CyclicList hs-source-dirs: tests build-depends: base , quadratic-irrational , numbers == 3000.* , QuickCheck >= 2.7 && < 3 , tasty == 0.8.* , tasty-quickcheck == 0.8.* default-language: Haskell2010 ghc-options: -Wall -O2 -funbox-strict-fields test-suite doctests type: exitcode-stdio-1.0 main-is: doctests.hs hs-source-dirs: tests build-depends: base , directory , doctest >= 0.9 , filepath , mtl , numbers default-language: Haskell2010 ghc-options: -threaded -Wall