21 static std::string str(
const X1& x1)
23 return "log(" + x1->str() +
")";
27 static std::pair<Index,Index> output_shape([[maybe_unused]]
const X1& s1)
32 static Interval fwd(
const Interval& x1);
33 static ScalarType fwd_natural(
const ScalarType& x1);
34 static ScalarType fwd_centered(
const ScalarType& x1);
35 static void bwd(
const Interval& y, Interval& x1);
42 log(
const ScalarExpr& x1)
44 return { std::make_shared<AnalyticOperationExpr<LogOp,ScalarType,ScalarType>>(x1) };
54 inline ScalarType LogOp::fwd_natural(
const ScalarType& x1)
56 if(centered_form_not_available_for_args(x1))
57 return fwd_natural(x1);
61 x1.a.is_subset({0,oo})
67 inline ScalarType LogOp::fwd_centered(
const ScalarType& x1)
69 if(centered_form_not_available_for_args(x1))
70 return fwd_natural(x1);
72 IntervalMatrix d(1,x1.da.size());
73 for(Index i = 0 ; i < d.size() ; i++)
74 d(0,i) = x1.da(0,i)/x1.a;
80 x1.a.is_subset({0,oo})
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:62
Interval log(const Interval &x)
Returns .
Definition codac2_Interval_operations_impl.h:85
Interval exp(const Interval &x)
Returns .
Definition codac2_Interval_operations_impl.h:78