Scribus
Open source desktop publishing at your fingertips
fpconfig.hh
1 /***************************************************************************\
2 |* Function Parser for C++ v3.3.2 *|
3 |*-------------------------------------------------------------------------*|
4 |* Copyright: Juha Nieminen *|
5 \***************************************************************************/
6 
7 // Configuration file
8 // ------------------
9 
10 // NOTE:
11 // This file is for the internal use of the function parser only.
12 // You don't need to include this file in your source files, just
13 // include "fparser.hh".
14 
15 /*
16  Note that these do not change what FunctionParser supports, they only
17  change how the function is evaluated, potentially making it faster when
18  these functions are involved.
19  These will make the source code use asinh(), acosh(), atanh(), exp2()
20  and log2().
21 */
22 //#define FP_SUPPORT_TR1_MATH_FUNCS
23 
24 #ifdef FP_SUPPORT_TR1_MATH_FUNCS
25 #define FP_SUPPORT_ASINH
26 #define FP_SUPPORT_EXP2
27 #define FP_SUPPORT_LOG2
28 #endif
29 
30 /*
31  Comment out the following line to enable the eval() function, which can
32  be used in the function string to recursively call the same function.
33  Note that enabling this function may be dangerous even if the maximum
34  recursion level is limited because it is still possible to write functions
35  using it which take enormous amounts of time to evaluate even though the
36  maximum recursion is never reached. This may be undesirable in some
37  applications.
38  Alternatively you can define the FP_ENABLE_EVAL precompiler constant in
39  your compiler settings.
40 */
41 #ifndef FP_ENABLE_EVAL
42 #define FP_DISABLE_EVAL
43 #endif
44 
45 
46 /*
47  Maximum recursion level for eval() calls:
48 */
49 #define FP_EVAL_MAX_REC_LEVEL 1000
50 
51 
52 /*
53  Comment out the following lines out if you are not going to use the
54  optimizer and want a slightly smaller library. The Optimize() method
55  can still be called, but it will not do anything.
56  If you are unsure, just leave it. It won't slow down the other parts of
57  the library.
58 */
59 #ifndef FP_NO_SUPPORT_OPTIMIZER
60 #define FP_SUPPORT_OPTIMIZER
61 #endif
62 
63 
64 /*
65  Epsilon value used with the comparison operators (must be non-negative):
66  (Comment it out if you don't want to use epsilon in comparisons. Might
67  lead to marginally faster evaluation of the comparison operators, but
68  can introduce inaccuracies in comparisons.)
69 */
70 #define FP_EPSILON 1e-14
71 
72 
73 /*
74  No member function of FunctionParser is thread-safe. Most prominently,
75  Eval() is not thread-safe. By uncommenting one of these lines the Eval()
76  function can be made thread-safe at the cost of a possible small overhead.
77  The second version requires that the compiler supports the alloca() function,
78  which is not standard, but is faster.
79  */
80 //#define FP_USE_THREAD_SAFE_EVAL
81 //#define FP_USE_THREAD_SAFE_EVAL_WITH_ALLOCA
82 
83 /*
84  Uncomment (or define in your compiler options) to disable evaluation checks.
85  (Consult the documentation for details.)
86  */
87 //#define FP_NO_EVALUATION_CHECKS