DACE 2.0 API Manual
Differential Algebra Core Engine
Data Structures | Macros | Typedefs | Functions | Variables
Core

Data Structures

struct  dvariable
 
struct  dmem
 
struct  dcom
 
struct  dcom_t
 
struct  ddbg
 
struct  dmonomial
 
struct  dextendedmonomial
 
struct  daceblob
 
struct  errstrings
 

Macros

#define __STDC_WANT_LIB_EXT1__   1
 
#define _USE_MATH_DEFINES
 
#define M_PI   (3.14159265358979323846)
 
#define M_PI_2   (1.57079632679489661923)
 
#define UNLIKELY(expr)   expr
 
#define LIKELY(expr)   expr
 
#define ERROR_FUN_SIZE   64
 
#define ERROR_MSG_SIZE   256
 
#define DACE_BINARY_MAGIC   (0x1E304144)
 
#define DACE_STRLEN   (140)
 
#define REF(x)   *(x)
 
#define ARG(x)   &(x)
 
#define DACE_INFO   1
 
#define DACE_WARNING   3
 
#define DACE_ERROR   6
 
#define DACE_SEVERE   9
 
#define DACE_PANIC   10
 
#define daceini(no, nv)   daceInitialize(no, nv)
 
#define dacever(imaj, imin, icos)   daceGetVersion(imaj, imin, icos)
 
#define daceseteps(deps)   daceSetEpsilon(deps)
 
#define dacegeteps()   daceGetEpsilon()
 
#define dacegetepsmac()   daceGetMachineEpsilon()
 
#define dacegetnomax()   daceGetMaxOrder()
 
#define dacegetnvmax()   daceGetMaxVariables()
 
#define dacegetnmmax()   daceGetMaxMonomials()
 
#define dacegetnot()   daceGetTruncationOrder()
 
#define dacesetnot(fnot)   daceSetTruncationOrder(fnot)
 
#define dacegetxerr()   daceGetErrorX()
 
#define dacegetyyerr()   daceGetErrorYY()
 
#define daceclrerr()   daceClearError()
 
#define daceall(inc, len)   daceAllocateDA(inc, len)
 
#define dacedal(inc)   daceFreeDA(ARG(inc))
 
#define dacememdump(iunit)   daceMemoryDump()
 
#define dacevar(ina, i, ckon)   daceCreateVariable(ARG(ina), i, ckon)
 
#define dacecoef(ina, jj, ckon)   daceCreateMonomial(ARG(ina), jj, ckon)
 
#define dacecon(ina, ckon)   daceCreateConstant(ARG(ina), ckon)
 
#define daceran(ina, cm)   daceCreateRandom(ARG(ina), cm)
 
#define daceconst(ina)   daceGetConstant(ARG(ina))
 
#define dacelinear(ina, c)   daceGetLinear(ARG(ina), c)
 
#define dacepok(ina, jj, cjj)   daceSetCoefficient(ARG(ina), jj, cjj)
 
#define dacelist(ina, npos, jj, cjj)   daceGetCoefficientAt(ARG(ina), npos, jj, cjj)
 
#define dacecop(ina, inb)   daceCopy(ARG(ina), ARG(inb))
 
#define dacetrim(ina, imin, imax, inc)   daceTrim(ARG(ina), imin, imax, ARG(inc))
 
#define daceonorm(ina, ivar, ityp, onorm)   daceOrderedNorm(ARG(ina), ivar, ityp, onorm)
 
#define daceest(ina, ivar, ityp, c, nc)   daceEstimate(ARG(ina), ivar, ityp, c, NULL, nc)
 
#define dacebound(ina, alo, aup)   daceGetBounds(ARG(ina), alo, aup)
 
#define daceplug(ina, nvar, val, inc)   daceEvalVariable(ARG(ina), nvar, val, ARG(inc))
 
#define dacewrite(ina, strs, nstrs)   daceWrite(ARG(ina), strs, nstrs)
 
#define daceread(ina, strs, nstrs)   daceRead(ARG(ina), strs, nstrs)
 
#define daceadd(ina, inb, inc)   daceAdd(ARG(ina), ARG(inb), ARG(inc))
 
#define dacesub(ina, inb, inc)   daceSubtract(ARG(ina), ARG(inb), ARG(inc))
 
#define dacemul(ina, inb, inc)   daceMultiply(ARG(ina), ARG(inb), ARG(inc))
 
#define dacediv(ina, inb, inc)   daceDivide(ARG(ina), ARG(inb), ARG(inc))
 
#define dacesqr(ina, inb)   daceSquare(ARG(ina), ARG(inb))
 
#define dacecadd(ina, ckon, inb)   daceAddDouble(ARG(ina), ckon, ARG(inb))
 
#define dacecsub(ina, ckon, inb)   daceDoubleSubtract(ARG(ina), ckon, ARG(inb))
 
#define dacesubc(ina, ckon, inb)   daceSubtractDouble(ARG(ina), ckon, ARG(inb))
 
#define dacecmul(ina, ckon, inb)   daceMultiplyDouble(ARG(ina), ckon, ARG(inb))
 
#define dacecdiv(ina, ckon, inb)   daceDoubleDivide(ARG(ina), ckon, ARG(inb))
 
#define dacedivc(ina, ckon, inb)   daceDivideDouble(ARG(ina), ckon, ARG(inb))
 
#define daceder(idif, ina, inc)   daceDifferentiate(idif, ARG(ina), ARG(inc))
 
#define daceint(iint, ina, inc)   daceIntegrate(iint, ARG(ina), ARG(inc))
 
#define dacetrunc(ina, inc)   daceTruncate(ARG(ina), ARG(inc))
 
#define daceround(ina, inc)   daceRound(ARG(ina), ARG(inc))
 
#define dacemod(ina, p, inc)   daceModulo(ARG(ina), p, ARG(inc))
 
#define dacepow(ina, np, inc)   dacePower(ARG(ina), np, ARG(inc))
 
#define daceroot(ina, np, inc)   daceRoot(ARG(ina), np, ARG(inc))
 
#define daceminv(ina, inc)   daceMultiplicativeInverse(ARG(ina), ARG(inc))
 
#define dacesqrt(ina, inc)   daceSquareRoot(ARG(ina), ARG(inc))
 
#define daceisrt(ina, inc)   daceInverseSquareRoot(ARG(ina), ARG(inc))
 
#define daceexp(ina, inc)   daceExponential(ARG(ina), ARG(inc))
 
#define dacelog(ina, inc)   daceLogarithm(ARG(ina), ARG(inc))
 
#define dacelogb(ina, b, inc)   daceLogarithmBase(ARG(ina), b, ARG(inc))
 
#define dacesin(ina, inc)   daceSine(ARG(ina), ARG(inc))
 
#define dacecos(ina, inc)   daceCosine(ARG(ina), ARG(inc))
 
#define dacetan(ina, inc)   daceTangent(ARG(ina), ARG(inc))
 
#define daceasin(ina, inc)   daceArcSine(ARG(ina), ARG(inc))
 
#define daceacos(ina, inc)   daceArcCosine(ARG(ina), ARG(inc))
 
#define daceatan(ina, inc)   daceArcTangent(ARG(ina), ARG(inc))
 
#define daceatan2(ina, inb, inc)   daceArcTangent2(ARG(ina), ARG(inb), ARG(inc))
 
#define dacesinh(ina, inc)   daceHyperbolicSine(ARG(ina), ARG(inc))
 
#define dacecosh(ina, inc)   daceHyperbolicCosine(ARG(ina), ARG(inc))
 
#define dacetanh(ina, inc)   daceHyperbolicTangent(ARG(ina), ARG(inc))
 
#define daceasinh(ina, inc)   daceHyperbolicArcSine(ARG(ina), ARG(inc))
 
#define daceacosh(ina, inc)   daceHyperbolicArcCosine(ARG(ina), ARG(inc))
 
#define daceatanh(ina, inc)   daceHyperbolicArcTangent(ARG(ina), ARG(inc))
 
#define DACE_API
 

Typedefs

typedef struct dvariable variable
 
typedef struct dmem dacemem
 
typedef struct dcom dacecom
 
typedef struct dcom_t dacecom_t
 
typedef struct ddbg dacedbg
 
typedef struct dmonomial monomial
 
typedef struct dextendedmonomial extended_monomial
 
typedef int DACEDA
 

Functions

unsigned int umin (const unsigned int a, const unsigned int b)
 
unsigned int umax (const unsigned int a, const unsigned int b)
 
double pown (double a, unsigned int b)
 
int npown (int a, unsigned int b)
 
unsigned int daceEncodeExponents (const unsigned int p[], const unsigned int no, const unsigned int nv)
 
unsigned int daceDecodeExponents (unsigned int ic, const unsigned int no, const unsigned int nv, unsigned int p[])
 
unsigned int daceNextMonomial (unsigned int p[], const unsigned int no, const unsigned int nv)
 
unsigned int daceNextOrderedMonomial (unsigned int p[], const unsigned int no, const unsigned int nv)
 
unsigned int daceCountMonomials (unsigned int no, unsigned int nv)
 
unsigned int daceEncode (const unsigned int jj[])
 
void daceDecode (const unsigned int jc, unsigned int jj[])
 
void dacePack (double *restrict cc, DACEDA *restrict inc)
 
double daceRandom ()
 
void daceCreateVariable (DACEDA *ina, const unsigned int i, const double ckon)
 
void daceCreateMonomial (DACEDA *ina, const unsigned int jj[], const double ckon)
 
void daceCreateFilled (DACEDA *ina, const double ckon)
 
void daceCreateConstant (DACEDA *ina, const double ckon)
 
void daceCreateRandom (DACEDA *ina, const double cm)
 
double daceGetConstant (const DACEDA *ina)
 
void daceGetLinear (const DACEDA *ina, double c[])
 
double daceGetCoefficient (const DACEDA *ina, const unsigned int jj[])
 
double daceGetCoefficient0 (const DACEDA *ina, const unsigned int ic)
 
void daceSetCoefficient (DACEDA *ina, const unsigned int jj[], const double cjj)
 
void daceSetCoefficient0 (DACEDA *ina, const unsigned int ic, const double cjj)
 
void daceGetCoefficientAt (const DACEDA *ina, const unsigned int npos, unsigned int jj[], double *cjj)
 
unsigned int daceGetLength (const DACEDA *ina)
 
void daceCopy (const DACEDA *ina, DACEDA *inb)
 
void daceCopyFiltering (const DACEDA *ina, DACEDA *inb)
 
void daceTrim (const DACEDA *ina, const unsigned int imin, const unsigned int imax, DACEDA *inc)
 
void daceFilter (const DACEDA *ina, DACEDA *inb, const DACEDA *inc)
 
unsigned int daceIsNan (const DACEDA *ina)
 
unsigned int daceIsInf (const DACEDA *ina)
 
void dacesize (const DACEDA *ina, unsigned int *size)
 
void dacepek (const DACEDA *ina, const unsigned int jj[], double *cjj)
 
void daceabs (const DACEDA *ina, double *anorm)
 
void dacenorm (const DACEDA *ina, const unsigned int ityp, double *anorm)
 
void dacetree (const DACEDA das[], const unsigned int count, double ac[], unsigned int *nterm, unsigned int *nvar, unsigned int *nord)
 
unsigned int daceGetError ()
 
unsigned int daceGetErrorX ()
 
unsigned int daceGetErrorYY ()
 
const char * daceGetErrorFunName ()
 
const char * daceGetErrorMSG ()
 
void daceClearError ()
 
void daceSetError (const char *c, const unsigned int ix, const unsigned int iyy)
 
double daceEvalMonomials (const DACEDA *ina, const DACEDA *inb)
 
void daceEvalVariable (const DACEDA *ina, const unsigned int nvar, const double val, DACEDA *inc)
 
void daceReplaceVariable (const DACEDA *ina, const unsigned int from, const unsigned int to, const double val, DACEDA *inc)
 
void daceScaleVariable (const DACEDA *ina, const unsigned int nvar, const double val, DACEDA *inc)
 
void daceTranslateVariable (const DACEDA *ina, const unsigned int nvar, const double a, const double c, DACEDA *inc)
 
void daceEvalTree (const DACEDA *das[], const unsigned int count, double ac[], unsigned int *nterm, unsigned int *nvar, unsigned int *nord)
 
void daceInitialize (unsigned int no, unsigned int nv)
 
void daceInitializeThread ()
 
void daceCleanupThread ()
 
void daceInitializeThread0 ()
 
void daceGetVersion (int *imaj, int *imin, int *ipat)
 
double daceSetEpsilon (const double eps)
 
double daceGetEpsilon ()
 
double daceGetMachineEpsilon ()
 
unsigned int daceGetMaxOrder ()
 
unsigned int daceGetMaxVariables ()
 
unsigned int daceGetMaxMonomials ()
 
unsigned int daceGetTruncationOrder ()
 
unsigned int daceSetTruncationOrder (const unsigned int fnot)
 
void daceWrite (const DACEDA *ina, char *strs, unsigned int *nstrs)
 
void daceRead (DACEDA *ina, char *strs, unsigned int nstrs)
 
void dacePrint (const DACEDA *ina)
 
unsigned int daceExportBlob (const DACEDA *ina, void *blob, unsigned int *size)
 
unsigned int daceBlobSize (const void *blob)
 
void daceImportBlob (const void *blob, DACEDA *inc)
 
void daceAdd (const DACEDA *ina, const DACEDA *inb, DACEDA *inc)
 
void daceSubtract (const DACEDA *ina, const DACEDA *inb, DACEDA *inc)
 
void daceMultiply (const DACEDA *ina, const DACEDA *inb, DACEDA *inc)
 
void daceMultiplyMonomials (const DACEDA *ina, const DACEDA *inb, DACEDA *inc)
 
void daceDivide (const DACEDA *ina, const DACEDA *inb, DACEDA *inc)
 
void daceSquare (const DACEDA *ina, DACEDA *inb)
 
void daceAddDouble (const DACEDA *ina, const double ckon, DACEDA *inb)
 
void daceDoubleSubtract (const DACEDA *ina, const double ckon, DACEDA *inb)
 
void daceSubtractDouble (const DACEDA *ina, const double ckon, DACEDA *inb)
 
void daceMultiplyDouble (const DACEDA *ina, const double ckon, DACEDA *inb)
 
void daceDivideDouble (const DACEDA *ina, const double ckon, DACEDA *inb)
 
void daceDoubleDivide (const DACEDA *ina, const double ckon, DACEDA *inc)
 
void daceDivideByVariable (const DACEDA *ina, const unsigned int var, const unsigned int p, DACEDA *inc)
 
void daceDifferentiate (const unsigned int idif, const DACEDA *ina, DACEDA *inc)
 
void daceIntegrate (const unsigned int iint, const DACEDA *ina, DACEDA *inc)
 
void daceTruncate (const DACEDA *ina, DACEDA *inc)
 
void daceRound (const DACEDA *ina, DACEDA *inc)
 
void daceModulo (const DACEDA *ina, const double p, DACEDA *inc)
 
void dacePowerDouble (const DACEDA *ina, const double p, DACEDA *inc)
 
void dacePower (const DACEDA *ina, const int np, DACEDA *inc)
 
void daceRoot (const DACEDA *ina, const int np, DACEDA *inc)
 
void daceMultiplicativeInverse (const DACEDA *ina, DACEDA *inc)
 
void daceMultiplicativeInverse0 (const DACEDA *ina, DACEDA *inc, const double a0)
 
void daceSquareRoot (const DACEDA *ina, DACEDA *inc)
 
void daceInverseSquareRoot (const DACEDA *ina, DACEDA *inc)
 
void daceCubicRoot (const DACEDA *ina, DACEDA *inc)
 
void daceInverseCubicRoot (const DACEDA *ina, DACEDA *inc)
 
void daceHypotenuse (const DACEDA *ina, const DACEDA *inb, DACEDA *inc)
 
void daceExponential (const DACEDA *ina, DACEDA *inc)
 
void daceLogarithm (const DACEDA *ina, DACEDA *inc)
 
void daceLogarithmBase (const DACEDA *ina, const double b, DACEDA *inc)
 
void daceLogarithm10 (const DACEDA *ina, DACEDA *inc)
 
void daceLogarithm2 (const DACEDA *ina, DACEDA *inc)
 
void daceSine (const DACEDA *ina, DACEDA *inc)
 
void daceCosine (const DACEDA *ina, DACEDA *inc)
 
void daceTangent (const DACEDA *ina, DACEDA *inc)
 
void daceArcSine (const DACEDA *ina, DACEDA *inc)
 
void daceArcCosine (const DACEDA *ina, DACEDA *inc)
 
void daceArcTangent (const DACEDA *ina, DACEDA *inc)
 
void daceArcTangent2 (const DACEDA *ina, const DACEDA *inb, DACEDA *inc)
 
void daceHyperbolicSine (const DACEDA *ina, DACEDA *inc)
 
void daceHyperbolicCosine (const DACEDA *ina, DACEDA *inc)
 
void daceHyperbolicTangent (const DACEDA *ina, DACEDA *inc)
 
void daceHyperbolicArcSine (const DACEDA *ina, DACEDA *inc)
 
void daceHyperbolicArcCosine (const DACEDA *ina, DACEDA *inc)
 
void daceHyperbolicArcTangent (const DACEDA *ina, DACEDA *inc)
 
void daceErrorFunction (const DACEDA *ina, DACEDA *inc)
 
void daceComplementaryErrorFunction (const DACEDA *ina, DACEDA *inc)
 
void daceBesselIFunction (const DACEDA *ina, const int n, const bool scaled, DACEDA *inc)
 
void daceBesselKFunction (const DACEDA *ina, const int n, const bool scaled, DACEDA *inc)
 
void daceBesselJFunction (const DACEDA *ina, const int n, DACEDA *inc)
 
void daceBesselYFunction (const DACEDA *ina, const int n, DACEDA *inc)
 
void daceEvaluateBesselFunction (const DACEDA *ina, const double bz[], const double type, const double ktype, DACEDA *inc)
 
void daceEvaluateScaledModifiedBesselFunction (const DACEDA *ina, const double bz[], const double ktype, DACEDA *inc)
 
void daceLogGammaFunction0 (const DACEDA *ina, const double a0, DACEDA *inc)
 
void daceLogGammaFunction (const DACEDA *ina, DACEDA *inc)
 
void daceGammaFunction (const DACEDA *ina, DACEDA *inc)
 
void dacePsiFunction (const DACEDA *ina, const unsigned int n, DACEDA *inc)
 
void daceEvaluateSeries (const DACEDA *ina, const double xf[], DACEDA *inc)
 
void daceWeightedSum (const DACEDA *ina, const double afac, const DACEDA *inb, const double bfac, DACEDA *inc)
 
void daceReallocateMemory (const unsigned int nvar, const unsigned int nmem)
 
void daceAllocateDA (DACEDA *inc, const unsigned int len)
 
void daceFreeDA (DACEDA *inc)
 
void daceInvalidateDA (DACEDA *inc)
 
void daceMemoryDump ()
 
void daceVariableInformation (const DACEDA *inc, monomial **ipoc, unsigned int *ilmc, unsigned int *illc)
 
void daceSetLength (DACEDA *inc, const size_t len)
 
bool daceIsSameObject (const DACEDA *ina, const DACEDA *inb)
 
void daceFreeMemory ()
 
double daceAbsoluteValue (const DACEDA *ina)
 
double daceNorm (const DACEDA *ina, const unsigned int ityp)
 
void daceOrderedNorm (const DACEDA *ina, const unsigned int ivar, const unsigned int ityp, double onorm[])
 
void daceEstimate (const DACEDA *ina, const unsigned int ivar, const unsigned int ityp, double c[], double err[], const unsigned int nc)
 
void daceGetBounds (const DACEDA *ina, double *alo, double *aup)
 
DACE_API void dacepek (const DACEDA REF(ina), const unsigned int jj[], double REF(cjj))
 
DACE_API void dacesize (const DACEDA REF(ina), unsigned int REF(size))
 
DACE_API void daceabs (const DACEDA REF(ina), double REF(anorm))
 
DACE_API void dacenorm (const DACEDA REF(ina), const unsigned int ityp, double REF(anorm))
 
DACE_API void dacetree (const DACEDA das[], const unsigned int count, double ac[], unsigned int REF(nterm), unsigned int REF(nvar), unsigned int REF(nord))
 

Variables

dacecom DACECom = { 0 }
 
DACE_THREAD_LOCAL dacecom_t DACECom_t = { 0 }
 
DACE_THREAD_LOCAL dacedbg DACEDbg = { 0 }
 
dacecom DACECom
 
DACE_THREAD_LOCAL dacecom_t DACECom_t
 
DACE_THREAD_LOCAL dacedbg DACEDbg
 
DACE_API const errstrings DACEerr []
 Variable containing all errors strings and codes. More...
 

Detailed Description

Macro Definition Documentation

◆ __STDC_WANT_LIB_EXT1__

#define __STDC_WANT_LIB_EXT1__   1

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

◆ ARG

#define ARG (   x)    &(x)

◆ DACE_API

#define DACE_API

◆ DACE_BINARY_MAGIC

#define DACE_BINARY_MAGIC   (0x1E304144)

◆ DACE_ERROR

#define DACE_ERROR   6

◆ DACE_INFO

#define DACE_INFO   1

◆ DACE_PANIC

#define DACE_PANIC   10

◆ DACE_SEVERE

#define DACE_SEVERE   9

◆ DACE_STRLEN

#define DACE_STRLEN   (140)

◆ DACE_WARNING

#define DACE_WARNING   3

◆ daceacos

#define daceacos (   ina,
  inc 
)    daceArcCosine(ARG(ina), ARG(inc))

◆ daceacosh

#define daceacosh (   ina,
  inc 
)    daceHyperbolicArcCosine(ARG(ina), ARG(inc))

◆ daceadd

#define daceadd (   ina,
  inb,
  inc 
)    daceAdd(ARG(ina), ARG(inb), ARG(inc))

◆ daceall

#define daceall (   inc,
  len 
)    daceAllocateDA(inc, len)

◆ daceasin

#define daceasin (   ina,
  inc 
)    daceArcSine(ARG(ina), ARG(inc))

◆ daceasinh

#define daceasinh (   ina,
  inc 
)    daceHyperbolicArcSine(ARG(ina), ARG(inc))

◆ daceatan

#define daceatan (   ina,
  inc 
)    daceArcTangent(ARG(ina), ARG(inc))

◆ daceatan2

#define daceatan2 (   ina,
  inb,
  inc 
)    daceArcTangent2(ARG(ina), ARG(inb), ARG(inc))

◆ daceatanh

#define daceatanh (   ina,
  inc 
)    daceHyperbolicArcTangent(ARG(ina), ARG(inc))

◆ dacebound

#define dacebound (   ina,
  alo,
  aup 
)    daceGetBounds(ARG(ina), alo, aup)

◆ dacecadd

#define dacecadd (   ina,
  ckon,
  inb 
)    daceAddDouble(ARG(ina), ckon, ARG(inb))

◆ dacecdiv

#define dacecdiv (   ina,
  ckon,
  inb 
)    daceDoubleDivide(ARG(ina), ckon, ARG(inb))

◆ daceclrerr

#define daceclrerr ( )    daceClearError()

◆ dacecmul

#define dacecmul (   ina,
  ckon,
  inb 
)    daceMultiplyDouble(ARG(ina), ckon, ARG(inb))

◆ dacecoef

#define dacecoef (   ina,
  jj,
  ckon 
)    daceCreateMonomial(ARG(ina), jj, ckon)

◆ dacecon

#define dacecon (   ina,
  ckon 
)    daceCreateConstant(ARG(ina), ckon)

◆ daceconst

#define daceconst (   ina)    daceGetConstant(ARG(ina))

◆ dacecop

#define dacecop (   ina,
  inb 
)    daceCopy(ARG(ina), ARG(inb))

◆ dacecos

#define dacecos (   ina,
  inc 
)    daceCosine(ARG(ina), ARG(inc))

◆ dacecosh

#define dacecosh (   ina,
  inc 
)    daceHyperbolicCosine(ARG(ina), ARG(inc))

◆ dacecsub

#define dacecsub (   ina,
  ckon,
  inb 
)    daceDoubleSubtract(ARG(ina), ckon, ARG(inb))

◆ dacedal

#define dacedal (   inc)    daceFreeDA(ARG(inc))

◆ daceder

#define daceder (   idif,
  ina,
  inc 
)    daceDifferentiate(idif, ARG(ina), ARG(inc))

◆ dacediv

#define dacediv (   ina,
  inb,
  inc 
)    daceDivide(ARG(ina), ARG(inb), ARG(inc))

◆ dacedivc

#define dacedivc (   ina,
  ckon,
  inb 
)    daceDivideDouble(ARG(ina), ckon, ARG(inb))

◆ daceest

#define daceest (   ina,
  ivar,
  ityp,
  c,
  nc 
)    daceEstimate(ARG(ina), ivar, ityp, c, NULL, nc)

◆ daceexp

#define daceexp (   ina,
  inc 
)    daceExponential(ARG(ina), ARG(inc))

◆ dacegeteps

#define dacegeteps ( )    daceGetEpsilon()

◆ dacegetepsmac

#define dacegetepsmac ( )    daceGetMachineEpsilon()

◆ dacegetnmmax

#define dacegetnmmax ( )    daceGetMaxMonomials()

◆ dacegetnomax

#define dacegetnomax ( )    daceGetMaxOrder()

◆ dacegetnot

#define dacegetnot ( )    daceGetTruncationOrder()

◆ dacegetnvmax

#define dacegetnvmax ( )    daceGetMaxVariables()

◆ dacegetxerr

#define dacegetxerr ( )    daceGetErrorX()

◆ dacegetyyerr

#define dacegetyyerr ( )    daceGetErrorYY()

◆ daceini

#define daceini (   no,
  nv 
)    daceInitialize(no, nv)

◆ daceint

#define daceint (   iint,
  ina,
  inc 
)    daceIntegrate(iint, ARG(ina), ARG(inc))

◆ daceisrt

#define daceisrt (   ina,
  inc 
)    daceInverseSquareRoot(ARG(ina), ARG(inc))

◆ dacelinear

#define dacelinear (   ina,
 
)    daceGetLinear(ARG(ina), c)

◆ dacelist

#define dacelist (   ina,
  npos,
  jj,
  cjj 
)    daceGetCoefficientAt(ARG(ina), npos, jj, cjj)

◆ dacelog

#define dacelog (   ina,
  inc 
)    daceLogarithm(ARG(ina), ARG(inc))

◆ dacelogb

#define dacelogb (   ina,
  b,
  inc 
)    daceLogarithmBase(ARG(ina), b, ARG(inc))

◆ dacememdump

#define dacememdump (   iunit)    daceMemoryDump()

◆ daceminv

#define daceminv (   ina,
  inc 
)    daceMultiplicativeInverse(ARG(ina), ARG(inc))

◆ dacemod

#define dacemod (   ina,
  p,
  inc 
)    daceModulo(ARG(ina), p, ARG(inc))

◆ dacemul

#define dacemul (   ina,
  inb,
  inc 
)    daceMultiply(ARG(ina), ARG(inb), ARG(inc))

◆ daceonorm

#define daceonorm (   ina,
  ivar,
  ityp,
  onorm 
)    daceOrderedNorm(ARG(ina), ivar, ityp, onorm)

◆ daceplug

#define daceplug (   ina,
  nvar,
  val,
  inc 
)    daceEvalVariable(ARG(ina), nvar, val, ARG(inc))

◆ dacepok

#define dacepok (   ina,
  jj,
  cjj 
)    daceSetCoefficient(ARG(ina), jj, cjj)

◆ dacepow

#define dacepow (   ina,
  np,
  inc 
)    dacePower(ARG(ina), np, ARG(inc))

◆ daceran

#define daceran (   ina,
  cm 
)    daceCreateRandom(ARG(ina), cm)

◆ daceread

#define daceread (   ina,
  strs,
  nstrs 
)    daceRead(ARG(ina), strs, nstrs)

◆ daceroot

#define daceroot (   ina,
  np,
  inc 
)    daceRoot(ARG(ina), np, ARG(inc))

◆ daceround

#define daceround (   ina,
  inc 
)    daceRound(ARG(ina), ARG(inc))

◆ daceseteps

#define daceseteps (   deps)    daceSetEpsilon(deps)

◆ dacesetnot

#define dacesetnot (   fnot)    daceSetTruncationOrder(fnot)

◆ dacesin

#define dacesin (   ina,
  inc 
)    daceSine(ARG(ina), ARG(inc))

◆ dacesinh

#define dacesinh (   ina,
  inc 
)    daceHyperbolicSine(ARG(ina), ARG(inc))

◆ dacesqr

#define dacesqr (   ina,
  inb 
)    daceSquare(ARG(ina), ARG(inb))

◆ dacesqrt

#define dacesqrt (   ina,
  inc 
)    daceSquareRoot(ARG(ina), ARG(inc))

◆ dacesub

#define dacesub (   ina,
  inb,
  inc 
)    daceSubtract(ARG(ina), ARG(inb), ARG(inc))

◆ dacesubc

#define dacesubc (   ina,
  ckon,
  inb 
)    daceSubtractDouble(ARG(ina), ckon, ARG(inb))

◆ dacetan

#define dacetan (   ina,
  inc 
)    daceTangent(ARG(ina), ARG(inc))

◆ dacetanh

#define dacetanh (   ina,
  inc 
)    daceHyperbolicTangent(ARG(ina), ARG(inc))

◆ dacetrim

#define dacetrim (   ina,
  imin,
  imax,
  inc 
)    daceTrim(ARG(ina), imin, imax, ARG(inc))

◆ dacetrunc

#define dacetrunc (   ina,
  inc 
)    daceTruncate(ARG(ina), ARG(inc))

◆ dacevar

#define dacevar (   ina,
  i,
  ckon 
)    daceCreateVariable(ARG(ina), i, ckon)

◆ dacever

#define dacever (   imaj,
  imin,
  icos 
)    daceGetVersion(imaj, imin, icos)

◆ dacewrite

#define dacewrite (   ina,
  strs,
  nstrs 
)    daceWrite(ARG(ina), strs, nstrs)

◆ ERROR_FUN_SIZE

#define ERROR_FUN_SIZE   64

◆ ERROR_MSG_SIZE

#define ERROR_MSG_SIZE   256

◆ LIKELY

#define LIKELY (   expr)    expr

◆ M_PI

#define M_PI   (3.14159265358979323846)

◆ M_PI_2

#define M_PI_2   (1.57079632679489661923)

◆ REF

#define REF (   x)    *(x)

◆ UNLIKELY

#define UNLIKELY (   expr)    expr

Typedef Documentation

◆ dacecom

typedef struct dcom dacecom

◆ dacecom_t

typedef struct dcom_t dacecom_t

◆ DACEDA

typedef int DACEDA

◆ dacedbg

typedef struct ddbg dacedbg

◆ dacemem

typedef struct dmem dacemem

◆ extended_monomial

◆ monomial

typedef struct dmonomial monomial

◆ variable

typedef struct dvariable variable

Function Documentation

◆ daceabs() [1/2]

void daceabs ( const DACEDA ina,
double *  anorm 
)

Compute absolute value of a DA object.

Parameters
[in]inaPointer to DA object to take absolute value of
[out]anormPointer where to store the absolute value
Deprecated:
Has been replaced by daceAbsoluteValue()
See also
daceAbsoluteValue()

◆ daceabs() [2/2]

DACE_API void daceabs ( const DACEDA   REFina,
double   REFanorm 
)

◆ daceAbsoluteValue()

double daceAbsoluteValue ( const DACEDA ina)

Compute the absolute value (maximum coefficient norm) of a DA object.

Parameters
[in]inaPointer to the DA object to take absolute value of
Returns
The absolute value of ina

◆ daceAdd()

void daceAdd ( const DACEDA ina,
const DACEDA inb,
DACEDA inc 
)

Perform addition of two DA objects.

Parameters
[in]inaPointer to the first DA object to operate on
[in]inbPointer to the first DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina or inb.

◆ daceAddDouble()

void daceAddDouble ( const DACEDA ina,
const double  ckon,
DACEDA inb 
)

Add constant to a DA object.

Parameters
[in]inaPointer to the first DA object to operate on
[in]ckonConstant value to add
[out]inbPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inb can be the same as ina.

◆ daceAllocateDA()

void daceAllocateDA ( DACEDA inc,
const unsigned int  len 
)

Allocate storage for a DA vector with memory length len.

Parameters
[out]incIndex of the newly created variable
[in]lenLength of the variable to allocate. If len = 0 the length is automatically determined to be large enough for any DA vector (i.e. len=nmmax).

◆ daceArcCosine()

void daceArcCosine ( const DACEDA ina,
DACEDA inc 
)

Compute the arccosine of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceArcSine()

void daceArcSine ( const DACEDA ina,
DACEDA inc 
)

Compute the arcsine of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceArcTangent()

void daceArcTangent ( const DACEDA ina,
DACEDA inc 
)

Compute the arctangent of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceArcTangent2()

void daceArcTangent2 ( const DACEDA ina,
const DACEDA inb,
DACEDA inc 
)

Arctangent of ina/inb with proper sign in [-pi, pi]. This function follows the C standard atan2(y,x) function syntax.

Parameters
[in]inaPointer to the first DA object to operate on
[in]inbPointer to the second DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceBesselIFunction()

void daceBesselIFunction ( const DACEDA ina,
const int  n,
const bool  scaled,
DACEDA inc 
)

Compute the modified Bessel function I_n of a DA object.

Parameters
[in]inaPointer to the DA object to operate on (constant part >= 0)
[in]nOrder of the Bessel function
[in]scaledIf true, the scaled Bessel function is computed (i.e. exp(-x)*I_n(x))
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceBesselJFunction()

void daceBesselJFunction ( const DACEDA ina,
const int  n,
DACEDA inc 
)

Compute the Bessel function J_n of a DA object.

Parameters
[in]inaPointer to the DA object to operate on (constant part >= 0)
[in]nOrder of the Bessel function
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceBesselKFunction()

void daceBesselKFunction ( const DACEDA ina,
const int  n,
const bool  scaled,
DACEDA inc 
)

Compute the modified Bessel function K_n of a DA object.

Parameters
[in]inaPointer to the DA object to operate on (constant part >= 0)
[in]nOrder of the Bessel function
[in]scaledIf true, the scaled Bessel function is computed (i.e. exp(x)*K_n(x))
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceBesselYFunction()

void daceBesselYFunction ( const DACEDA ina,
const int  n,
DACEDA inc 
)

Compute the Bessel function Y_n of a DA object.

Parameters
[in]inaPointer to the DA object to operate on (constant part >= 0)
[in]nOrder of the Bessel function
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceBlobSize()

unsigned int daceBlobSize ( const void *  blob)

Determine the total size (in byte) of a DACE blob.

Parameters
[in]blobPointer to memory where the data is stored
Note
If called with blob==NULL, the routine will return the minimum size of data that must be read in order to determine the total size. A user can therefore call this routine twice: first with NULL to determine the size of the blob header to read, and then a second time with the header to determine the size of the remaining data.
Returns
The total size (in bytes) of the DACE blob, or 0 on error (e.g. when the data pointed to by blob is not a DACE blob at all). If blob is NULL, the minimum size (in bytes) of a blob (i.e. the blob header size) is returned.

◆ daceCleanupThread()

void daceCleanupThread ( )

Clean up thread local data structures at the end of thread's life time.

Note
Each spawned thread (except for the main thread) should call daceCleanupThread before exitting to ensure any thread local memory is properly release. No DACE operations must be performed after calling daceCleanupThread.
See also
daceInitializeThread

◆ daceClearError()

void daceClearError ( )

Clear the error code.

◆ daceComplementaryErrorFunction()

void daceComplementaryErrorFunction ( const DACEDA ina,
DACEDA inc 
)

Compute the complementary error function of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceCopy()

void daceCopy ( const DACEDA ina,
DACEDA inb 
)

Copy content of one DA object into another DA object.

Parameters
[in]inaPointer to DA object to copy from
[in]inbPointer to DA object to copy to

◆ daceCopyFiltering()

void daceCopyFiltering ( const DACEDA ina,
DACEDA inb 
)

Copy content of one DA object into another DA object filtering out terms below a certain threshold.

Parameters
[in]inaPointer to DA object to copy from
[in]inbPointer to DA object to copy to
Note
This routine is slightly worse than non-filtering version (about 10%)

◆ daceCosine()

void daceCosine ( const DACEDA ina,
DACEDA inc 
)

Compute the cosine of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceCountMonomials()

unsigned int daceCountMonomials ( unsigned int  no,
unsigned int  nv 
)

Compute number of monomials of order no in nv variables.

Parameters
[in]noMaximum order of monomials
[in]nvNumber of variables in monomials
Returns
The total number of monomials

◆ daceCreateConstant()

void daceCreateConstant ( DACEDA ina,
const double  ckon 
)

Create a DA object with constant part equal to ckon.

Parameters
[in]inaPointer to DA object to store the resulting DA in
[in]ckoncoefficient of the constant part of the result

◆ daceCreateFilled()

void daceCreateFilled ( DACEDA ina,
const double  ckon 
)

Create a DA object with all coefficients set to the constant value ckon.

Parameters
[in]inaPointer to DA object to store the resulting DA in
[in]ckoncoefficient of the monomials

◆ daceCreateMonomial()

void daceCreateMonomial ( DACEDA ina,
const unsigned int  jj[],
const double  ckon 
)

Create a DA object to be ckon times the monomial given by the exponents in jj[].

Parameters
[in]inaPointer to DA object to store the resulting DA in
[in]jjC array with nvmax exponents indicating the monomial to create
[in]ckoncoefficient of the monomial created

◆ daceCreateRandom()

void daceCreateRandom ( DACEDA ina,
const double  cm 
)

Create a DA object with randomly filled coefficients.

Parameters
[in]inaPointer to DA object to store the resulting DA in
[in]cmThe filling factor between -1.0 and 1.0. The absolute value of the filling factor determines the fraction of non-zero coefficients. If cm is positive, the values are weighted by order such that the coefficients decay exponentially with the order from 1.0 towards the machine epsilon in the highest order. If cm is negative, all coefficients are chosen to be between -1.0 and 1.0.

◆ daceCreateVariable()

void daceCreateVariable ( DACEDA ina,
const unsigned int  i,
const double  ckon 
)

Create a DA object to be ckon times the i-th independen variable.

Parameters
[in]inaPointer to DA object to store the resulting DA in
[in]inumber of the independent variable to create
[in]ckoncoefficient of the independent DA variable created
Note
Independent DA variable indices are 1-based, i.e. the first independent variable is i=1. The case of i=0 corresponds to the constant part of the polynomial.

◆ daceCubicRoot()

void daceCubicRoot ( const DACEDA ina,
DACEDA inc 
)

Compute the cubic root of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceDecode()

void daceDecode ( const unsigned int  jc,
unsigned int  jj[] 
)

Decode the given DA coding integer as stored in monomial.ii into jj[].

Parameters
[in]jcDA coding integer as stored in monomial.ii to decode
[out]jjC array of nvmax exponents

◆ daceDecodeExponents()

unsigned int daceDecodeExponents ( unsigned int  ic,
const unsigned int  no,
const unsigned int  nv,
unsigned int  p[] 
)

Decode a single integer containing nv exponents of maximum order no into p[]

Parameters
[in]icEncoded integer to decode
[in]noMaximum computation order used for encoding. Must be strictly positive!
[in]nvNumber of exponents in p. May be zero, in which case zero is returned.
[out]pC array of nv exponents
Returns
The sum of the decoded exponents
Note
No checking is performed to see if this operation will overflow! This check is done in daceini.

◆ daceDifferentiate()

void daceDifferentiate ( const unsigned int  idif,
const DACEDA ina,
DACEDA inc 
)

Derivative of DA object with respect to a given independent variable.

Parameters
[in]idifNumber of the independent variable with respect to which the derivative is taken
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceDivide()

void daceDivide ( const DACEDA ina,
const DACEDA inb,
DACEDA inc 
)

Perform division of two DA objects.

Parameters
[in]inaPointer to the first DA object to operate on
[in]inbPointer to the first DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina or inb.

◆ daceDivideByVariable()

void daceDivideByVariable ( const DACEDA ina,
const unsigned int  var,
const unsigned int  p,
DACEDA inc 
)

Divide a DA vector by a single variable to some power, if possible.

Parameters
[in]inaPointer to the DA object to operate on
[in]varNumber of the independent variable by which to divide
[in]pPower of independent variable
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceDivideDouble()

void daceDivideDouble ( const DACEDA ina,
const double  ckon,
DACEDA inb 
)

Divide DA object by a constant.

Parameters
[in]inaPointer to the first DA object to operate on
[in]ckonConstant value to divide by
[out]inbPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inb can be the same as ina.

◆ daceDoubleDivide()

void daceDoubleDivide ( const DACEDA ina,
const double  ckon,
DACEDA inc 
)

Divide constant by DA object.

Parameters
[in]inaPointer to the first DA object to operate on
[in]ckonConstant value to divide
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceDoubleSubtract()

void daceDoubleSubtract ( const DACEDA ina,
const double  ckon,
DACEDA inb 
)

Subtract DA object from constant.

Parameters
[in]inaPointer to the first DA object to operate on
[in]ckonConstant value to subtract from
[out]inbPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inb can be the same as ina.

◆ daceEncode()

unsigned int daceEncode ( const unsigned int  jj[])

Encode the given exponents in jj[] into a DA coding integer as stored in monomial.ii.

Parameters
[in]jjC array of nvmax exponents to encode
Returns
The DA coding integer as stored in monomial.ii

◆ daceEncodeExponents()

unsigned int daceEncodeExponents ( const unsigned int  p[],
const unsigned int  no,
const unsigned int  nv 
)

Return a single integer containing all nv exponents in p[] with maximum order no

Parameters
[in]pC array of nv exponents
[in]noMaximum computation order used for encoding. Must be strictly positive!
[in]nvNumber of exponents in p. May be zero, in which case zero is returned.
Returns
The corresponding exponents combined in one integer
Note
No checking is performed to see if this operation will overflow! This check is done in daceini.

◆ daceErrorFunction()

void daceErrorFunction ( const DACEDA ina,
DACEDA inc 
)

Compute the error function of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceEstimate()

void daceEstimate ( const DACEDA ina,
const unsigned int  ivar,
const unsigned int  ityp,
double  c[],
double  err[],
const unsigned int  nc 
)

Estimate order sorted norms of DA object ina up to given order.

Parameters
[in]inaPointer to the DA object to take norm of
[in]ivarIndependent variable with respect to which to group. 0 = group by monomial order >1 = group by given independent variable
[in]itypType of norm to compute. 0 = max norm 1 = sum norm >1 = corresponding vector norm
[in]ncMaximum order to estimate
[out]cC array of length nc+1 containing the grouped estimates
[out]errC array of length min(nc, nomax)+1 containing the residuals of the exponential fit at each order. If NULL is passed in, no residuals are computed and returned.
Note
If estimation is not possible, zero is returned for all requested orders. In most cases this is actually not too far off.

◆ daceEvalMonomials()

double daceEvalMonomials ( const DACEDA ina,
const DACEDA inb 
)

Evaluate DA object ina by providing the value to use for each monomial in DA object inb. This is equivalent to a monomial-wise DA dot product.

Parameters
[in]inaPointer to first DA object to evaluate
[in]inbPointer to second DA object to provide monomial values
Returns
Monomial-wise dot product of both DA objects
See also
daceMultiplyMonomials()

◆ daceEvalTree()

void daceEvalTree ( const DACEDA das[],
const unsigned int  count,
double  ac[],
unsigned int *  nterm,
unsigned int *  nvar,
unsigned int *  nord 
)

Compute an evaluation tree to efficiently evaluate several DA objects.

Parameters
[in]dasC array of pointers to DA objects to evaluate
[in]countNumber of DA objects in das[]
[out]acC array of doubles containing compiled coefficients
[out]ntermPointer where to store the total number of terms in evaluation tree
[out]nvarPointer where to store the total number of variables in evaluation tree
[out]nordPointer where to store the maximum order in evaluation tree
See also
DACE::compiledDA
Note
See the C++ interface for a detailed description of the resulting data arrays from this routine.

◆ daceEvaluateBesselFunction()

void daceEvaluateBesselFunction ( const DACEDA ina,
const double  bz[],
const double  type,
const double  ktype,
DACEDA inc 
)

Evaluate a Bessel function with coefficients bz with the non-constant part of ina.

Parameters
[in]inaPointer to the DA object to operate on
[in]bzC array of 2*nocut+1 elements containing Bessel functions of orders n-nocut, ..., n+nocut
[in]typeEither -1.0 for normal Bessel functions, or +1.0 for modified Bessel functions.
[in]ktypeEither -1.0 for modified Bessel K function, or +1.0 for all other Bessel functions.
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceEvaluateScaledModifiedBesselFunction()

void daceEvaluateScaledModifiedBesselFunction ( const DACEDA ina,
const double  bz[],
const double  ktype,
DACEDA inc 
)

Evaluate a scaled modified Bessel function with coefficients bz with the non-constant part of ina.

Parameters
[in]inaPointer to the DA object to operate on
[in]bzC array of 2*nocut+1 elements containing modified Bessel functions of orders n-nocut, ..., n+nocut
[in]ktypeEither -1.0 for scaled Bessel K function, or +1.0 for scaled Bessel I function
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceEvaluateSeries()

void daceEvaluateSeries ( const DACEDA ina,
const double  xf[],
DACEDA inc 
)

Evaluate a polynomial with coefficients xf with the non-constant part of ina.

Parameters
[in]inaPointer to the DA object to operate on
[in]xfC array of nocut+1 elements containing the coefficients of the polynomial
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceEvalVariable()

void daceEvalVariable ( const DACEDA ina,
const unsigned int  nvar,
const double  val,
DACEDA inc 
)

Perform partial evaluation of DA object ina by replacing independent variable number nvar by the value val.

Parameters
[in]inaPointer to DA object to evaluate
[in]nvarNumber of the independent variable to replace (one-based)
[in]valValue to replace independent variable with
[out]incPointer to DA object to store the result of the partial evaluation

◆ daceExponential()

void daceExponential ( const DACEDA ina,
DACEDA inc 
)

Compute the exponential of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceExportBlob()

unsigned int daceExportBlob ( const DACEDA ina,
void *  blob,
unsigned int *  size 
)

Export a DA object in a binary format. The binary data is not supposed to be modified and its format is considered internal to the DACE. It is guaranteed that a binary representation can be read back into a DA object even with differently initialized settings.

Parameters
[in]inaThe DA object to export
[in,out]blobPointer to memory where to store the data
[in,out]sizeOn input contains the size (in bytes) of the memory pointed to by blob. On output contains the actual amount of memory used.
Returns
Returns 0 is the entire DA object was exported successfully or the number of truncated monomials if the object was truncated.
Note
If blob is NULL, the value returned in size is the size (in bytes) of the memory needed to store the entire DA object.

◆ daceFilter()

void daceFilter ( const DACEDA ina,
DACEDA inb,
const DACEDA inc 
)

Copy monomials from a DA object ina to DA object inb if the same monomial is non-zero in DA object inc, while filtering out terms below the current cutoff.

Parameters
[in]inaPointer to DA object to filter
[in]inbPointer to DA object to store the filtered result in
[in]incPointer to DA object providing the filter template

◆ daceFreeDA()

void daceFreeDA ( DACEDA inc)

Deallocate DA vector inc.

Parameters
[in]incIndex of the DA variable to free

◆ daceFreeMemory()

void daceFreeMemory ( )

Free the entire DACE memory and purge all DA objects that may have been allocated before.

◆ daceGammaFunction()

void daceGammaFunction ( const DACEDA ina,
DACEDA inc 
)

Compute the Gamma function of a DA object.

Parameters
[in]inaPointer to the DA object to operate on (constant part != 0, -1, -2, ...)
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceGetBounds()

void daceGetBounds ( const DACEDA ina,
double *  alo,
double *  aup 
)

Compute an upper and lower bound of DA object ina over the domain [-1,1]^n.

Parameters
[in]inaPointer to the DA object to bound
[out]aloPointer where to store the lower bound
[out]aupPointer where to store the upper bound

◆ daceGetCoefficient()

double daceGetCoefficient ( const DACEDA ina,
const unsigned int  jj[] 
)

Extract coefficient of a monomial in a DA object.

Parameters
[in]inaPointer to DA object to extract monomial coefficient from
[in]jjC array of nvmax exponents identifying the monomial
Returns
The coefficient of the given monomial in the DA object

◆ daceGetCoefficient0()

double daceGetCoefficient0 ( const DACEDA ina,
const unsigned int  ic 
)

Extract coefficient of a monomial in a DA object.

Parameters
[in]inaPointer to DA object to extract monomial coefficient from
[in]icDA coding integer of the monomial to extract
Returns
The coefficient of the given monomial in the DA object

◆ daceGetCoefficientAt()

void daceGetCoefficientAt ( const DACEDA ina,
const unsigned int  npos,
unsigned int  jj[],
double *  cjj 
)

Extract coefficient at position npos (starting with 1) in the list of non-zero coefficients in the DA object and return its exponents and coefficient. If the monomial does not exist, the value 0.0 is returned.

Parameters
[in]inaPointer to DA object to extract monomial from
[in]nposIndex of the monomial to extract
[out]jjC array of nvmax elements for returning the exponents of the monomial
[out]cjjPointer where to store the value of the coefficient of the monomial

◆ daceGetConstant()

double daceGetConstant ( const DACEDA ina)

Extract the constant part from a DA object.

Parameters
[in]inaPointer to DA object to extract constant part from
Returns
Constant part of the given DA object

◆ daceGetEpsilon()

double daceGetEpsilon ( )

Get the cutoff value eps.

Returns
The current value of the cutoff
See also
daceSetEpsilon

◆ daceGetError()

unsigned int daceGetError ( )

Return the current error XYY code.

Returns
The error code in XYY form
See also
daceerror.h

◆ daceGetErrorFunName()

const char* daceGetErrorFunName ( )

Return the function name of current generated error.

Returns
The function name originating the error.

◆ daceGetErrorMSG()

const char* daceGetErrorMSG ( )

Return the current error message.

Returns
The current error message string
See also
daceerror.h

◆ daceGetErrorX()

unsigned int daceGetErrorX ( )

Return the current error X code.

Returns
The X error code X
See also
daceerror.h

◆ daceGetErrorYY()

unsigned int daceGetErrorYY ( )

Return the current error YY code.

Returns
The YY error code
See also
daceerror.h

◆ daceGetLength()

unsigned int daceGetLength ( const DACEDA ina)

Return the number of non-zero monomials in a DA object.

Parameters
[in]inaPointer to DA object to get length of
Returns
Number of non-zero monomials

◆ daceGetLinear()

void daceGetLinear ( const DACEDA ina,
double  c[] 
)

Extract the linear part of a DA object.

Parameters
[in]inaPointer to DA object to extract linear part from
[in]cC array of length nvmax containing the linear coefficients in order

◆ daceGetMachineEpsilon()

double daceGetMachineEpsilon ( )

Get machine epsilon value.

Returns
The experimentally determined machine epsilon

◆ daceGetMaxMonomials()

unsigned int daceGetMaxMonomials ( )

Get the maximum number of monomials for the current setup.

Returns
The maximum number of monomials
See also
daceInitialize

◆ daceGetMaxOrder()

unsigned int daceGetMaxOrder ( )

Get the maximum computation order set in the initialization routine.

Returns
The maximum computation order
See also
daceInitialize

◆ daceGetMaxVariables()

unsigned int daceGetMaxVariables ( )

Get the maximum number of variables set in the initialization routine.

Returns
The maximum number of variables
See also
daceInitialize

◆ daceGetTruncationOrder()

unsigned int daceGetTruncationOrder ( )

Get the current truncation order set for computations.

Returns
The current truncation order
See also
daceSetTruncationOrder

◆ daceGetVersion()

void daceGetVersion ( int *  imaj,
int *  imin,
int *  ipat 
)

This subroutine returns the major and minor version number of the DACE. These values can be checked by the interface to ensure compatibility.

Parameters
[out]imajMajor version number
[out]iminMinor version number
[out]ipatPatch version number

◆ daceHyperbolicArcCosine()

void daceHyperbolicArcCosine ( const DACEDA ina,
DACEDA inc 
)

Compute the hyperbolic arccosine of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceHyperbolicArcSine()

void daceHyperbolicArcSine ( const DACEDA ina,
DACEDA inc 
)

Compute the hyperbolic arcsince of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceHyperbolicArcTangent()

void daceHyperbolicArcTangent ( const DACEDA ina,
DACEDA inc 
)

Compute the hyperbolic arctangent of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceHyperbolicCosine()

void daceHyperbolicCosine ( const DACEDA ina,
DACEDA inc 
)

Compute the hyperbolic cosine of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceHyperbolicSine()

void daceHyperbolicSine ( const DACEDA ina,
DACEDA inc 
)

Compute the hyperbolic sine of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceHyperbolicTangent()

void daceHyperbolicTangent ( const DACEDA ina,
DACEDA inc 
)

Compute the hyperbolic tangent of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceHypotenuse()

void daceHypotenuse ( const DACEDA ina,
const DACEDA inb,
DACEDA inc 
)

Compute the hypothenuse of two DA objects.

Parameters
[in]inaPointer to the first DA object to operate on
[in]inbPointer to the second DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina or inb.

◆ daceImportBlob()

void daceImportBlob ( const void *  blob,
DACEDA inc 
)

Import a DA object in a binary format.

Parameters
[in]blobPointer to memory where the data is stored
[in]incThe DA object to import into
Note
This routine will silently truncate orders above the currently set maximum computation order as well as any extra variables present.

◆ daceInitialize()

void daceInitialize ( unsigned int  no,
unsigned int  nv 
)

Set up the ordering and addressing arrays in the common data structure and initialize DA memory.

Note
MUST BE CALLED BEFORE ANY OTHER DA ROUTINE CAN BE USED.
Also initializes the truncation order to the maximum computation order and disables the DA epsilon cutoff by setting it to 0.0.
Parameters
[in]noorder of the Taylor polynomials;
[in]nvnumber of variables considered.
See also
daceTruncationOrder
daceSetEpsilon

◆ daceInitializeThread()

void daceInitializeThread ( )

Set up thread local data structures at the beginning of a new thread.

Note
The main thread must call daceInitialize once before spawning new threads. All spawned threads must then call daceInitializeThread to initialize the thread before performing any other operations.
daceInitialize MUST NOT be called again by any thread while other threads are active.
Also initializes the truncation order to the maximum computation order and disables the DA epsilon cutoff by setting it to 0.0.
See also
daceInitialize
daceTruncationOrder
daceSetEpsilon

◆ daceInitializeThread0()

void daceInitializeThread0 ( )

Set up thread local data structures without resetting error. Also initializes the truncation order to the maximum computation order and disables the DA epsilon cutoff by setting it to 0.0.

◆ daceIntegrate()

void daceIntegrate ( const unsigned int  iint,
const DACEDA ina,
DACEDA inc 
)

Integral of DA object with respect to a given independent variable.

Parameters
[in]iintNumber of the independent variable with respect to which the integral is taken
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceInvalidateDA()

void daceInvalidateDA ( DACEDA inc)

Invalidate DA vector inc without deallocating associated memory.

Parameters
[in]incIndex of the DA variable to invalidate

◆ daceInverseCubicRoot()

void daceInverseCubicRoot ( const DACEDA ina,
DACEDA inc 
)

Compute the inverse cubic root of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceInverseSquareRoot()

void daceInverseSquareRoot ( const DACEDA ina,
DACEDA inc 
)

Compute the inverse square root of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceIsInf()

unsigned int daceIsInf ( const DACEDA ina)

Check each coefficient of DA object ina to see if any of them are INF (infinity).

Parameters
[in]inaPointer to DA object to check
Returns
True (non-zero) if any of the coefficients of ina is INF

◆ daceIsNan()

unsigned int daceIsNan ( const DACEDA ina)

Check each coefficient of DA object ina to see if any of them are NANs (not a number).

Parameters
[in]inaPointer to DA object to check
Returns
True (non-zero) if any of the coefficients of ina is NAN

◆ daceIsSameObject()

bool daceIsSameObject ( const DACEDA ina,
const DACEDA inb 
)

Compare if two DACE DA objects refer to the same underlying memory (i.e. are the same object).

Parameters
[in]inaThe first DACE DA object
[in]inbThe second DACE DA object
Returns
returns true if the two objects are the same, false otherwise

◆ daceLogarithm()

void daceLogarithm ( const DACEDA ina,
DACEDA inc 
)

Compute the natural logarithm root of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceLogarithm10()

void daceLogarithm10 ( const DACEDA ina,
DACEDA inc 
)

Compute the decadic logarithm of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceLogarithm2()

void daceLogarithm2 ( const DACEDA ina,
DACEDA inc 
)

Compute the binary logarithm of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceLogarithmBase()

void daceLogarithmBase ( const DACEDA ina,
const double  b,
DACEDA inc 
)

Compute the logarithm with respect to base b of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[in]bBase of the logarithm to use
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceLogGammaFunction()

void daceLogGammaFunction ( const DACEDA ina,
DACEDA inc 
)

Compute the Logarithmic Gamma function of a DA object.

Parameters
[in]inaPointer to the DA object to operate on (constant part != 0, -1, -2, ...)
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceLogGammaFunction0()

void daceLogGammaFunction0 ( const DACEDA ina,
const double  a0,
DACEDA inc 
)

Compute the partial Logarithmic Gamma function of a DA object (without constant part).

Parameters
[in]inaPointer to the DA object to operate on
[in]a0Constant part
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.
No argument checking is performed to ensure values are within allowable range.

◆ daceMemoryDump()

void daceMemoryDump ( )

Dump information about the current memory management status to stdout.

◆ daceModulo()

void daceModulo ( const DACEDA ina,
const double  p,
DACEDA inc 
)

Modulo the constant part of a DA object by p.

Parameters
[in]inaPointer to the DA object to operate on
[in]pValue with respect to which to compute the modulo
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceMultiplicativeInverse()

void daceMultiplicativeInverse ( const DACEDA ina,
DACEDA inc 
)

Compute the multiplicative inverse of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceMultiplicativeInverse0()

void daceMultiplicativeInverse0 ( const DACEDA ina,
DACEDA inc,
const double  a0 
)

Compute the multiplicative inverse of a DA object using series expansion.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
[in]a0Constant part of ina
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceMultiply()

void daceMultiply ( const DACEDA ina,
const DACEDA inb,
DACEDA inc 
)

Perform multiplication of two DA objects.

Parameters
[in]inaPointer to the first DA object to operate on
[in]inbPointer to the first DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina or inb.

◆ daceMultiplyDouble()

void daceMultiplyDouble ( const DACEDA ina,
const double  ckon,
DACEDA inb 
)

Multiply constant and DA object.

Parameters
[in]inaPointer to the first DA object to operate on
[in]ckonConstant value to multiply by
[out]inbPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inb can be the same as ina.

◆ daceMultiplyMonomials()

void daceMultiplyMonomials ( const DACEDA ina,
const DACEDA inb,
DACEDA inc 
)

Multiply two DA vectors component-wise, i.e. each monomial of ina with the corresponding monomial of inb

Parameters
[in]inaPointer to the first DA object to operate on
[in]inbPointer to the first DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina or inb.
See also
daceEvalMonomials

◆ daceNextMonomial()

unsigned int daceNextMonomial ( unsigned int  p[],
const unsigned int  no,
const unsigned int  nv 
)

Enumerate all monomials with nv variables and up to maximum order no in p. The sequence of monomials is deterministic but NOT sorted by order. It depends on both nv and no.

Parameters
[out]pC array of nv exponents
[in]noMaximum order of monomials being enumerated
[in]nvNumber of exponents in p
Returns
The order of the next monomial returned in p[]
Note
When called first, p[] should be all zeros (i.e. the constant or zeroth order monomial). Then call it repeatedly with the previous state of p[] and it will put the next monomial in p[] as well as return the order of that monomial.
When there are no more monomials left, the funcion will cycle back to the constant monomial of order zero.
This function handles the cases nv=0 and no=0 correctly (i.e. returning 0)

◆ daceNextOrderedMonomial()

unsigned int daceNextOrderedMonomial ( unsigned int  p[],
const unsigned int  no,
const unsigned int  nv 
)

Enumerate all monomials with nv variables and up to maximum order no in p. The sequence of monomials is sorted by order, i.e. first all first order monomials are returned, then all second order and so on.

Parameters
[out]pC array of nv exponents
[in]noMaximum order of monomials being enumerated
[in]nvNumber of exponents in p
Returns
The order of the next monomial returned in p[]
Note
When called first, p[] should be all zeros (i.e. the constant or zeroth order monomial). Then call it repeatedly with the previous state of p[] and it will put the next monomial in p[] as well as return the order of that monomial.
When there are no more monomials left, the funcion will cycle back to the constant monomial of order zero.
This function handles the cases nv=0 and no=0 correctly (i.e. returning 0)

◆ daceNorm()

double daceNorm ( const DACEDA ina,
const unsigned int  ityp 
)

Compute a norm of a DA object.

Parameters
[in]inaPointer to the DA object to take norm of
[in]itypType of norm to compute. 0 = max norm 1 = sum norm >1 = corresponding vector norm
Returns
The norm of ina

◆ dacenorm() [1/2]

DACE_API void dacenorm ( const DACEDA   REFina,
const unsigned int  ityp,
double   REFanorm 
)

◆ dacenorm() [2/2]

void dacenorm ( const DACEDA ina,
const unsigned int  ityp,
double *  anorm 
)

Compute absolute value of a DA object.

Parameters
[in]inaPointer to DA object to take norm of
[in]itypType of norm to take (see daceNorm())
[out]anormPointer where to store the norm
Deprecated:
Has been replaced by daceNorm()
See also
daceNorm()

◆ daceOrderedNorm()

void daceOrderedNorm ( const DACEDA ina,
const unsigned int  ivar,
const unsigned int  ityp,
double  onorm[] 
)

Compute an order sorted norm of a DA object.

Parameters
[in]inaPointer to the DA object to take norm of
[in]ivarIndependent variable with respect to which to group. 0 = group by monomial order >1 = group by given independent variable
[in]itypType of norm to compute. 0 = max norm 1 = sum norm >1 = corresponding vector norm
[out]onormC array of length nomax+1 containing the grouped estimates

◆ dacePack()

void dacePack ( double *restrict  cc,
DACEDA *restrict  inc 
)

Pack monomials in cc[] into DA object inc.

Parameters
[in]ccC array of nmmax monomials
[in]incPointer to DA object to pack the monomials into

◆ dacepek() [1/2]

void dacepek ( const DACEDA ina,
const unsigned int  jj[],
double *  cjj 
)

Extract coefficient of a monomial in a DA object.

Parameters
[in]inaPointer to DA object to extract monomial coefficient from
[in]jjC array of nvmax exponents identifying the monomial
[out]cjjPointer where to store the value of the coefficient
Deprecated:
Has been replaced by daceGetCoefficient()
See also
daceGetCoefficient()

◆ dacepek() [2/2]

DACE_API void dacepek ( const DACEDA   REFina,
const unsigned int  jj[],
double   REFcjj 
)

◆ dacePower()

void dacePower ( const DACEDA ina,
const int  np,
DACEDA inc 
)

Raise a DA object to the p-th integer power.

Parameters
[in]inaPointer to the DA object to operate on
[in]npPower to which to raise the DA object
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ dacePowerDouble()

void dacePowerDouble ( const DACEDA ina,
const double  p,
DACEDA inc 
)

Raise a DA object to the p-th power.

Parameters
[in]inaPointer to the DA object to operate on
[in]pPower to which to raise the DA object
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ dacePrint()

void dacePrint ( const DACEDA ina)

Print a DA object ina to the standard output.

Parameters
[out]inaPointer to the DA object to printed
See also
daceWrite
daceRead

◆ dacePsiFunction()

void dacePsiFunction ( const DACEDA ina,
const unsigned int  n,
DACEDA inc 
)

Compute the n-th Psi function (i.e. the n+1 derivative of the logarithmic gamma function) of a DA object.

Parameters
[in]inaPointer to the DA object to operate on (constant part != 0, -1, -2, ...)
[in]nOrder of the Psi function (n >= 0)
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceRandom()

double daceRandom ( )

Return a pseudo-random number between 0.0 and 1.0.

Returns
A pseudo-random number in [0.0, 1.0]

◆ daceRead()

void daceRead ( DACEDA ina,
char *  strs,
unsigned int  nstrs 
)

Read a DA object ina from a human readable string representation in strs, containing nstrs contiguous zero-terminated lines of line length DACE_STRLEN.

Parameters
[out]inaPointer to the DA object to read into
[in]strsC array of size nstrs*DACE_STRLEN containing the zero-terminated lines of length DACE_STRLEN
[in]nstrsNumber of lines in strs
See also
daceWrite
dacePrint
Note
This routine can read both DACE output strings as well as some COSY INFINITY formated strings. COSY INFINITY input is limited to less than 16 variables (i.e. a single line per coefficient).

◆ daceReallocateMemory()

void daceReallocateMemory ( const unsigned int  nvar,
const unsigned int  nmem 
)

Reallocate DACE internal memory.

Parameters
[in]nvarMinimum number of variables the new memory allocation should support
[in]nmemMinimum amount of monomials the new memory allocation should support

◆ daceReplaceVariable()

void daceReplaceVariable ( const DACEDA ina,
const unsigned int  from,
const unsigned int  to,
const double  val,
DACEDA inc 
)

Replace independent variable with index from by val times the independent variable with index to.

Parameters
[in]inaPointer to DA object to evaluate
[in]fromNumber of the independent variable to replace
[in]toNumber of the independent variable to change to
[in]valValue to scale new independent variable with
[out]incPointer to DA object to store the result of the replacement

◆ daceRoot()

void daceRoot ( const DACEDA ina,
const int  np,
DACEDA inc 
)

Take the np-th root of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[in]npRoot to take of the DA object
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceRound()

void daceRound ( const DACEDA ina,
DACEDA inc 
)

Round the constant part of a DA object to an integer.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceScaleVariable()

void daceScaleVariable ( const DACEDA ina,
const unsigned int  nvar,
const double  val,
DACEDA inc 
)

Scale independent variable nvar by val.

Parameters
[in]inaPointer to DA object to scale
[in]nvarNumber of the independent variable to scale
[in]valValue to scale independent variable with
[out]incPointer to DA object to store the result of the scaling

◆ daceSetCoefficient()

void daceSetCoefficient ( DACEDA ina,
const unsigned int  jj[],
const double  cjj 
)

Set coefficient of a monomial in a DA object.

Parameters
[in]inaPointer to DA object to set monomial in
[in]jjC array of nvmax exponents identifying the monomial
[in]cjjValue of the corresponding coefficient

◆ daceSetCoefficient0()

void daceSetCoefficient0 ( DACEDA ina,
const unsigned int  ic,
const double  cjj 
)

Set coefficient of a monomial in a DA object.

Parameters
[in]inaPointer to DA object to set monomial in
[in]icDA coding integer of the monomial to set
[in]cjjValue of the corresponding coefficient

◆ daceSetEpsilon()

double daceSetEpsilon ( const double  eps)

Set cutoff value to eps and return the previous value.

Parameters
[in]epsNew cutoff value at or below which coefficients can be flushed to zero for efficiency purposes.
Returns
The previous value of the cutoff
Note
This feature can have severe unintended consequences if used incorrectly! Flushing occurs for any intermediate result also within the DACE, and can result in wrong solutions whenever DA coefficients become very small relative to epsilon. For example, division by a large DA divisor can cause the (internally calculated) multiplicative inverse to be entirely flushed to zero, resulting in a zero DA quotient independently of the size of the dividend.
See also
daceGetEpsilon

◆ daceSetError()

void daceSetError ( const char *  c,
const unsigned int  ix,
const unsigned int  iyy 
)

This subroutine serves as an error handler for errors within the dace. It is intended mostly for development and debugging. More descriptive error messages should be displayed by the user interface.

The error codes are defined as XYY with X indicating the severity and YY corresponding to the actual error code

Severity Levels X

1 = Info: Informative, no action required

3 = Warning: Serious, possibly incorrect use of DACE routines

6 = Error: Recoverable, result may not be correct or assumptions have been made

9 = Error: Unrecoverable, new call to DACEINI is required to reinitialize DACE, DACE objects are no longer valid

10 = Critical: Crash in the DACE, just printing as much as possible and dying

Currently used error codes XYY are defined in daceerror.h

Parameters
[in]can error string representing the error
[in]ixis the error severity code
[in]iyyis the error code
See also
daceerror.h

◆ daceSetLength()

void daceSetLength ( DACEDA inc,
const size_t  len 
)

Set the length of a DACE DA object.

Parameters
[in]incThe DACE DA object to operate on
[in]lenThe new length of the object

◆ daceSetTruncationOrder()

unsigned int daceSetTruncationOrder ( const unsigned int  fnot)

Set the current truncation order for future computations.

Parameters
[in]fnotThe new truncation order
Returns
The previous truncation order
See also
daceGetTruncationOrder

◆ daceSine()

void daceSine ( const DACEDA ina,
DACEDA inc 
)

Compute the sine of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ dacesize() [1/2]

void dacesize ( const DACEDA ina,
unsigned int *  size 
)

Return the number of non-zero monomials in a DA object.

Parameters
[in]inaPointer to DA object to get length of
[out]sizeNumber of non-zero monomials
Deprecated:
Has been renamed to daceGetLength()
See also
daceGetLength()

◆ dacesize() [2/2]

DACE_API void dacesize ( const DACEDA   REFina,
unsigned int   REFsize 
)

◆ daceSquare()

void daceSquare ( const DACEDA ina,
DACEDA inb 
)

Square a DA object.

Parameters
[in]inaPointer to the DA object to square
[out]inbPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceSquareRoot()

void daceSquareRoot ( const DACEDA ina,
DACEDA inc 
)

Compute the square root of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceSubtract()

void daceSubtract ( const DACEDA ina,
const DACEDA inb,
DACEDA inc 
)

Perform subtraction of two DA objects.

Parameters
[in]inaPointer to the first DA object to operate on
[in]inbPointer to the first DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina or inb.

◆ daceSubtractDouble()

void daceSubtractDouble ( const DACEDA ina,
const double  ckon,
DACEDA inb 
)

Subtract constant from a DA object.

Parameters
[in]inaPointer to the first DA object to operate on
[in]ckonConstant value to subtract
[out]inbPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inb can be the same as ina.

◆ daceTangent()

void daceTangent ( const DACEDA ina,
DACEDA inc 
)

Compute the tangent of a DA object.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceTranslateVariable()

void daceTranslateVariable ( const DACEDA ina,
const unsigned int  nvar,
const double  a,
const double  c,
DACEDA inc 
)

Translate independent variable nvar to (a*x + c).

Parameters
[in]inaPointer to DA object to translate
[in]nvarNumber of the independent variable to translate
[in]aLinear value to scale independent variable by
[in]cConstant value to translate independent variable by
[out]incPointer to DA object to store the result of the translation

◆ dacetree() [1/2]

DACE_API void dacetree ( const DACEDA  das[],
const unsigned int  count,
double  ac[],
unsigned int   REFnterm,
unsigned int   REFnvar,
unsigned int   REFnord 
)

◆ dacetree() [2/2]

void dacetree ( const DACEDA  das[],
const unsigned int  count,
double  ac[],
unsigned int *  nterm,
unsigned int *  nvar,
unsigned int *  nord 
)

Compute an evaluation tree for efficient evaluation of DA objects.

Parameters
[in]dasPointers to DA objects to evaluate
[in]countNumber of DA objects in das[]
[out]acC array containing compiled evaluation tree data
[out]ntermresulting number of terms in evaluation tree
[out]nvarnumber of variables appearing in evaluation tree
[out]nordmaximum order appearing in evaluation tree
Deprecated:
Has been replaced by daceEvalTree()
See also
daceEvalTree()

◆ daceTrim()

void daceTrim ( const DACEDA ina,
const unsigned int  imin,
const unsigned int  imax,
DACEDA inc 
)

Truncate a DA object to contain only terms of order larger or equal to imin and less than or equal imax.

Parameters
[in]inaPointer to DA object to trim
[in]iminMinimum order to keep
[in]imaxMaximum order to keep
[in]incPointer to DA object to store the truncated result in

◆ daceTruncate()

void daceTruncate ( const DACEDA ina,
DACEDA inc 
)

Truncate the constant part of a DA object to an integer.

Parameters
[in]inaPointer to the DA object to operate on
[out]incPointer to the DA object to store the result in
Note
This routine is aliasing safe, i.e. inc can be the same as ina.

◆ daceVariableInformation()

void daceVariableInformation ( const DACEDA inc,
monomial **  ipoc,
unsigned int *  ilmc,
unsigned int *  illc 
)

Extract internal information about a DA object.

Parameters
[in]incPointer to the DA object to extract information from
[out]ipocPointer to an array of monomials allocated for this variable
[out]ilmcPointer where to store the maximum number of monomials allocated in this DA object
[out]illcPointer where to store the currently used length of this DA object

◆ daceWeightedSum()

void daceWeightedSum ( const DACEDA ina,
const double  afac,
const DACEDA inb,
const double  bfac,
DACEDA inc 
)

Compute the weighted sum of two DA objects.

Parameters
[in]inaPointer to the first DA object to operate on
[in]afacWeighting factor to multiply ina by
[in]inbPointer to the second DA object to operate on
[in]bfacWeighting factor to multiply inb by
[out]incPointer to the DA object to store the result in
Note
This routine is NOT aliasing safe! So inc MUST BE DIFFERENT from ina and inb.

◆ daceWrite()

void daceWrite ( const DACEDA ina,
char *  strs,
unsigned int *  nstrs 
)

Print the DA object ina to string strs (of line length DACE_STRLEN).

Parameters
[in]inaPointer to the DA object to be printed
[out]strsC array of size (nmmax+2)*DACE_STRLEN containing the zero-terminated lines of length DACE_STRLEN
[out]nstrsPointer where to store the final number of strings printed
See also
daceRead
dacePrint
Note
The format of the output is written in DACE format which is loosely based on the format used by COSY INFINITY but is not fully compatible to it.

◆ npown()

int npown ( int  a,
unsigned int  b 
)

Raise integer a to positive integer power b.

Parameters
[in]abase value
[in]bpower
Returns
a raised to the power of b

◆ pown()

double pown ( double  a,
unsigned int  b 
)

Raise double a to positive integer power b.

Parameters
[in]abase value
[in]bpower
Returns
a raised to the power of b

◆ umax()

unsigned int umax ( const unsigned int  a,
const unsigned int  b 
)

Return the maximum between two unsigned integer.

Returns
Maximum between a and b

◆ umin()

unsigned int umin ( const unsigned int  a,
const unsigned int  b 
)

Return the minimum between two unsigned integer.

Returns
Minimum between a and b

Variable Documentation

◆ DACECom [1/2]

dacecom DACECom = { 0 }

◆ DACECom [2/2]

dacecom DACECom

◆ DACECom_t [1/2]

DACE_THREAD_LOCAL dacecom_t DACECom_t = { 0 }

◆ DACECom_t [2/2]

DACE_THREAD_LOCAL dacecom_t DACECom_t

◆ DACEDbg [1/2]

DACE_THREAD_LOCAL dacedbg DACEDbg = { 0 }

◆ DACEDbg [2/2]

DACE_THREAD_LOCAL dacedbg DACEDbg

◆ DACEerr

DACE_API const errstrings DACEerr[]

Variable containing all errors strings and codes.