30#include <rtl/math.hxx>
55 aStrVal(
std::move(aVal)),
101 pWithParent(nullptr),
142 while(
p->aVar.pNext )
199 pLeft->CollectBits();
236 pLeft->FoldConstants(pParser);
237 pRight->FoldConstants(pParser);
251 OUString rl(
pLeft->GetString() );
252 OUString rr(
pRight->GetString() );
268 int eRes = rr.compareTo( rl );
298 double nl =
pLeft->nVal;
303 nl = rtl::math::round(nl);
304 nr = rtl::math::round(nr);
346 bool bCheckType =
false;
350 nVal = pow( nl, nr );
break;
353 nVal = nl * nr;
break;
359 }
else nVal = nl / nr;
363 nVal = nl + nr;
break;
366 nVal = nl - nr;
break;
390 }
else nVal = ll / lr;
397 }
else nVal = ll - lr * (ll/lr);
412 if( !std::isfinite(
nVal ) )
416 if( bCheckType && bBothInt
430 pLeft->FoldConstants(pParser);
431 if (
pLeft->IsNumber())
459 nVal =
static_cast<double>(~static_cast<tools::Long>(
nVal));
void ConvertToIntConstIfPossible()
void FoldConstantsUnaryNode(SbiParser *)
std::unique_ptr< SbiExprNode > pLeft
std::unique_ptr< SbiExprNode > pRight
void Optimize(SbiParser *)
void FoldConstants(SbiParser *)
SbiExprNode * GetRealNode()
void FoldConstantsBinaryNode(SbiParser *)
SbxDataType GetType() const
std::unique_ptr< SbiExprList > SbiExprListPtr
constexpr T & temporary(T &&x)
#define ERRCODE_BASIC_MATH_OVERFLOW
#define ERRCODE_BASIC_CONVERSION
#define ERRCODE_BASIC_ZERODIV
constexpr sal_Int32 SbxMINLNG
SbiExprListVector * pvMorePar