diff --git a/changelog.md b/changelog.md index 6296add..188e642 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +1.1.0 +----- + +- Remove deprecated modules `Math.NumberTheory.Powers.Integer` and `Math.NumberTheory.Powers.Natural` + 1.0.4 ----- diff --git a/integer-logarithms.cabal b/integer-logarithms.cabal index 6776671..0f03225 100644 --- a/integer-logarithms.cabal +++ b/integer-logarithms.cabal @@ -14,8 +14,7 @@ homepage: https://github.com/haskellari/integer-logarithms bug-reports: https://github.com/haskellari/integer-logarithms/issues synopsis: Integer logarithms. description: - "Math.NumberTheory.Logarithms" and "Math.NumberTheory.Powers.Integer" - from the arithmoi package. + "Math.NumberTheory.Logarithms" from the arithmoi package. . Also provides "GHC.Integer.Logarithms.Compat" and "Math.NumberTheory.Power.Natural" modules, as well as some @@ -78,8 +77,6 @@ library exposed-modules: Math.NumberTheory.Logarithms - Math.NumberTheory.Powers.Integer - Math.NumberTheory.Powers.Natural -- compat module exposed-modules: GHC.Integer.Logarithms.Compat diff --git a/src/Math/NumberTheory/Powers/Integer.hs b/src/Math/NumberTheory/Powers/Integer.hs deleted file mode 100644 index aad3c60..0000000 --- a/src/Math/NumberTheory/Powers/Integer.hs +++ /dev/null @@ -1,39 +0,0 @@ --- | --- Module: Math.NumberTheory.Powers.Integer --- Copyright: (c) 2011-2014 Daniel Fischer --- Licence: MIT --- Maintainer: Daniel Fischer --- Stability: Provisional --- Portability: Non-portable (GHC extensions) --- --- Potentially faster power function for 'Integer' base and 'Int' --- or 'Word' exponent. --- -{-# LANGUAGE Safe #-} -module Math.NumberTheory.Powers.Integer - {-# DEPRECATED "It is no faster than (^)" #-} - ( integerPower - , integerWordPower - ) where - --- | Power of an 'Integer' by the left-to-right repeated squaring algorithm. --- This needs two multiplications in each step while the right-to-left --- algorithm needs only one multiplication for 0-bits, but here the --- two factors always have approximately the same size, which on average --- gains a bit when the result is large. --- --- For small results, it is unlikely to be any faster than '(^)', quite --- possibly slower (though the difference shouldn't be large), and for --- exponents with few bits set, the same holds. But for exponents with --- many bits set, the speedup can be significant. --- --- /Warning:/ No check for the negativity of the exponent is performed, --- a negative exponent is interpreted as a large positive exponent. -integerPower :: Integer -> Int -> Integer -integerPower = (^) -{-# DEPRECATED integerPower "Use (^) instead" #-} - --- | Same as 'integerPower', but for exponents of type 'Word'. -integerWordPower :: Integer -> Word -> Integer -integerWordPower = (^) -{-# DEPRECATED integerWordPower "Use (^) instead" #-} diff --git a/src/Math/NumberTheory/Powers/Natural.hs b/src/Math/NumberTheory/Powers/Natural.hs deleted file mode 100644 index f331b8f..0000000 --- a/src/Math/NumberTheory/Powers/Natural.hs +++ /dev/null @@ -1,41 +0,0 @@ --- | --- Module: Math.NumberTheory.Powers.Natural --- Copyright: (c) 2011-2014 Daniel Fischer --- Licence: MIT --- Maintainer: Daniel Fischer --- Stability: Provisional --- Portability: Non-portable (GHC extensions) --- --- Potentially faster power function for 'Natural' base and 'Int' --- or 'Word' exponent. --- -{-# LANGUAGE Safe #-} -module Math.NumberTheory.Powers.Natural - {-# DEPRECATED "It is no faster than (^)" #-} - ( naturalPower - , naturalWordPower - ) where - -import Numeric.Natural (Natural) - --- | Power of an 'Natural' by the left-to-right repeated squaring algorithm. --- This needs two multiplications in each step while the right-to-left --- algorithm needs only one multiplication for 0-bits, but here the --- two factors always have approximately the same size, which on average --- gains a bit when the result is large. --- --- For small results, it is unlikely to be any faster than '(^)', quite --- possibly slower (though the difference shouldn't be large), and for --- exponents with few bits set, the same holds. But for exponents with --- many bits set, the speedup can be significant. --- --- /Warning:/ No check for the negativity of the exponent is performed, --- a negative exponent is interpreted as a large positive exponent. -naturalPower :: Natural -> Int -> Natural -naturalPower = (^) -{-# DEPRECATED naturalPower "Use (^) instead" #-} - --- | Same as 'naturalPower', but for exponents of type 'Word'. -naturalWordPower :: Natural -> Word -> Natural -naturalWordPower = (^) -{-# DEPRECATED naturalWordPower "Use (^) instead" #-}