diff options
Diffstat (limited to 'src/CHAD.hs')
-rw-r--r-- | src/CHAD.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/CHAD.hs b/src/CHAD.hs index 6ab4cfb..1126fde 100644 --- a/src/CHAD.hs +++ b/src/CHAD.hs @@ -219,6 +219,7 @@ d1op (ORecip t) e = EOp ext (ORecip t) e d1op (OExp t) e = EOp ext (OExp t) e d1op (OLog t) e = EOp ext (OLog t) e d1op (OIDiv t) e = EOp ext (OIDiv t) e +d1op (OMod t) e = EOp ext (OMod t) e -- | Both primal and dual must be duplicable expressions data D2Op a t = Linear (forall env. Ex env (D2 t) -> Ex env (D2 a)) @@ -244,6 +245,7 @@ d2op op = case op of OExp t -> floatingD2 t $ Nonlinear $ \e d -> EOp ext (OMul t) (EPair ext (EOp ext (OExp t) e) d) OLog t -> floatingD2 t $ Nonlinear $ \e d -> EOp ext (OMul t) (EPair ext (EOp ext (ORecip t) e) d) OIDiv t -> integralD2 t $ Linear $ \_ -> ENothing ext (STPair STNil STNil) + OMod t -> integralD2 t $ Linear $ \_ -> ENothing ext (STPair STNil STNil) where d2opUnArrangeInt :: SScalTy a -> (D2s a ~ TScal a => D2Op (TScal a) t) |