{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Numeric.AD.Halley.Double
(
findZero
, inverse
, fixedPoint
, extremum
) where
import Prelude
import Numeric.AD.Internal.Forward (Forward)
import Numeric.AD.Internal.On
import Numeric.AD.Internal.Tower.Double (TowerDouble)
import Numeric.AD.Internal.Type (AD(..))
import qualified Numeric.AD.Rank1.Halley.Double as Rank1
findZero :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double]
findZero :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> [Double]
findZero forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> [Double]
Rank1.findZero (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 findZero #-}
inverse :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> Double -> [Double]
inverse :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> Double -> [Double]
inverse forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> Double -> [Double]
Rank1.inverse (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 inverse #-}
fixedPoint :: (forall s. AD s TowerDouble -> AD s TowerDouble) -> Double -> [Double]
fixedPoint :: (forall s. AD s TowerDouble -> AD s TowerDouble)
-> Double -> [Double]
fixedPoint forall s. AD s TowerDouble -> AD s TowerDouble
f = (TowerDouble -> TowerDouble) -> Double -> [Double]
Rank1.fixedPoint (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 fixedPoint #-}
extremum :: (forall s. AD s (On (Forward TowerDouble)) -> AD s (On (Forward TowerDouble))) -> Double -> [Double]
extremum :: (forall s.
AD s (On (Forward TowerDouble)) -> AD s (On (Forward TowerDouble)))
-> Double -> [Double]
extremum forall s.
AD s (On (Forward TowerDouble)) -> AD s (On (Forward TowerDouble))
f = (On (Forward TowerDouble) -> On (Forward TowerDouble))
-> Double -> [Double]
Rank1.extremum (forall s a. AD s a -> a
runADforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s.
AD s (On (Forward TowerDouble)) -> AD s (On (Forward TowerDouble))
fforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall s a. a -> AD s a
AD)
{-# INLINE extremum #-}