{-# LANGUAGE Rank2Types #-}
module Numeric.AD.Mode.Tower.Double
( AD
, TowerDouble
, auto
, taylor
, taylor0
, maclaurin
, maclaurin0
, diff
, diff'
, diffs
, diffs0
, diffsF
, diffs0F
, du
, du'
, dus
, dus0
, duF
, duF'
, dusF
, dus0F
) where
import qualified Numeric.AD.Rank1.Tower.Double as Rank1
import Numeric.AD.Internal.Tower.Double (TowerDouble)
import Numeric.AD.Internal.Type (AD(..))
import Numeric.AD.Mode
diffs :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double]
diffs :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> [Double]
diffs forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> [Double]
Rank1.diffs (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. AD s TowerDouble -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
{-# INLINE diffs #-}
diffs0 :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double]
diffs0 :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> [Double]
diffs0 forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> [Double]
Rank1.diffs0 (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. AD s TowerDouble -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
{-# INLINE diffs0 #-}
diffsF :: Functor f => (forall s. AD s TowerDouble -> f (AD s TowerDouble)) -> Double -> f [Double]
diffsF :: forall (f :: * -> *).
Functor f =>
(forall s. AD s TowerDouble -> f (AD s TowerDouble))
-> Double -> f [Double]
diffsF forall s. AD s TowerDouble -> f (AD s TowerDouble)
f = forall (f :: * -> *).
Functor f =>
(TowerDouble -> f TowerDouble) -> Double -> f [Double]
Rank1.diffsF (forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. AD s TowerDouble -> f (AD s TowerDouble)
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
{-# INLINE diffsF #-}
diffs0F :: Functor f => (forall s. AD s TowerDouble -> f (AD s TowerDouble)) -> Double -> f [Double]
diffs0F :: forall (f :: * -> *).
Functor f =>
(forall s. AD s TowerDouble -> f (AD s TowerDouble))
-> Double -> f [Double]
diffs0F forall s. AD s TowerDouble -> f (AD s TowerDouble)
f = forall (f :: * -> *).
Functor f =>
(TowerDouble -> f TowerDouble) -> Double -> f [Double]
Rank1.diffs0F (forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. AD s TowerDouble -> f (AD s TowerDouble)
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
{-# INLINE diffs0F #-}
taylor :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> Double -> [Double]
taylor :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> Double -> [Double]
taylor forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> Double -> [Double]
Rank1.taylor (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. AD s TowerDouble -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
taylor0 :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> Double -> [Double]
taylor0 :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> Double -> [Double]
taylor0 forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> Double -> [Double]
Rank1.taylor0 (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. AD s TowerDouble -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
{-# INLINE taylor0 #-}
maclaurin :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double]
maclaurin :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> [Double]
maclaurin forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> [Double]
Rank1.maclaurin (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. AD s TowerDouble -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
{-# INLINE maclaurin #-}
maclaurin0 :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double]
maclaurin0 :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> [Double]
maclaurin0 forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> [Double]
Rank1.maclaurin0 (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. AD s TowerDouble -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
{-# INLINE maclaurin0 #-}
diff :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> Double
diff :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> Double
diff forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> Double
Rank1.diff (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. AD s TowerDouble -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
{-# INLINE diff #-}
diff' :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> (Double, Double)
diff' :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> (Double, Double)
diff' forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> (Double, Double)
Rank1.diff' (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. AD s TowerDouble -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
{-# INLINE diff' #-}
du :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f (Double, Double) -> Double
du :: forall (f :: * -> *).
Functor f =>
(forall s. f (AD s TowerDouble) -> AD s TowerDouble)
-> f (Double, Double) -> Double
du forall s. f (AD s TowerDouble) -> AD s TowerDouble
f = forall (f :: * -> *).
Functor f =>
(f TowerDouble -> TowerDouble) -> f (Double, Double) -> Double
Rank1.du (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. f (AD s TowerDouble) -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. a -> AD s a
AD)
{-# INLINE du #-}
du' :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f (Double, Double) -> (Double, Double)
du' :: forall (f :: * -> *).
Functor f =>
(forall s. f (AD s TowerDouble) -> AD s TowerDouble)
-> f (Double, Double) -> (Double, Double)
du' forall s. f (AD s TowerDouble) -> AD s TowerDouble
f = forall (f :: * -> *).
Functor f =>
(f TowerDouble -> TowerDouble)
-> f (Double, Double) -> (Double, Double)
Rank1.du' (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. f (AD s TowerDouble) -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. a -> AD s a
AD)
{-# INLINE du' #-}
duF :: (Functor f, Functor g) => (forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)) -> f (Double, Double) -> g Double
duF :: forall (f :: * -> *) (g :: * -> *).
(Functor f, Functor g) =>
(forall s. f (AD s TowerDouble) -> g (AD s TowerDouble))
-> f (Double, Double) -> g Double
duF forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)
f = forall (f :: * -> *) (g :: * -> *).
(Functor f, Functor g) =>
(f TowerDouble -> g TowerDouble) -> f (Double, Double) -> g Double
Rank1.duF (forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. a -> AD s a
AD)
{-# INLINE duF #-}
duF' :: (Functor f, Functor g) => (forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)) -> f (Double, Double) -> g (Double, Double)
duF' :: forall (f :: * -> *) (g :: * -> *).
(Functor f, Functor g) =>
(forall s. f (AD s TowerDouble) -> g (AD s TowerDouble))
-> f (Double, Double) -> g (Double, Double)
duF' forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)
f = forall (f :: * -> *) (g :: * -> *).
(Functor f, Functor g) =>
(f TowerDouble -> g TowerDouble)
-> f (Double, Double) -> g (Double, Double)
Rank1.duF' (forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. a -> AD s a
AD)
{-# INLINE duF' #-}
dus :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f [Double] -> [Double]
dus :: forall (f :: * -> *).
Functor f =>
(forall s. f (AD s TowerDouble) -> AD s TowerDouble)
-> f [Double] -> [Double]
dus forall s. f (AD s TowerDouble) -> AD s TowerDouble
f = forall (f :: * -> *).
Functor f =>
(f TowerDouble -> TowerDouble) -> f [Double] -> [Double]
Rank1.dus (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. f (AD s TowerDouble) -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. a -> AD s a
AD)
{-# INLINE dus #-}
dus0 :: Functor f => (forall s. f (AD s TowerDouble) -> AD s TowerDouble) -> f [Double] -> [Double]
dus0 :: forall (f :: * -> *).
Functor f =>
(forall s. f (AD s TowerDouble) -> AD s TowerDouble)
-> f [Double] -> [Double]
dus0 forall s. f (AD s TowerDouble) -> AD s TowerDouble
f = forall (f :: * -> *).
Functor f =>
(f TowerDouble -> TowerDouble) -> f [Double] -> [Double]
Rank1.dus0 (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. f (AD s TowerDouble) -> AD s TowerDouble
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. a -> AD s a
AD)
{-# INLINE dus0 #-}
dusF :: (Functor f, Functor g) => (forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)) -> f [Double] -> g [Double]
dusF :: forall (f :: * -> *) (g :: * -> *).
(Functor f, Functor g) =>
(forall s. f (AD s TowerDouble) -> g (AD s TowerDouble))
-> f [Double] -> g [Double]
dusF forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)
f = forall (f :: * -> *) (g :: * -> *).
(Functor f, Functor g) =>
(f TowerDouble -> g TowerDouble) -> f [Double] -> g [Double]
Rank1.dusF (forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. a -> AD s a
AD)
{-# INLINE dusF #-}
dus0F :: (Functor f, Functor g) => (forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)) -> f [Double] -> g [Double]
dus0F :: forall (f :: * -> *) (g :: * -> *).
(Functor f, Functor g) =>
(forall s. f (AD s TowerDouble) -> g (AD s TowerDouble))
-> f [Double] -> g [Double]
dus0F forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)
f = forall (f :: * -> *) (g :: * -> *).
(Functor f, Functor g) =>
(f TowerDouble -> g TowerDouble) -> f [Double] -> g [Double]
Rank1.dus0F (forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s. f (AD s TowerDouble) -> g (AD s TowerDouble)
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall s a. a -> AD s a
AD)
{-# INLINE dus0F #-}