module Factory.Math.Implementations.Pi.BBP.Algorithm(
Algorithm(..)
) where
import qualified Data.Default
import qualified Factory.Math.Implementations.Pi.BBP.Base65536 as Math.Implementations.Pi.BBP.Base65536
import qualified Factory.Math.Implementations.Pi.BBP.Bellard as Math.Implementations.Pi.BBP.Bellard
import qualified Factory.Math.Implementations.Pi.BBP.Implementation as Math.Implementations.Pi.BBP.Implementation
import qualified Factory.Math.Pi as Math.Pi
data Algorithm =
Base65536
| Bellard
deriving (Algorithm -> Algorithm -> Bool
(Algorithm -> Algorithm -> Bool)
-> (Algorithm -> Algorithm -> Bool) -> Eq Algorithm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Algorithm -> Algorithm -> Bool
$c/= :: Algorithm -> Algorithm -> Bool
== :: Algorithm -> Algorithm -> Bool
$c== :: Algorithm -> Algorithm -> Bool
Eq, ReadPrec [Algorithm]
ReadPrec Algorithm
Int -> ReadS Algorithm
ReadS [Algorithm]
(Int -> ReadS Algorithm)
-> ReadS [Algorithm]
-> ReadPrec Algorithm
-> ReadPrec [Algorithm]
-> Read Algorithm
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Algorithm]
$creadListPrec :: ReadPrec [Algorithm]
readPrec :: ReadPrec Algorithm
$creadPrec :: ReadPrec Algorithm
readList :: ReadS [Algorithm]
$creadList :: ReadS [Algorithm]
readsPrec :: Int -> ReadS Algorithm
$creadsPrec :: Int -> ReadS Algorithm
Read, Int -> Algorithm -> ShowS
[Algorithm] -> ShowS
Algorithm -> String
(Int -> Algorithm -> ShowS)
-> (Algorithm -> String)
-> ([Algorithm] -> ShowS)
-> Show Algorithm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Algorithm] -> ShowS
$cshowList :: [Algorithm] -> ShowS
show :: Algorithm -> String
$cshow :: Algorithm -> String
showsPrec :: Int -> Algorithm -> ShowS
$cshowsPrec :: Int -> Algorithm -> ShowS
Show)
instance Data.Default.Default Algorithm where
def :: Algorithm
def = Algorithm
Base65536
instance Math.Pi.Algorithmic Algorithm where
openR :: Algorithm -> Int -> Rational
openR Algorithm
Base65536 = Series -> Int -> Rational
Math.Implementations.Pi.BBP.Implementation.openR Series
Math.Implementations.Pi.BBP.Base65536.series
openR Algorithm
Bellard = Series -> Int -> Rational
Math.Implementations.Pi.BBP.Implementation.openR Series
Math.Implementations.Pi.BBP.Bellard.series