Fix interval<T>::cosh
This commit is contained in:
parent
cd71218a68
commit
0a2ac88dd1
1 changed files with 4 additions and 4 deletions
|
@ -1314,17 +1314,17 @@ template<typename T> void interval<T>::cosh () {
|
||||||
numeric_traits<T>::set_rounding(false);
|
numeric_traits<T>::set_rounding(false);
|
||||||
numeric_traits<T>::cosh(m_lower);
|
numeric_traits<T>::cosh(m_lower);
|
||||||
numeric_traits<T>::set_rounding(true);
|
numeric_traits<T>::set_rounding(true);
|
||||||
numeric_traits<T>::cosh(m_lower);
|
numeric_traits<T>::cosh(m_upper);
|
||||||
lean_assert(check_invariant());
|
lean_assert(check_invariant());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(numeric_traits<T>::is_neg(m_upper) || numeric_traits<T>::is_zero(m_upper)) {
|
if(numeric_traits<T>::is_neg(m_upper) || numeric_traits<T>::is_zero(m_upper)) {
|
||||||
// [a, b] where a <= b < 0
|
// [a, b] where a <= b < 0
|
||||||
numeric_traits<T>::set_rounding(true);
|
std::swap(m_lower, m_upper);
|
||||||
numeric_traits<T>::cosh(m_lower);
|
|
||||||
numeric_traits<T>::set_rounding(false);
|
numeric_traits<T>::set_rounding(false);
|
||||||
numeric_traits<T>::cosh(m_lower);
|
numeric_traits<T>::cosh(m_lower);
|
||||||
std::swap(m_lower, m_upper);
|
numeric_traits<T>::set_rounding(true);
|
||||||
|
numeric_traits<T>::cosh(m_upper);
|
||||||
lean_assert(check_invariant());
|
lean_assert(check_invariant());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue