20 static Interval fwd(
const Interval& x1);
21 static ScalarType fwd_natural(
const ScalarType& x1);
22 static ScalarType fwd_centered(
const ScalarType& x1);
23 static void bwd(
const Interval& y, Interval& x1);
30 sqrt(
const ScalarExpr& x1)
32 return { std::make_shared<AnalyticOperationExpr<SqrtOp,ScalarType,ScalarType>>(x1) };
42 inline ScalarType SqrtOp::fwd_natural(
const ScalarType& x1)
46 x1.a.is_subset({0,oo})
52 inline ScalarType SqrtOp::fwd_centered(
const ScalarType& x1)
54 if(centered_form_not_available_for_args(x1))
55 return fwd_natural(x1);
57 IntervalMatrix d(1,x1.da.size());
58 for(Index i = 0 ; i < d.size() ; i++)
59 d(0,i) = x1.da(0,i)/(2.*
sqrt(x1.a));
65 x1.a.is_subset({0,oo})
77 if(y.is_empty() || y.ub() < 0)
81 x1 &=
sqr(Interval(0,y.ub()));
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:62
Interval sqrt(const Interval &x)
Returns .
Definition codac2_Interval_operations_impl.h:26
Interval sqr(const Interval &x)
Returns .
Definition codac2_Interval_operations_impl.h:21