25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
diff -Naur old/sc/source/core/tool/math.cxx new/sc/source/core/tool/math.cxx
|
|
--- old/sc/source/core/tool/math.cxx 2020-09-01 17:49:31.663810821 +0300
|
|
+++ new/sc/source/core/tool/math.cxx 2020-09-04 00:53:52.429231184 +0300
|
|
@@ -19,7 +19,9 @@
|
|
// pow() is expected to set domain error or pole error or range error (or
|
|
// flag them via exceptions) or return NaN or Inf.
|
|
assert((math_errhandling & (MATH_ERRNO | MATH_ERREXCEPT)) != 0);
|
|
+ #ifndef __e2k__
|
|
std::feclearexcept(FE_ALL_EXCEPT);
|
|
+ #endif
|
|
errno = 0;
|
|
return pow( fVal1, fVal2);
|
|
}
|
|
@@ -50,8 +52,10 @@
|
|
}
|
|
// The pow() call must had been the most recent call to check errno or exception.
|
|
if ((((math_errhandling & MATH_ERRNO) != 0) && (errno == EDOM || errno == ERANGE))
|
|
+ #ifndef __e2k__
|
|
|| (((math_errhandling & MATH_ERREXCEPT) != 0)
|
|
&& std::fetestexcept( FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW))
|
|
+ #endif
|
|
|| !rtl::math::isFinite(fPow))
|
|
{
|
|
fPow = CreateDoubleError( FormulaError::IllegalFPOperation);
|