20 #ifndef INCLUDED_SC_SOURCE_CORE_INC_INTERPRE_HXX
21 #define INCLUDED_SC_SOURCE_CORE_INC_INTERPRE_HXX
23 #include <rtl/math.hxx>
24 #include <rtl/ustring.hxx>
41 namespace sfx2 {
class LinkManager; }
60 struct CompareOptions;
67 double mfMin = std::numeric_limits<double>::max();
68 double mfMax = std::numeric_limits<double>::lowest();
71 template<
typename charT,
typename traits>
72 inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT, traits> &
stream,
const ParamIfsResult& rRes)
75 "sum=" << rRes.
mfSum <<
"," <<
76 "mem=" << rRes.mfMem <<
"," <<
77 "count=" << rRes.mfCount <<
"," <<
78 "min=" << rRes.mfMin <<
"," <<
79 "max=" << rRes.mfMax <<
"," <<
89 class SharedStringPool;
96 #define MAXSTACK (4096 / sizeof(formula::FormulaToken*))
135 {
return r1.get() < r2.get(); }
137 typedef ::std::map< const formula::FormulaConstTokenRef, formula::FormulaConstTokenRef, FormulaTokenRef_less>
ScTokenMatrixMap;
173 static inline double div(
const double& fNumerator,
const double& fDenominator );
250 static double ScGetGCD(
double fx,
double fy);
307 if (nGlobalError != FormulaError::NONE)
331 SvNumFormatType * pRetTypeExpr, sal_uInt32 * pRetIndexExpr,
bool bFinalResult =
false );
533 void ScRandomImpl(
const std::function<
double(
double fFirst,
double fLast )>& RandomFunc,
534 double fFirst,
double fLast );
599 void ScMin(
bool bTextAsZero =
false );
600 void ScMax(
bool bTextAsZero =
false );
607 const std::function<
void(
SCSIZE i,
double fCurrent )>& MatOpFunc,
bool bDoMatOp );
612 void ScAverage(
bool bTextAsZero =
false );
615 void GetStVarParams(
bool bTextAsZero,
double(*VarResult)(
double fVal,
size_t nValCount ) );
616 void ScVar(
bool bTextAsZero =
false );
617 void ScVarP(
bool bTextAsZero =
false );
618 void ScStDev(
bool bTextAsZero =
false );
619 void ScStDevP(
bool bTextAsZero =
false );
648 std::unique_ptr<ScDBQueryParamBase>
GetDBParams(
bool& rMissingField );
720 double GetDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
bool bStrict );
733 ::std::vector<double>& rSortArray,
bool bWeekendMask[ 7 ] );
735 ::std::vector<double>& rSortArray,
bool bWeekendMask[ 7 ],
bool bWorkdayFunction );
747 void ScCeil(
bool bODFF );
789 static double ScGetPV(
double fRate,
double fNper,
double fPmt,
790 double fFv,
bool bPayInAdvance);
793 static double ScGetDDB(
double fCost,
double fSalvage,
double fLife,
794 double fPeriod,
double fFactor);
797 static double ScInterVDB(
double fCost,
double fSalvage,
double fLife,
double fLife1,
798 double fPeriod,
double fFactor);
802 static double ScGetPMT(
double fRate,
double fNper,
double fPv,
803 double fFv,
bool bPayInAdvance);
806 static double ScGetFV(
double fRate,
double fNper,
double fPmt,
807 double fPv,
bool bPayInAdvance);
810 static bool RateIteration(
double fNper,
double fPayment,
double fPv,
811 double fFv,
bool bPayType,
double& fGuess);
813 double ScGetIpmt(
double fRate,
double fPer,
double fNper,
double fPv,
814 double fFv,
bool bPayInAdvance,
double& fPmt);
841 bool CalculateSkew(
double& fSum,
double& fCount,
double& vSum,std::vector<double>& values);
849 ,
double& fT,
double& fF);
866 static double taylor(
const double* pPolynom, sal_uInt16 nMax,
double x);
867 static double gauss(
double x);
870 static double phi(
double x);
873 static double GetPercentile( ::std::vector<double> & rArray,
double fPercentile );
877 double GetBetaDist(
double x,
double alpha,
double beta);
882 double GetFDist(
double x,
double fF1,
double fF2);
888 double GetBeta(
double fAlpha,
double fBeta);
889 static double GetLogBeta(
double fAlpha,
double fBeta);
942 double GetMedian( ::std::vector<double> & rArray );
946 void GetSortArray(
sal_uInt8 nParamCount, ::std::vector<double>& rSortArray, ::std::vector<tools::Long>* pIndexOrder,
bool bConvertTextInArray,
bool bAllowEmptyArray );
947 static void QuickSort(::std::vector<double>& rSortArray, ::std::vector<tools::Long>* pIndexOrder);
957 void ScRank(
bool bAverage );
960 static double GetPercentrank( ::std::vector<double> & rArray,
double fVal,
bool bInclusive );
1004 double GetGammaDist(
double fX,
double fAlpha,
double fLambda);
1005 double GetTInv(
double fAlpha,
double fSize,
int nType );
1020 {
if (nError != FormulaError::NONE && nGlobalError == FormulaError::NONE) nGlobalError = nError; }
1024 { mpLinkManager = pLinkMgr; }
1049 !pJumpMatrix && sp > 0 )
1056 if (!pTokenMatrixMap)
1063 if ( nAct == nMust )
1074 if ( nMust <= nAct && nAct <= nMax )
1093 if (!std::isfinite( fVal))
1098 else if (fVal < 0.0)
1113 double fVal = rtl::math::approxFloor(
GetDouble());
1117 SetError( FormulaError::IllegalArgument);
1119 return static_cast<sal_Int32
>(fVal);
1126 SetError( FormulaError::StringOverflow );
1137 SetError( FormulaError::StringOverflow );
1138 rResult = OUStringBuffer();
1146 if ( !std::isfinite( rVal ) )
1149 if ( nErr != FormulaError::NONE )
1159 return sc::div(fNumerator, fDenominator);
1164 return static_cast< sal_Int16
>( ( n - 1 ) % 7 );
Matrix data type that can store values of mixed types.
double GetLowRegIGamma(double fA, double fX)
You must ensure fA>0.0 && fX>0.0)
void ScRoundSignificant()
void GetExternalDoubleRef(sal_uInt16 nFileId, const OUString &rTabName, const ScComplexRefData &aData, ScExternalRefCache::TokenArrayRef &rArray)
sal_Int32 GetInt32()
if GetDouble() not within int32 limits sets nGlobalError and returns SAL_MAX_INT32 ...
void CalculateMatrixValue(const ScMatrix *pMat, SCSIZE nC, SCSIZE nR)
static void RoundSignificant(double fX, double fDigits, double &fRes)
void ScVarP(bool bTextAsZero=false)
formula::FormulaTokenIterator aCode
SvNumFormatType nFuncFmtType
void ScRank(bool bAverage)
void CalculateAddSub(bool _bSub)
static double GetPercentile(::std::vector< double > &rArray, double fPercentile)
void PushIllegalParameter()
void PushTempToken(formula::FormulaToken *)
Does substitute with formula::FormulaErrorToken in case nGlobalError is set and the token passed is n...
static double phi(double x)
FormulaError GetError() const
Single reference (one address) into the sheet.
static double GetChiSqDistPDF(double fX, double fDF)
SvNumFormatType nRetFmtType
void CalculateSumX2MY2SumX2DY2(bool _bSumX2DY2)
formula::StackVar Interpret()
void PushSingleRef(SCCOL nCol, SCROW nRow, SCTAB nTab)
double GetFDist(double x, double fF1, double fF2)
formula::FormulaConstTokenRef xResult
SubtotalFlags mnSubTotalFlags
void ReverseStack(sal_uInt8 nParamCount)
void SetLinkManager(sfx2::LinkManager *pLinkMgr)
void AssertFormulaMatrix()
double GetCellValueOrZero(const ScAddress &, ScRefCellValue &rCell)
void ScHypGeomDist(int nMinParamCount)
Calculates a value of the hypergeometric distribution.
void GetSortArray(sal_uInt8 nParamCount,::std::vector< double > &rSortArray,::std::vector< tools::Long > *pIndexOrder, bool bConvertTextInArray, bool bAllowEmptyArray)
double GetPercentileExclusive(::std::vector< double > &rArray, double fPercentile)
ScCalcConfig maCalcConfig
sal_Int32 GetInt32WithDefault(sal_Int32 nDefault)
if GetDoubleWithDefault() not within int32 limits sets nGlobalError and returns SAL_MAX_INT32 ...
const formula::FormulaToken * pCur
bool DoubleRefToPosSingleRef(const ScRange &rRange, ScAddress &rAdr)
bool CalculateSkew(double &fSum, double &fCount, double &vSum, std::vector< double > &values)
void ScMax(bool bTextAsZero=false)
FormulaError GetWeekendAndHolidayMasks_MS(const sal_uInt8 nParamCount, const sal_uInt32 nNullDate,::std::vector< double > &rSortArray, bool bWeekendMask[7], bool bWorkdayFunction)
void ConvertMatrixJumpConditionToMatrix()
double GetGamma(double x)
You must ensure non integer arguments for fZ<1.
static thread_local bool bGlobalStackInUse
void GetNumberSequenceArray(sal_uInt8 nParamCount,::std::vector< double > &rArray, bool bConvertTextInArray)
void ScCeil(bool bODFF)
tdf69552 ODFF1.2 function CEILING and Excel function CEILING.MATH In essence, the difference between ...
void PopSingleRef(ScAddress &)
bool FillEntry(ScQueryEntry &rEntry)
void PushDoubleRef(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2)
double GetChiDist(double fChi, double fDF)
You must ensure fDF>0.0.
formula::StackVar GetRawStackType()
Raw stack type without default replacements.
void CalculateRGPRKP(bool _bRKP)
This is very similar to ScCellValue, except that it references the original value instead of copying ...
double GetCellValue(const ScAddress &, ScRefCellValue &rCell)
void ScModalValue_MS(bool bSingle)
sal_uLong GetRetFormatIndex() const
void ScPoissonDist(bool bODFF)
std::vector< double > GetTopNumberArray(SCSIZE &rCol, SCSIZE &rRow)
double GetDoubleWithDefault(double nDefault)
void ScGammaDist(bool bODFF)
bool IfErrorPushError()
If nGlobalError is set push formula::FormulaErrorToken.
bool ConvertMatrixParameters()
bool PopDoubleRefOrSingleRef(ScAddress &rAdr)
static std::unique_ptr< ScTokenMatrixMap > CreateTokenMatrixMap()
ScTokenMatrixMap & GetTokenMatrixMap()
SvNumberFormatter * pFormatter
void PushCellResultToken(bool bDisplayEmptyAsString, const ScAddress &rAddress, SvNumFormatType *pRetTypeExpr, sal_uInt32 *pRetIndexExpr, bool bFinalResult=false)
Obtain cell result / content from address and push as temp token.
constexpr sal_Int32 kScInterpreterMaxStrLen
Arbitrary 256MB result string length limit.
void PushTempTokenWithoutError(const formula::FormulaToken *)
Does not substitute with formula::FormulaErrorToken in case nGlobalError is set.
void PushParameterExpected()
bool SwitchToArrayRefList(ScMatrixRef &xResMat, SCSIZE nMatRows, double fCurrent, const std::function< void(SCSIZE i, double fCurrent)> &MatOpFunc, bool bDoMatOp)
Switch to array reference list if current TOS is one and create/init or update matrix and return true...
sal_uInt32 GetCellNumberFormat(const ScAddress &rPos, ScRefCellValue &rCell)
ScInterpreter(ScFormulaCell *pCell, ScDocument &rDoc, ScInterpreterContext &rContext, const ScAddress &, ScTokenArray &, bool bForGroupThreading=false)
double GetBeta(double fAlpha, double fBeta)
double Fakultaet(double x)
sal_Int16 GetInt16()
if GetDouble() not within int16 limits sets nGlobalError and returns SAL_MAX_INT16 ...
void ScAverage(bool bTextAsZero=false)
SvNumFormatType nCurFmtType
sal_Int32 GetStringPositionArgument()
Obtain a sal_Int32 suitable as string position or length argument.
std::unique_ptr< ScTokenMatrixMap > pTokenMatrixMap
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
ScMatrixRef GetNewMat(SCSIZE nC, SCSIZE nR, bool bEmpty=false)
static ScCalcConfig * mpGlobalConfig
void PushExternalDoubleRef(sal_uInt16 nFileId, const OUString &rTabName, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2)
static double ScGetPMT(double fRate, double fNper, double fPv, double fFv, bool bPayInAdvance)
void CalculateSlopeIntercept(bool bSlope)
static double ScGetFV(double fRate, double fNper, double fPmt, double fPv, bool bPayInAdvance)
void MatrixJumpConditionToMatrix()
ScMatrixRef QueryMat(const ScMatrixRef &pMat, sc::CompareOptions &rOptions)
static double gaussinv(double x)
static const double fMaxGammaArgument
sal_Int32 double_to_int32(double fVal)
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
void PushString(const OUString &rStr)
ScFormulaCell * pMyFormulaCell
FormulaError mnStringNoValueError
FormulaError GetDoubleErrorValue(double fVal)
void ScRandomImpl(const std::function< double(double fFirst, double fLast)> &RandomFunc, double fFirst, double fLast)
const formula::FormulaToken ** pStack
void PushError(FormulaError nError)
sc::RangeMatrix CompareMat(ScQueryOp eOp, sc::CompareOptions *pOptions=nullptr)
double GetTDist(double T, double fDF, int nType)
void ScNetWorkdays(bool bOOXML_Version)
void IterateParametersIf(ScIterFuncIf)
void MakeMatNew(ScMatrixRef &rMat, SCSIZE nC, SCSIZE nR)
sc::RangeMatrix PopRangeMatrix()
std::unique_ptr< ScDBQueryParamBase > GetDBParams(bool &rMissingField)
static double gauss(double x)
bool CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8 *pCellArr)
ScInterpreterContext & mrContext
bool LookupQueryWithCache(ScAddress &o_rResultPos, const ScQueryParam &rParam) const
bool MustHaveParamCount(short nAct, short nMust)
static void SetGlobalConfig(const ScCalcConfig &rConfig)
void Push(const formula::FormulaToken &r)
Does substitute with formula::FormulaErrorToken in case nGlobalError is set and the token passed is n...
formula::FormulaConstTokenRef PopToken()
void DoubleRefToRange(const ScComplexRefData &, ScRange &, bool bDontCheckForTableOp=false)
void CalculateSmallLarge(bool bSmall)
::std::map< const formula::FormulaConstTokenRef, formula::FormulaConstTokenRef, FormulaTokenRef_less > ScTokenMatrixMap
ScMatValType GetDoubleOrStringFromMatrix(double &rDouble, svl::SharedString &rString)
static double div(const double &fNumerator, const double &fDenominator)
Fail safe division, returning a FormulaError::DivisionByZero coded into a double if denominator is 0...
double ConvertStringToValue(const OUString &)
const svl::SharedString & GetStringResult() const
void ScVar(bool bTextAsZero=false)
sfx2::LinkManager * mpLinkManager
void ScGetIsoWeekOfYear()
bool IsTableOpInRange(const ScRange &)
svl::SharedString PopString()
void CalculatePearsonCovar(bool _bPearson, bool _bStexy, bool _bSample)
void PushDouble(double nVal)
double ScGetIpmt(double fRate, double fPer, double fNper, double fPv, double fFv, bool bPayInAdvance, double &fPmt)
void ScPercentile(bool bInclusive)
double GetGammaDist(double fX, double fAlpha, double fLambda)
Gamma distribution, cumulative distribution function.
size_t GetRefListArrayMaxSize(short nParamCount)
Check for array of references to determine the maximum size of a return column vector if in array con...
static double GetLogGamma(double x)
You must ensure fZ>0.
Base class for abstracting range data backends for database functions.
ScMatrixRef CreateMatrixFromDoubleRef(const formula::FormulaToken *pToken, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2)
void PopDoubleRef(ScRange &rRange, short &rParam, size_t &rRefInList)
If formula::StackVar formula::svDoubleRef pop ScDoubleRefToken and return values of ScComplexRefData...
static ScCalcConfig & GetOrCreateGlobalConfig()
static void QuickSort(::std::vector< double > &rSortArray,::std::vector< tools::Long > *pIndexOrder)
double GetDoubleFromMatrix(const ScMatrixRef &pMat)
formula::FormulaToken * CreateFormulaDoubleToken(double fVal, SvNumFormatType nFmt=SvNumFormatType::NUMBER)
bool MustHaveParamCountMin(short nAct, short nMin)
SvNumFormatType GetRetFormatType() const
void PushMatrix(const sc::RangeMatrix &rMat)
void ScTDist_T(int nTails)
static FormulaError GetCellErrCode(const ScRefCellValue &rCell)
VolatileType meVolatileType
void PushExternalSingleRef(sal_uInt16 nFileId, const OUString &rTabName, SCCOL nCol, SCROW nRow, SCTAB nTab)
void QueryMatrixType(const ScMatrixRef &xMat, SvNumFormatType &rRetTypeExpr, sal_uInt32 &rRetIndexExpr)
void GetCellString(svl::SharedString &rStr, ScRefCellValue &rCell)
FormulaError nGlobalError
bool CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8 *pCellArr)
svl::SharedString GetStringFromMatrix(const ScMatrixRef &pMat)
double GetUpRegIGamma(double fA, double fX)
You must ensure fA>0.0 && fX>0.0)
static bool HasForceArray(OpCode eOp)
Whether OpCode has a parameter of type ForceArray or ReferenceOrForceArray.
bool JumpMatrix(short nStackLevel)
static double taylor(const double *pPolynom, sal_uInt16 nMax, double x)
void ScChiDist(bool bODFF)
double GetDateSerial(sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bStrict)
Obtain the date serial number for a given date.
void PopRefListPushMatrixOrRef()
formula::StackVar GetResultType() const
formula::StackVar GetStackType()
Stack type with replacement of defaults, e.g. svMissing and formula::svEmptyCell will result in formu...
bool CheckMatrix(bool _bLOG, sal_uInt8 &nCase, SCSIZE &nCX, SCSIZE &nCY, SCSIZE &nRX, SCSIZE &nRY, SCSIZE &M, SCSIZE &N, ScMatrixRef &pMatX, ScMatrixRef &pMatY)
void ReplaceCell(ScAddress &)
static thread_local std::unique_ptr< ScTokenStack > pGlobalStack
void ScFloor(bool bODFF)
tdf69552 ODFF1.2 function FLOOR and Excel function FLOOR.MATH In essence, the difference between the ...
double GetValueCellValue(const ScAddress &, double fOrig)
Only ValueCell, formula cells already store the result rounded.
sal_uInt8 GetByte() const
bool SetSbxVariable(SbxVariable *pVar, const ScAddress &)
static const ScCalcConfig & GetGlobalConfig()
void ValidateRef(const ScSingleRefData &rRef)
void CalculateTrendGrowth(bool _bGrowth)
Reference< XOutputStream > stream
svl::SharedStringPool & mrStrPool
double GetBinomDistPMF(double x, double n, double p)
double GetGammaContFraction(double fA, double fX)
You must ensure fA>0.0 && fX>0.0 valid results only if fX > fA+1.0 uses continued fraction with odd i...
void Init(ScFormulaCell *pCell, const ScAddress &rPos, ScTokenArray &rTokArray)
ScDBRangeBase * PopDBDoubleRef()
FormulaError GetWeekendAndHolidayMasks(const sal_uInt8 nParamCount, const sal_uInt32 nNullDate,::std::vector< double > &rSortArray, bool bWeekendMask[7])
void IterateParameters(ScIterFunc, bool bTextAsZero=false)
Configuration options for formula interpreter.
void CalculateSkewOrSkewp(bool bSkewp)
void PushIllegalArgument()
void ScEncodeURL()
Returns a string in which all non-alphanumeric characters except stroke and underscore (-_) have been...
sal_uInt32 GetUInt32()
if GetDouble() not within uint32 limits sets nGlobalError and returns SAL_MAX_UINT32 ...
::formula::FormulaTokenRef TokenRef
void PushWithoutError(const formula::FormulaToken &r)
Does not substitute with formula::FormulaErrorToken in case nGlobalError is set.
static double GetLogBeta(double fAlpha, double fBeta)
static bool RateIteration(double fNper, double fPayment, double fPv, double fFv, bool bPayType, double &fGuess)
void ScStDevP(bool bTextAsZero=false)
static sal_Int16 GetDayOfWeek(sal_Int32 n)
static double BinomKoeff(double n, double k)
static double ScGetDDB(double fCost, double fSalvage, double fLife, double fPeriod, double fFactor)
double GetChiSqDistCDF(double fX, double fDF)
You must ensure fDF>0.0.
static utl::SearchParam::SearchType DetectSearchType(const OUString &rStr, const ScDocument &rDoc)
Detect if string should be used as regular expression or wildcard expression or literal string...
void ScForecast_Ets(ScETSType eETSType)
bool CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8 *pCellArr)
void PopDoubleRefPushMatrix()
FormulaError GetErrorType()
static bool MayBeRegExp(const OUString &rStr)
Could string be a regular expression? if regularExpressions are disabled the function returns false r...
void CalculateLookup(bool bHLookup)
std::shared_ptr< ScTokenArray > TokenArrayRef
void GetStVarParams(bool bTextAsZero, double(*VarResult)(double fVal, size_t nValCount))
static double ScInterVDB(double fCost, double fSalvage, double fLife, double fLife1, double fPeriod, double fFactor)
ScJumpMatrix * pJumpMatrix
void ScLogNormDist(int nMinParamCount)
double GetTInv(double fAlpha, double fSize, int nType)
ScMatrixRef MatConcat(const ScMatrixRef &pMat1, const ScMatrixRef &pMat2)
void ScBetaDist_MS()
Microsoft version has parameters in different order Also, upper and lowerbound are optional and have ...
void SingleRefToVars(const ScSingleRefData &rRef, SCCOL &rCol, SCROW &rRow, SCTAB &rTab)
svl::SharedString GetStringFromDouble(const double fVal)
void ScNormDist(int nMinParamCount)
void RoundNumber(rtl_math_RoundingMode eMode)
svl::SharedString GetString()
These need to be in global namespace just like their respective types are.
double GetNumResult() const
double GetGammaSeries(double fA, double fX)
You must ensure fA>0.0 && fX>0.0 valid results only if fX <= fA+1.0 uses power series.
bool MatrixParameterConversion()
void PopExternalSingleRef(sal_uInt16 &rFileId, OUString &rTabName, ScSingleRefData &rRef)
void MergeCalcConfig()
Merge global and document specific settings.
Complex reference (a range) into the sheet.
bool CalculateTest(bool _bTemplin, const SCSIZE nC1, const SCSIZE nC2, const SCSIZE nR1, const SCSIZE nR2, const ScMatrixRef &pMat1, const ScMatrixRef &pMat2, double &fT, double &fF)
double GetHypGeomDist(double x, double n, double M, double N)
Calculates a value of the hypergeometric distribution.
void DBIterator(ScIterFunc)
void GetDBStVarParams(double &rVal, double &rValCount)
static bool MayBeWildcard(const OUString &rStr)
Could string be a wildcard (*,?,~) expression? If wildcards are disabled the function returns false r...
sc::RangeMatrix GetRangeMatrix()
void ScMin(bool bTextAsZero=false)
void PopExternalDoubleRef(sal_uInt16 &rFileId, OUString &rTabName, ScComplexRefData &rRef)
void ScPercentrank(bool bInclusive)
formula::FormulaToken * CreateDoubleOrTypedToken(double fVal)
bool CheckStringResultLen(OUString &rResult, const OUString &rAdd)
const formula::FormulaConstTokenRef & GetResultToken() const
void TreatDoubleError(double &rVal)
const formula::FormulaToken * pPointer[MAXSTACK]
void PushTokenRef(const formula::FormulaConstTokenRef &)
Pushes the token or substitutes with formula::FormulaErrorToken in case nGlobalError is set and the t...
static void MEMat(const ScMatrixRef &mM, SCSIZE n)
::std::vector< ScComplexRefData > ScRefList
double Compare(ScQueryOp eOp)
static double ScGetPV(double fRate, double fNper, double fPmt, double fFv, bool bPayInAdvance)
void PushStringBuffer(const sal_Unicode *pString)
double GetBetaDistPDF(double fX, double fA, double fB)
void ScQuartile(bool bInclusive)
void IterateParametersIfs(double(*ResultFunc)(const sc::ParamIfsResult &rRes))
double GetGammaDistPDF(double fX, double fAlpha, double fLambda)
Gamma distribution, probability density function.
void SetError(FormulaError nError)
double GetMedian(::std::vector< double > &rArray)
static bool CheckStringPositionArgument(double &fVal)
Check if a double is suitable as string position or length argument.
Each instance of this struct represents a single filtering criteria.
VolatileType GetVolatileType() const
void DoubleRefToVars(const formula::FormulaToken *p, SCCOL &rCol1, SCROW &rRow1, SCTAB &rTab1, SCCOL &rCol2, SCROW &rRow2, SCTAB &rTab2)
void ScStDev(bool bTextAsZero=false)
double div(const double &fNumerator, const double &fDenominator)
Return fNumerator/fDenominator if fDenominator!=0 else #DIV/0! error coded into double.
static double GetPercentrank(::std::vector< double > &rArray, double fVal, bool bInclusive)
static double ScGetGCD(double fx, double fy)
bool GetDoubleOrString(double &rValue, svl::SharedString &rString)
returns TRUE if double (or error, check nGlobalError), else FALSE
void ScIfError(bool bNAonly)
bool IsInArrayContext() const
double GetBetaDist(double x, double alpha, double beta)
static double integralPhi(double x)