module Factory.Math.Implementations.Pi.Borwein.Algorithm(
Algorithm(..)
) where
import qualified Data.Default
import qualified Factory.Math.Factorial as Math.Factorial
import qualified Factory.Math.Implementations.Pi.Borwein.Borwein1993 as Math.Implementations.Pi.Borwein.Borwein1993
import qualified Factory.Math.Implementations.Pi.Borwein.Implementation as Math.Implementations.Pi.Borwein.Implementation
import qualified Factory.Math.Pi as Math.Pi
import qualified Factory.Math.SquareRoot as Math.SquareRoot
data Algorithm squareRootAlgorithm factorialAlgorithm =
Borwein1993 squareRootAlgorithm factorialAlgorithm
deriving (Eq, Read, Show)
instance (
Data.Default.Default squareRootAlgorithm,
Data.Default.Default factorialAlgorithm
) => Data.Default.Default (Algorithm squareRootAlgorithm factorialAlgorithm) where
def = Borwein1993 Data.Default.def Data.Default.def
instance (
Math.SquareRoot.Algorithmic squareRootAlgorithm,
Math.Factorial.Algorithmic factorialAlgorithm
) => Math.Pi.Algorithmic (Algorithm squareRootAlgorithm factorialAlgorithm) where
openR (Borwein1993 squareRootAlgorithm factorialAlgorithm) = Math.Implementations.Pi.Borwein.Implementation.openR Math.Implementations.Pi.Borwein.Borwein1993.series squareRootAlgorithm factorialAlgorithm