Coverage Report

Created: 2023-11-27 06:30

/src/exprtk/exprtk.hpp
Line
Count
Source (jump to first uncovered line)
1
/*
2
 ******************************************************************
3
 *           C++ Mathematical Expression Toolkit Library          *
4
 *                                                                *
5
 * Author: Arash Partow (1999-2023)                               *
6
 * URL: https://www.partow.net/programming/exprtk/index.html      *
7
 *                                                                *
8
 * Copyright notice:                                              *
9
 * Free use of the C++ Mathematical Expression Toolkit Library is *
10
 * permitted under the guidelines and in accordance with the most *
11
 * current version of the MIT License.                            *
12
 * https://www.opensource.org/licenses/MIT                        *
13
 *                                                                *
14
 * Example expressions:                                           *
15
 * (00) (y + x / y) * (x - y / x)                                 *
16
 * (01) (x^2 / sin(2 * pi / y)) - x / 2                           *
17
 * (02) sqrt(1 - (x^2))                                           *
18
 * (03) 1 - sin(2 * x) + cos(pi / y)                              *
19
 * (04) a * exp(2 * t) + c                                        *
20
 * (05) if(((x + 2) == 3) and ((y + 5) <= 9),1 + w, 2 / z)        *
21
 * (06) (avg(x,y) <= x + y ? x - y : x * y) + 2 * pi / x          *
22
 * (07) z := x + sin(2 * pi / y)                                  *
23
 * (08) u := 2 * (pi * z) / (w := x + cos(y / pi))                *
24
 * (09) clamp(-1,sin(2 * pi * x) + cos(y / 2 * pi),+1)            *
25
 * (10) inrange(-2,m,+2) == if(({-2 <= m} and [m <= +2]),1,0)     *
26
 * (11) (2sin(x)cos(2y)7 + 1) == (2 * sin(x) * cos(2*y) * 7 + 1)  *
27
 * (12) (x ilike 's*ri?g') and [y < (3 z^7 + w)]                  *
28
 *                                                                *
29
 ******************************************************************
30
*/
31
32
33
#ifndef INCLUDE_EXPRTK_HPP
34
#define INCLUDE_EXPRTK_HPP
35
36
37
#include <algorithm>
38
#include <cassert>
39
#include <cctype>
40
#include <cmath>
41
#include <cstdio>
42
#include <cstdlib>
43
#include <cstring>
44
#include <deque>
45
#include <exception>
46
#include <functional>
47
#include <iterator>
48
#include <limits>
49
#include <list>
50
#include <map>
51
#include <set>
52
#include <stack>
53
#include <stdexcept>
54
#include <string>
55
#include <utility>
56
#include <vector>
57
58
59
namespace exprtk
60
{
61
   #ifdef exprtk_enable_debugging
62
     #define exprtk_debug(params) printf params
63
   #else
64
12.1M
     #define exprtk_debug(params) (void)0
65
   #endif
66
67
   #define exprtk_error_location             \
68
72.6k
   "exprtk.hpp:" + details::to_str(__LINE__) \
69
70
   #if defined(__GNUC__) && (__GNUC__  >= 7)
71
72
      #define exprtk_disable_fallthrough_begin                      \
73
      _Pragma ("GCC diagnostic push")                               \
74
      _Pragma ("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \
75
76
      #define exprtk_disable_fallthrough_end                        \
77
      _Pragma ("GCC diagnostic pop")                                \
78
79
   #else
80
30.9k
      #define exprtk_disable_fallthrough_begin (void)0;
81
30.9k
      #define exprtk_disable_fallthrough_end   (void)0;
82
   #endif
83
84
   #if __cplusplus >= 201103L
85
      #define exprtk_override override
86
      #define exprtk_final    final
87
      #define exprtk_delete   = delete
88
   #else
89
      #define exprtk_override
90
      #define exprtk_final
91
      #define exprtk_delete
92
   #endif
93
94
   namespace details
95
   {
96
      typedef char                   char_t;
97
      typedef char_t*                char_ptr;
98
      typedef char_t const*          char_cptr;
99
      typedef unsigned char          uchar_t;
100
      typedef uchar_t*               uchar_ptr;
101
      typedef uchar_t const*         uchar_cptr;
102
      typedef unsigned long long int _uint64_t;
103
      typedef long long int          _int64_t;
104
105
      inline bool is_whitespace(const char_t c)
106
161M
      {
107
161M
         return (' '  == c) || ('\n' == c) ||
108
161M
                ('\r' == c) || ('\t' == c) ||
109
161M
                ('\b' == c) || ('\v' == c) ||
110
161M
                ('\f' == c) ;
111
161M
      }
112
113
      inline bool is_operator_char(const char_t c)
114
21.0M
      {
115
21.0M
         return ('+' == c) || ('-' == c) ||
116
21.0M
                ('*' == c) || ('/' == c) ||
117
21.0M
                ('^' == c) || ('<' == c) ||
118
21.0M
                ('>' == c) || ('=' == c) ||
119
21.0M
                (',' == c) || ('!' == c) ||
120
21.0M
                ('(' == c) || (')' == c) ||
121
21.0M
                ('[' == c) || (']' == c) ||
122
21.0M
                ('{' == c) || ('}' == c) ||
123
21.0M
                ('%' == c) || (':' == c) ||
124
21.0M
                ('?' == c) || ('&' == c) ||
125
21.0M
                ('|' == c) || (';' == c) ;
126
21.0M
      }
127
128
      inline bool is_letter(const char_t c)
129
71.1M
      {
130
71.1M
         return (('a' <= c) && (c <= 'z')) ||
131
71.1M
                (('A' <= c) && (c <= 'Z')) ;
132
71.1M
      }
133
134
      inline bool is_digit(const char_t c)
135
38.6M
      {
136
38.6M
         return ('0' <= c) && (c <= '9');
137
38.6M
      }
138
139
      inline bool is_letter_or_digit(const char_t c)
140
52.5M
      {
141
52.5M
         return is_letter(c) || is_digit(c);
142
52.5M
      }
143
144
      inline bool is_left_bracket(const char_t c)
145
55.5M
      {
146
55.5M
         return ('(' == c) || ('[' == c) || ('{' == c);
147
55.5M
      }
148
149
      inline bool is_right_bracket(const char_t c)
150
56.6M
      {
151
56.6M
         return (')' == c) || (']' == c) || ('}' == c);
152
56.6M
      }
153
154
      inline bool is_bracket(const char_t c)
155
16.2M
      {
156
16.2M
         return is_left_bracket(c) || is_right_bracket(c);
157
16.2M
      }
158
159
      inline bool is_sign(const char_t c)
160
61.1k
      {
161
61.1k
         return ('+' == c) || ('-' == c);
162
61.1k
      }
163
164
      inline bool is_invalid(const char_t c)
165
0
      {
166
0
         return !is_whitespace   (c) &&
167
0
                !is_operator_char(c) &&
168
0
                !is_letter       (c) &&
169
0
                !is_digit        (c) &&
170
0
                ('.'  != c)          &&
171
0
                ('_'  != c)          &&
172
0
                ('$'  != c)          &&
173
0
                ('~'  != c)          &&
174
0
                ('\'' != c);
175
0
      }
176
177
      inline bool is_valid_string_char(const char_t c)
178
1.00M
      {
179
1.00M
         return std::isprint(static_cast<uchar_t>(c)) ||
180
1.00M
                is_whitespace(c);
181
1.00M
      }
182
183
      #ifndef exprtk_disable_caseinsensitivity
184
      inline void case_normalise(std::string& s)
185
0
      {
186
0
         for (std::size_t i = 0; i < s.size(); ++i)
187
0
         {
188
0
            s[i] = static_cast<std::string::value_type>(std::tolower(s[i]));
189
0
         }
190
0
      }
191
192
      inline bool imatch(const char_t c1, const char_t c2)
193
190
      {
194
190
         return std::tolower(c1) == std::tolower(c2);
195
190
      }
196
197
      inline bool imatch(const std::string& s1, const std::string& s2)
198
116M
      {
199
116M
         if (s1.size() == s2.size())
200
10.4M
         {
201
40.0M
            for (std::size_t i = 0; i < s1.size(); ++i)
202
35.9M
            {
203
35.9M
               if (std::tolower(s1[i]) != std::tolower(s2[i]))
204
6.37M
               {
205
6.37M
                  return false;
206
6.37M
               }
207
35.9M
            }
208
209
4.10M
            return true;
210
10.4M
         }
211
212
105M
         return false;
213
116M
      }
214
215
      struct ilesscompare
216
      {
217
         inline bool operator() (const std::string& s1, const std::string& s2) const
218
136M
         {
219
136M
            const std::size_t length = std::min(s1.size(),s2.size());
220
221
173M
            for (std::size_t i = 0; i < length;  ++i)
222
146M
            {
223
146M
               const char_t c1 = static_cast<char_t>(std::tolower(s1[i]));
224
146M
               const char_t c2 = static_cast<char_t>(std::tolower(s2[i]));
225
226
146M
               if (c1 > c2)
227
22.0M
                  return false;
228
124M
               else if (c1 < c2)
229
87.8M
                  return true;
230
146M
            }
231
232
26.9M
            return s1.size() < s2.size();
233
136M
         }
234
      };
235
236
      #else
237
      inline void case_normalise(std::string&)
238
      {}
239
240
      inline bool imatch(const char_t c1, const char_t c2)
241
      {
242
         return c1 == c2;
243
      }
244
245
      inline bool imatch(const std::string& s1, const std::string& s2)
246
      {
247
         return s1 == s2;
248
      }
249
250
      struct ilesscompare
251
      {
252
         inline bool operator() (const std::string& s1, const std::string& s2) const
253
         {
254
            return s1 < s2;
255
         }
256
      };
257
      #endif
258
259
      inline bool is_valid_sf_symbol(const std::string& symbol)
260
4.33M
      {
261
         // Special function: $f12 or $F34
262
4.33M
         return (4 == symbol.size())  &&
263
4.33M
                ('$' == symbol[0])    &&
264
4.33M
                imatch('f',symbol[1]) &&
265
4.33M
                is_digit(symbol[2])   &&
266
4.33M
                is_digit(symbol[3]);
267
4.33M
      }
268
269
      inline const char_t& front(const std::string& s)
270
0
      {
271
0
         return s[0];
272
0
      }
273
274
      inline const char_t& back(const std::string& s)
275
0
      {
276
0
         return s[s.size() - 1];
277
0
      }
278
279
      inline std::string to_str(int i)
280
72.7k
      {
281
72.7k
         if (0 == i)
282
45
            return std::string("0");
283
284
72.6k
         std::string result;
285
286
72.6k
         const int sign = (i < 0) ? -1 : 1;
287
288
436k
         for ( ; i; i /= 10)
289
363k
         {
290
363k
            result += '0' + static_cast<char_t>(sign * (i % 10));
291
363k
         }
292
293
72.6k
         if (sign < 0)
294
9
         {
295
9
            result += '-';
296
9
         }
297
298
72.6k
         std::reverse(result.begin(), result.end());
299
300
72.6k
         return result;
301
72.7k
      }
302
303
      inline std::string to_str(std::size_t i)
304
20
      {
305
20
         return to_str(static_cast<int>(i));
306
20
      }
307
308
      inline bool is_hex_digit(const uchar_t digit)
309
22
      {
310
22
         return (('0' <= digit) && (digit <= '9')) ||
311
22
                (('A' <= digit) && (digit <= 'F')) ||
312
22
                (('a' <= digit) && (digit <= 'f')) ;
313
22
      }
314
315
      inline uchar_t hex_to_bin(uchar_t h)
316
0
      {
317
0
         if (('0' <= h) && (h <= '9'))
318
0
            return (h - '0');
319
0
         else
320
0
            return static_cast<uchar_t>(std::toupper(h) - 'A');
321
0
      }
322
323
      template <typename Iterator>
324
      inline bool parse_hex(Iterator& itr, Iterator end,
325
                            char_t& result)
326
126
      {
327
126
         if (
328
126
              (end ==  (itr    ))               ||
329
126
              (end ==  (itr + 1))               ||
330
126
              (end ==  (itr + 2))               ||
331
126
              (end ==  (itr + 3))               ||
332
126
              ('0' != *(itr    ))               ||
333
126
              ('X' != std::toupper(*(itr + 1))) ||
334
126
              (!is_hex_digit(*(itr + 2)))       ||
335
126
              (!is_hex_digit(*(itr + 3)))
336
126
            )
337
126
         {
338
126
            return false;
339
126
         }
340
341
0
         result = hex_to_bin(static_cast<uchar_t>(*(itr + 2))) << 4 |
342
0
                  hex_to_bin(static_cast<uchar_t>(*(itr + 3))) ;
343
344
0
         return true;
345
126
      }
346
347
      inline bool cleanup_escapes(std::string& s)
348
92
      {
349
92
         typedef std::string::iterator str_itr_t;
350
351
92
         str_itr_t itr1 = s.begin();
352
92
         str_itr_t itr2 = s.begin();
353
92
         str_itr_t end  = s.end  ();
354
355
92
         std::size_t removal_count  = 0;
356
357
2.49k
         while (end != itr1)
358
2.40k
         {
359
2.40k
            if ('\\' == (*itr1))
360
126
            {
361
126
               if (end == ++itr1)
362
0
               {
363
0
                  return false;
364
0
               }
365
126
               else if (parse_hex(itr1, end, *itr2))
366
0
               {
367
0
                  itr1+= 4;
368
0
                  itr2+= 1;
369
0
                  removal_count +=4;
370
0
               }
371
126
               else if ('a' == (*itr1)) { (*itr2++) = '\a'; ++itr1; ++removal_count; }
372
124
               else if ('b' == (*itr1)) { (*itr2++) = '\b'; ++itr1; ++removal_count; }
373
102
               else if ('f' == (*itr1)) { (*itr2++) = '\f'; ++itr1; ++removal_count; }
374
94
               else if ('n' == (*itr1)) { (*itr2++) = '\n'; ++itr1; ++removal_count; }
375
94
               else if ('r' == (*itr1)) { (*itr2++) = '\r'; ++itr1; ++removal_count; }
376
90
               else if ('t' == (*itr1)) { (*itr2++) = '\t'; ++itr1; ++removal_count; }
377
88
               else if ('v' == (*itr1)) { (*itr2++) = '\v'; ++itr1; ++removal_count; }
378
86
               else if ('0' == (*itr1)) { (*itr2++) = '\0'; ++itr1; ++removal_count; }
379
80
               else
380
80
               {
381
80
                  (*itr2++) = (*itr1++);
382
80
                  ++removal_count;
383
80
               }
384
126
               continue;
385
126
            }
386
2.27k
            else
387
2.27k
               (*itr2++) = (*itr1++);
388
2.40k
         }
389
390
92
         if ((removal_count > s.size()) || (0 == removal_count))
391
0
            return false;
392
393
92
         s.resize(s.size() - removal_count);
394
395
92
         return true;
396
92
      }
397
398
      class build_string
399
      {
400
      public:
401
402
         explicit build_string(const std::size_t& initial_size = 64)
403
1.11M
         {
404
1.11M
            data_.reserve(initial_size);
405
1.11M
         }
406
407
         inline build_string& operator << (const std::string& s)
408
2.59M
         {
409
2.59M
            data_ += s;
410
2.59M
            return (*this);
411
2.59M
         }
412
413
         inline build_string& operator << (char_cptr s)
414
3.71M
         {
415
3.71M
            data_ += std::string(s);
416
3.71M
            return (*this);
417
3.71M
         }
418
419
         inline operator std::string () const
420
1.11M
         {
421
1.11M
            return data_;
422
1.11M
         }
423
424
         inline std::string as_string() const
425
0
         {
426
0
            return data_;
427
0
         }
428
429
      private:
430
431
         std::string data_;
432
      };
433
434
      static const std::string reserved_words[] =
435
                                  {
436
                                    "break",  "case",  "continue",  "default",  "false",  "for",
437
                                    "if", "else", "ilike",  "in", "like", "and",  "nand", "nor",
438
                                    "not",  "null",  "or",   "repeat", "return",  "shl",  "shr",
439
                                    "swap", "switch", "true",  "until", "var",  "while", "xnor",
440
                                    "xor", "&", "|"
441
                                  };
442
443
      static const std::size_t reserved_words_size = sizeof(reserved_words) / sizeof(std::string);
444
445
      static const std::string reserved_symbols[] =
446
                                  {
447
                                    "abs",  "acos",  "acosh",  "and",  "asin",  "asinh", "atan",
448
                                    "atanh", "atan2", "avg",  "break", "case", "ceil",  "clamp",
449
                                    "continue",   "cos",   "cosh",   "cot",   "csc",  "default",
450
                                    "deg2grad",  "deg2rad",   "equal",  "erf",   "erfc",  "exp",
451
                                    "expm1",  "false",   "floor",  "for",   "frac",  "grad2deg",
452
                                    "hypot", "iclamp", "if",  "else", "ilike", "in",  "inrange",
453
                                    "like",  "log",  "log10", "log2",  "logn",  "log1p", "mand",
454
                                    "max", "min",  "mod", "mor",  "mul", "ncdf",  "nand", "nor",
455
                                    "not",   "not_equal",   "null",   "or",   "pow",  "rad2deg",
456
                                    "repeat", "return", "root", "round", "roundn", "sec", "sgn",
457
                                    "shl", "shr", "sin", "sinc", "sinh", "sqrt",  "sum", "swap",
458
                                    "switch", "tan",  "tanh", "true",  "trunc", "until",  "var",
459
                                    "while", "xnor", "xor", "&", "|"
460
                                  };
461
462
      static const std::size_t reserved_symbols_size = sizeof(reserved_symbols) / sizeof(std::string);
463
464
      static const std::string base_function_list[] =
465
                                  {
466
                                    "abs", "acos",  "acosh", "asin",  "asinh", "atan",  "atanh",
467
                                    "atan2",  "avg",  "ceil",  "clamp",  "cos",  "cosh",  "cot",
468
                                    "csc",  "equal",  "erf",  "erfc",  "exp",  "expm1", "floor",
469
                                    "frac", "hypot", "iclamp",  "like", "log", "log10",  "log2",
470
                                    "logn", "log1p", "mand", "max", "min", "mod", "mor",  "mul",
471
                                    "ncdf",  "pow",  "root",  "round",  "roundn",  "sec", "sgn",
472
                                    "sin", "sinc", "sinh", "sqrt", "sum", "swap", "tan", "tanh",
473
                                    "trunc",  "not_equal",  "inrange",  "deg2grad",   "deg2rad",
474
                                    "rad2deg", "grad2deg"
475
                                  };
476
477
      static const std::size_t base_function_list_size = sizeof(base_function_list) / sizeof(std::string);
478
479
      static const std::string logic_ops_list[] =
480
                                  {
481
                                    "and", "nand", "nor", "not", "or",  "xnor", "xor", "&", "|"
482
                                  };
483
484
      static const std::size_t logic_ops_list_size = sizeof(logic_ops_list) / sizeof(std::string);
485
486
      static const std::string cntrl_struct_list[] =
487
                                  {
488
                                     "if", "switch", "for", "while", "repeat", "return"
489
                                  };
490
491
      static const std::size_t cntrl_struct_list_size = sizeof(cntrl_struct_list) / sizeof(std::string);
492
493
      static const std::string arithmetic_ops_list[] =
494
                                  {
495
                                    "+", "-", "*", "/", "%", "^"
496
                                  };
497
498
      static const std::size_t arithmetic_ops_list_size = sizeof(arithmetic_ops_list) / sizeof(std::string);
499
500
      static const std::string assignment_ops_list[] =
501
                                  {
502
                                    ":=", "+=", "-=",
503
                                    "*=", "/=", "%="
504
                                  };
505
506
      static const std::size_t assignment_ops_list_size = sizeof(assignment_ops_list) / sizeof(std::string);
507
508
      static const std::string inequality_ops_list[] =
509
                                  {
510
                                     "<",  "<=", "==",
511
                                     "=",  "!=", "<>",
512
                                    ">=",  ">"
513
                                  };
514
515
      static const std::size_t inequality_ops_list_size = sizeof(inequality_ops_list) / sizeof(std::string);
516
517
      inline bool is_reserved_word(const std::string& symbol)
518
0
      {
519
0
         for (std::size_t i = 0; i < reserved_words_size; ++i)
520
0
         {
521
0
            if (imatch(symbol, reserved_words[i]))
522
0
            {
523
0
               return true;
524
0
            }
525
0
         }
526
0
527
0
         return false;
528
0
      }
529
530
      inline bool is_reserved_symbol(const std::string& symbol)
531
72.3k
      {
532
6.36M
         for (std::size_t i = 0; i < reserved_symbols_size; ++i)
533
6.29M
         {
534
6.29M
            if (imatch(symbol, reserved_symbols[i]))
535
106
            {
536
106
               return true;
537
106
            }
538
6.29M
         }
539
540
72.2k
         return false;
541
72.3k
      }
542
543
      inline bool is_base_function(const std::string& function_name)
544
0
      {
545
0
         for (std::size_t i = 0; i < base_function_list_size; ++i)
546
0
         {
547
0
            if (imatch(function_name, base_function_list[i]))
548
0
            {
549
0
               return true;
550
0
            }
551
0
         }
552
553
0
         return false;
554
0
      }
555
556
      inline bool is_control_struct(const std::string& cntrl_strct)
557
0
      {
558
0
         for (std::size_t i = 0; i < cntrl_struct_list_size; ++i)
559
0
         {
560
0
            if (imatch(cntrl_strct, cntrl_struct_list[i]))
561
0
            {
562
0
               return true;
563
0
            }
564
0
         }
565
0
566
0
         return false;
567
0
      }
568
569
      inline bool is_logic_opr(const std::string& lgc_opr)
570
0
      {
571
0
         for (std::size_t i = 0; i < logic_ops_list_size; ++i)
572
0
         {
573
0
            if (imatch(lgc_opr, logic_ops_list[i]))
574
0
            {
575
0
               return true;
576
0
            }
577
0
         }
578
0
579
0
         return false;
580
0
      }
581
582
      struct cs_match
583
      {
584
         static inline bool cmp(const char_t c0, const char_t c1)
585
0
         {
586
0
            return (c0 == c1);
587
0
         }
588
      };
589
590
      struct cis_match
591
      {
592
         static inline bool cmp(const char_t c0, const char_t c1)
593
0
         {
594
0
            return (std::tolower(c0) == std::tolower(c1));
595
0
         }
596
      };
597
598
      template <typename Iterator, typename Compare>
599
      inline bool match_impl(const Iterator pattern_begin,
600
                             const Iterator pattern_end  ,
601
                             const Iterator data_begin   ,
602
                             const Iterator data_end     ,
603
                             const typename std::iterator_traits<Iterator>::value_type& zero_or_more,
604
                             const typename std::iterator_traits<Iterator>::value_type& exactly_one )
605
0
      {
606
0
         typedef typename std::iterator_traits<Iterator>::value_type type;
607
608
0
         const Iterator null_itr(0);
609
610
0
         Iterator p_itr  = pattern_begin;
611
0
         Iterator d_itr  = data_begin;
612
0
         Iterator np_itr = null_itr;
613
0
         Iterator nd_itr = null_itr;
614
615
0
         for ( ; ; )
616
0
         {
617
0
            if (p_itr != pattern_end)
618
0
            {
619
0
               const type c = *(p_itr);
620
621
0
               if ((data_end != d_itr) && (Compare::cmp(c,*(d_itr)) || (exactly_one == c)))
622
0
               {
623
0
                  ++d_itr;
624
0
                  ++p_itr;
625
0
                  continue;
626
0
               }
627
0
               else if (zero_or_more == c)
628
0
               {
629
0
                  while ((pattern_end != p_itr) && (zero_or_more == *(p_itr)))
630
0
                  {
631
0
                     ++p_itr;
632
0
                  }
633
634
0
                  const type d = *(p_itr);
635
636
0
                  while ((data_end != d_itr) && !(Compare::cmp(d,*(d_itr)) || (exactly_one == d)))
637
0
                  {
638
0
                     ++d_itr;
639
0
                  }
640
641
                  // set backtrack iterators
642
0
                  np_itr = p_itr - 1;
643
0
                  nd_itr = d_itr + 1;
644
645
0
                  continue;
646
0
               }
647
0
            }
648
0
            else if (data_end == d_itr)
649
0
               return true;
650
651
0
            if ((data_end == d_itr) || (null_itr == nd_itr))
652
0
                return false;
653
654
0
            p_itr = np_itr;
655
0
            d_itr = nd_itr;
656
0
         }
657
658
0
         return true;
659
0
      }
Unexecuted instantiation: bool exprtk::details::match_impl<char const*, exprtk::details::cs_match>(char const*, char const*, char const*, char const*, std::__1::iterator_traits<char const*>::value_type const&, std::__1::iterator_traits<char const*>::value_type const&)
Unexecuted instantiation: bool exprtk::details::match_impl<char const*, exprtk::details::cis_match>(char const*, char const*, char const*, char const*, std::__1::iterator_traits<char const*>::value_type const&, std::__1::iterator_traits<char const*>::value_type const&)
660
661
      inline bool wc_match(const std::string& wild_card,
662
                           const std::string& str)
663
0
      {
664
0
         return match_impl<char_cptr,cs_match>(
665
0
                   wild_card.data(),
666
0
                   wild_card.data() + wild_card.size(),
667
0
                   str.data(),
668
0
                   str.data() + str.size(),
669
0
                   '*', '?');
670
0
      }
671
672
      inline bool wc_imatch(const std::string& wild_card,
673
                            const std::string& str)
674
0
      {
675
0
         return match_impl<char_cptr,cis_match>(
676
0
                   wild_card.data(),
677
0
                   wild_card.data() + wild_card.size(),
678
0
                   str.data(),
679
0
                   str.data() + str.size(),
680
0
                   '*', '?');
681
0
      }
682
683
      inline bool sequence_match(const std::string& pattern,
684
                                 const std::string& str,
685
                                 std::size_t&       diff_index,
686
                                 char_t&            diff_value)
687
0
      {
688
0
         if (str.empty())
689
0
         {
690
0
            return ("Z" == pattern);
691
0
         }
692
0
         else if ('*' == pattern[0])
693
0
            return false;
694
695
0
         typedef std::string::const_iterator itr_t;
696
697
0
         itr_t p_itr = pattern.begin();
698
0
         itr_t s_itr = str    .begin();
699
700
0
         const itr_t p_end = pattern.end();
701
0
         const itr_t s_end = str    .end();
702
703
0
         while ((s_end != s_itr) && (p_end != p_itr))
704
0
         {
705
0
            if ('*' == (*p_itr))
706
0
            {
707
0
               const char_t target = static_cast<char_t>(std::toupper(*(p_itr - 1)));
708
709
0
               if ('*' == target)
710
0
               {
711
0
                  diff_index = static_cast<std::size_t>(std::distance(str.begin(),s_itr));
712
0
                  diff_value = static_cast<char_t>(std::toupper(*p_itr));
713
714
0
                  return false;
715
0
               }
716
0
               else
717
0
                  ++p_itr;
718
719
0
               while (s_itr != s_end)
720
0
               {
721
0
                  if (target != std::toupper(*s_itr))
722
0
                     break;
723
0
                  else
724
0
                     ++s_itr;
725
0
               }
726
727
0
               continue;
728
0
            }
729
0
            else if (
730
0
                      ('?' != *p_itr) &&
731
0
                      std::toupper(*p_itr) != std::toupper(*s_itr)
732
0
                    )
733
0
            {
734
0
               diff_index = static_cast<std::size_t>(std::distance(str.begin(),s_itr));
735
0
               diff_value = static_cast<char_t>(std::toupper(*p_itr));
736
737
0
               return false;
738
0
            }
739
740
0
            ++p_itr;
741
0
            ++s_itr;
742
0
         }
743
744
0
         return (
745
0
                  (s_end == s_itr) &&
746
0
                  (
747
0
                    (p_end ==  p_itr) ||
748
0
                    ('*'   == *p_itr)
749
0
                  )
750
0
                );
751
0
      }
752
753
      static const double pow10[] = {
754
                                      1.0,
755
                                      1.0E+001, 1.0E+002, 1.0E+003, 1.0E+004,
756
                                      1.0E+005, 1.0E+006, 1.0E+007, 1.0E+008,
757
                                      1.0E+009, 1.0E+010, 1.0E+011, 1.0E+012,
758
                                      1.0E+013, 1.0E+014, 1.0E+015, 1.0E+016
759
                                    };
760
761
      static const std::size_t pow10_size = sizeof(pow10) / sizeof(double);
762
763
      namespace numeric
764
      {
765
         namespace constant
766
         {
767
            static const double e       =  2.71828182845904523536028747135266249775724709369996;
768
            static const double pi      =  3.14159265358979323846264338327950288419716939937510;
769
            static const double pi_2    =  1.57079632679489661923132169163975144209858469968755;
770
            static const double pi_4    =  0.78539816339744830961566084581987572104929234984378;
771
            static const double pi_180  =  0.01745329251994329576923690768488612713442871888542;
772
            static const double _1_pi   =  0.31830988618379067153776752674502872406891929148091;
773
            static const double _2_pi   =  0.63661977236758134307553505349005744813783858296183;
774
            static const double _180_pi = 57.29577951308232087679815481410517033240547246656443;
775
            static const double log2    =  0.69314718055994530941723212145817656807550013436026;
776
            static const double sqrt2   =  1.41421356237309504880168872420969807856967187537695;
777
         }
778
779
         namespace details
780
         {
781
0
            struct unknown_type_tag { unknown_type_tag() {} };
782
686M
            struct real_type_tag    { real_type_tag   () {} };
783
0
            struct int_type_tag     { int_type_tag    () {} };
784
785
            template <typename T>
786
            struct number_type
787
            {
788
               typedef unknown_type_tag type;
789
               number_type() {}
790
            };
791
792
            #define exprtk_register_real_type_tag(T)             \
793
            template <> struct number_type<T>                    \
794
0
            { typedef real_type_tag type; number_type() {} };    \
Unexecuted instantiation: exprtk::details::numeric::details::number_type<double>::number_type()
Unexecuted instantiation: exprtk::details::numeric::details::number_type<long double>::number_type()
Unexecuted instantiation: exprtk::details::numeric::details::number_type<float>::number_type()
795
796
            #define exprtk_register_int_type_tag(T)              \
797
            template <> struct number_type<T>                    \
798
0
            { typedef int_type_tag type; number_type() {} };     \
Unexecuted instantiation: exprtk::details::numeric::details::number_type<short>::number_type()
Unexecuted instantiation: exprtk::details::numeric::details::number_type<int>::number_type()
Unexecuted instantiation: exprtk::details::numeric::details::number_type<long long>::number_type()
Unexecuted instantiation: exprtk::details::numeric::details::number_type<unsigned short>::number_type()
Unexecuted instantiation: exprtk::details::numeric::details::number_type<unsigned int>::number_type()
Unexecuted instantiation: exprtk::details::numeric::details::number_type<unsigned long long>::number_type()
799
800
            exprtk_register_real_type_tag(double     )
801
            exprtk_register_real_type_tag(long double)
802
            exprtk_register_real_type_tag(float      )
803
804
            exprtk_register_int_type_tag(short         )
805
            exprtk_register_int_type_tag(int           )
806
            exprtk_register_int_type_tag(_int64_t      )
807
            exprtk_register_int_type_tag(unsigned short)
808
            exprtk_register_int_type_tag(unsigned int  )
809
            exprtk_register_int_type_tag(_uint64_t     )
810
811
            #undef exprtk_register_real_type_tag
812
            #undef exprtk_register_int_type_tag
813
814
            template <typename T>
815
            struct epsilon_type {};
816
817
            #define exprtk_define_epsilon_type(Type, Epsilon)      \
818
            template <> struct epsilon_type<Type>                  \
819
            {                                                      \
820
               static inline Type value()                          \
821
2
               {                                                   \
822
2
                  const Type epsilon = static_cast<Type>(Epsilon); \
823
2
                  return epsilon;                                  \
824
2
               }                                                   \
exprtk::details::numeric::details::epsilon_type<double>::value()
Line
Count
Source
821
1
               {                                                   \
822
1
                  const Type epsilon = static_cast<Type>(Epsilon); \
823
1
                  return epsilon;                                  \
824
1
               }                                                   \
exprtk::details::numeric::details::epsilon_type<float>::value()
Line
Count
Source
821
1
               {                                                   \
822
1
                  const Type epsilon = static_cast<Type>(Epsilon); \
823
1
                  return epsilon;                                  \
824
1
               }                                                   \
Unexecuted instantiation: exprtk::details::numeric::details::epsilon_type<long double>::value()
825
            };                                                     \
826
827
            exprtk_define_epsilon_type(float      , 0.00000100000f)
828
            exprtk_define_epsilon_type(double     , 0.000000000100)
829
            exprtk_define_epsilon_type(long double, 0.000000000001)
830
831
            #undef exprtk_define_epsilon_type
832
833
            template <typename T>
834
            inline bool is_nan_impl(const T v, real_type_tag)
835
400k
            {
836
400k
               return std::not_equal_to<T>()(v,v);
837
400k
            }
bool exprtk::details::numeric::details::is_nan_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
835
200k
            {
836
200k
               return std::not_equal_to<T>()(v,v);
837
200k
            }
bool exprtk::details::numeric::details::is_nan_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
835
200k
            {
836
200k
               return std::not_equal_to<T>()(v,v);
837
200k
            }
838
839
            template <typename T>
840
            inline int to_int32_impl(const T v, real_type_tag)
841
240k
            {
842
240k
               return static_cast<int>(v);
843
240k
            }
int exprtk::details::numeric::details::to_int32_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
841
123k
            {
842
123k
               return static_cast<int>(v);
843
123k
            }
int exprtk::details::numeric::details::to_int32_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
841
116k
            {
842
116k
               return static_cast<int>(v);
843
116k
            }
844
845
            template <typename T>
846
            inline _int64_t to_int64_impl(const T v, real_type_tag)
847
292
            {
848
292
               return static_cast<_int64_t>(v);
849
292
            }
long long exprtk::details::numeric::details::to_int64_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
847
146
            {
848
146
               return static_cast<_int64_t>(v);
849
146
            }
long long exprtk::details::numeric::details::to_int64_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
847
146
            {
848
146
               return static_cast<_int64_t>(v);
849
146
            }
850
851
            template <typename T>
852
            inline bool is_true_impl(const T v)
853
115M
            {
854
115M
               return std::not_equal_to<T>()(T(0),v);
855
115M
            }
bool exprtk::details::numeric::details::is_true_impl<double>(double)
Line
Count
Source
853
58.5M
            {
854
58.5M
               return std::not_equal_to<T>()(T(0),v);
855
58.5M
            }
bool exprtk::details::numeric::details::is_true_impl<float>(float)
Line
Count
Source
853
57.3M
            {
854
57.3M
               return std::not_equal_to<T>()(T(0),v);
855
57.3M
            }
856
857
            template <typename T>
858
            inline bool is_false_impl(const T v)
859
124M
            {
860
124M
               return std::equal_to<T>()(T(0),v);
861
124M
            }
bool exprtk::details::numeric::details::is_false_impl<double>(double)
Line
Count
Source
859
62.7M
            {
860
62.7M
               return std::equal_to<T>()(T(0),v);
861
62.7M
            }
bool exprtk::details::numeric::details::is_false_impl<float>(float)
Line
Count
Source
859
62.1M
            {
860
62.1M
               return std::equal_to<T>()(T(0),v);
861
62.1M
            }
862
863
            template <typename T>
864
            inline T abs_impl(const T v, real_type_tag)
865
11.2M
            {
866
11.2M
               return ((v < T(0)) ? -v : v);
867
11.2M
            }
double exprtk::details::numeric::details::abs_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
865
5.57M
            {
866
5.57M
               return ((v < T(0)) ? -v : v);
867
5.57M
            }
float exprtk::details::numeric::details::abs_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
865
5.65M
            {
866
5.65M
               return ((v < T(0)) ? -v : v);
867
5.65M
            }
868
869
            template <typename T>
870
            inline T min_impl(const T v0, const T v1, real_type_tag)
871
            {
872
               return std::min<T>(v0,v1);
873
            }
874
875
            template <typename T>
876
            inline T max_impl(const T v0, const T v1, real_type_tag)
877
            {
878
               return std::max<T>(v0,v1);
879
            }
880
881
            template <typename T>
882
            inline T equal_impl(const T v0, const T v1, real_type_tag)
883
0
            {
884
0
               const T epsilon = epsilon_type<T>::value();
885
0
               return (abs_impl(v0 - v1,real_type_tag()) <= (std::max(T(1),std::max(abs_impl(v0,real_type_tag()),abs_impl(v1,real_type_tag()))) * epsilon)) ? T(1) : T(0);
886
0
            }
887
888
            inline float equal_impl(const float v0, const float v1, real_type_tag)
889
0
            {
890
0
               const float epsilon = epsilon_type<float>::value();
891
0
               return (abs_impl(v0 - v1,real_type_tag()) <= (std::max(1.0f,std::max(abs_impl(v0,real_type_tag()),abs_impl(v1,real_type_tag()))) * epsilon)) ? 1.0f : 0.0f;
892
0
            }
893
894
            template <typename T>
895
            inline T equal_impl(const T v0, const T v1, int_type_tag)
896
            {
897
               return (v0 == v1) ? 1 : 0;
898
            }
899
900
            template <typename T>
901
            inline T expm1_impl(const T v, real_type_tag)
902
0
            {
903
               // return std::expm1<T>(v);
904
0
               if (abs_impl(v,real_type_tag()) < T(0.00001))
905
0
                  return v + (T(0.5) * v * v);
906
0
               else
907
0
                  return std::exp(v) - T(1);
908
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::expm1_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::expm1_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
909
910
            template <typename T>
911
            inline T expm1_impl(const T v, int_type_tag)
912
            {
913
               return T(std::exp<double>(v)) - T(1);
914
            }
915
916
            template <typename T>
917
            inline T nequal_impl(const T v0, const T v1, real_type_tag)
918
0
            {
919
0
               typedef real_type_tag rtg;
920
0
               const T epsilon = epsilon_type<T>::value();
921
0
               return (abs_impl(v0 - v1,rtg()) > (std::max(T(1),std::max(abs_impl(v0,rtg()),abs_impl(v1,rtg()))) * epsilon)) ? T(1) : T(0);
922
0
            }
923
924
            inline float nequal_impl(const float v0, const float v1, real_type_tag)
925
0
            {
926
0
               typedef real_type_tag rtg;
927
0
               const float epsilon = epsilon_type<float>::value();
928
0
               return (abs_impl(v0 - v1,rtg()) > (std::max(1.0f,std::max(abs_impl(v0,rtg()),abs_impl(v1,rtg()))) * epsilon)) ? 1.0f : 0.0f;
929
0
            }
930
931
            template <typename T>
932
            inline T nequal_impl(const T v0, const T v1, int_type_tag)
933
            {
934
               return (v0 != v1) ? 1 : 0;
935
            }
936
937
            template <typename T>
938
            inline T modulus_impl(const T v0, const T v1, real_type_tag)
939
218M
            {
940
218M
               return std::fmod(v0,v1);
941
218M
            }
double exprtk::details::numeric::details::modulus_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
939
111M
            {
940
111M
               return std::fmod(v0,v1);
941
111M
            }
float exprtk::details::numeric::details::modulus_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
939
106M
            {
940
106M
               return std::fmod(v0,v1);
941
106M
            }
942
943
            template <typename T>
944
            inline T modulus_impl(const T v0, const T v1, int_type_tag)
945
            {
946
               return v0 % v1;
947
            }
948
949
            template <typename T>
950
            inline T pow_impl(const T v0, const T v1, real_type_tag)
951
163M
            {
952
163M
               return std::pow(v0,v1);
953
163M
            }
double exprtk::details::numeric::details::pow_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
951
82.7M
            {
952
82.7M
               return std::pow(v0,v1);
953
82.7M
            }
float exprtk::details::numeric::details::pow_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
951
80.5M
            {
952
80.5M
               return std::pow(v0,v1);
953
80.5M
            }
954
955
            template <typename T>
956
            inline T pow_impl(const T v0, const T v1, int_type_tag)
957
            {
958
               return std::pow(static_cast<double>(v0),static_cast<double>(v1));
959
            }
960
961
            template <typename T>
962
            inline T logn_impl(const T v0, const T v1, real_type_tag)
963
0
            {
964
0
               return std::log(v0) / std::log(v1);
965
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::logn_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::logn_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
966
967
            template <typename T>
968
            inline T logn_impl(const T v0, const T v1, int_type_tag)
969
            {
970
               return static_cast<T>(logn_impl<double>(static_cast<double>(v0),static_cast<double>(v1),real_type_tag()));
971
            }
972
973
            template <typename T>
974
            inline T log1p_impl(const T v, real_type_tag)
975
8.70M
            {
976
8.70M
               if (v > T(-1))
977
8.70M
               {
978
8.70M
                  if (abs_impl(v,real_type_tag()) > T(0.0001))
979
602k
                  {
980
602k
                     return std::log(T(1) + v);
981
602k
                  }
982
8.10M
                  else
983
8.10M
                     return (T(-0.5) * v + T(1)) * v;
984
8.70M
               }
985
0
               else
986
0
                  return std::numeric_limits<T>::quiet_NaN();
987
8.70M
            }
double exprtk::details::numeric::details::log1p_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
975
4.30M
            {
976
4.30M
               if (v > T(-1))
977
4.30M
               {
978
4.30M
                  if (abs_impl(v,real_type_tag()) > T(0.0001))
979
302k
                  {
980
302k
                     return std::log(T(1) + v);
981
302k
                  }
982
4.00M
                  else
983
4.00M
                     return (T(-0.5) * v + T(1)) * v;
984
4.30M
               }
985
0
               else
986
0
                  return std::numeric_limits<T>::quiet_NaN();
987
4.30M
            }
float exprtk::details::numeric::details::log1p_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
975
4.40M
            {
976
4.40M
               if (v > T(-1))
977
4.40M
               {
978
4.40M
                  if (abs_impl(v,real_type_tag()) > T(0.0001))
979
300k
                  {
980
300k
                     return std::log(T(1) + v);
981
300k
                  }
982
4.10M
                  else
983
4.10M
                     return (T(-0.5) * v + T(1)) * v;
984
4.40M
               }
985
0
               else
986
0
                  return std::numeric_limits<T>::quiet_NaN();
987
4.40M
            }
988
989
            template <typename T>
990
            inline T log1p_impl(const T v, int_type_tag)
991
            {
992
               if (v > T(-1))
993
               {
994
                  return std::log(T(1) + v);
995
               }
996
               else
997
                  return std::numeric_limits<T>::quiet_NaN();
998
            }
999
1000
            template <typename T>
1001
            inline T root_impl(const T v0, const T v1, real_type_tag)
1002
0
            {
1003
0
               if (v1 < T(0))
1004
0
                  return std::numeric_limits<T>::quiet_NaN();
1005
1006
0
               const std::size_t n = static_cast<std::size_t>(v1);
1007
1008
0
               if ((v0 < T(0)) && (0 == (n % 2)))
1009
0
                  return std::numeric_limits<T>::quiet_NaN();
1010
1011
0
               return std::pow(v0, T(1) / n);
1012
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::root_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::root_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
1013
1014
            template <typename T>
1015
            inline T root_impl(const T v0, const T v1, int_type_tag)
1016
            {
1017
               return root_impl<double>(static_cast<double>(v0),static_cast<double>(v1),real_type_tag());
1018
            }
1019
1020
            template <typename T>
1021
            inline T round_impl(const T v, real_type_tag)
1022
0
            {
1023
0
               return ((v < T(0)) ? std::ceil(v - T(0.5)) : std::floor(v + T(0.5)));
1024
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::round_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::round_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1025
1026
            template <typename T>
1027
            inline T roundn_impl(const T v0, const T v1, real_type_tag)
1028
0
            {
1029
0
               const int index = std::max<int>(0, std::min<int>(pow10_size - 1, static_cast<int>(std::floor(v1))));
1030
0
               const T p10 = T(pow10[index]);
1031
1032
0
               if (v0 < T(0))
1033
0
                  return T(std::ceil ((v0 * p10) - T(0.5)) / p10);
1034
0
               else
1035
0
                  return T(std::floor((v0 * p10) + T(0.5)) / p10);
1036
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::roundn_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::roundn_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
1037
1038
            template <typename T>
1039
            inline T roundn_impl(const T v0, const T, int_type_tag)
1040
            {
1041
               return v0;
1042
            }
1043
1044
            template <typename T>
1045
            inline T hypot_impl(const T v0, const T v1, real_type_tag)
1046
0
            {
1047
0
               return std::sqrt((v0 * v0) + (v1 * v1));
1048
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::hypot_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::hypot_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
1049
1050
            template <typename T>
1051
            inline T hypot_impl(const T v0, const T v1, int_type_tag)
1052
            {
1053
               return static_cast<T>(std::sqrt(static_cast<double>((v0 * v0) + (v1 * v1))));
1054
            }
1055
1056
            template <typename T>
1057
            inline T atan2_impl(const T v0, const T v1, real_type_tag)
1058
0
            {
1059
0
               return std::atan2(v0,v1);
1060
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::atan2_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::atan2_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
1061
1062
            template <typename T>
1063
            inline T atan2_impl(const T, const T, int_type_tag)
1064
            {
1065
               return 0;
1066
            }
1067
1068
            template <typename T>
1069
            inline T shr_impl(const T v0, const T v1, real_type_tag)
1070
0
            {
1071
0
               return v0 * (T(1) / std::pow(T(2),static_cast<T>(static_cast<int>(v1))));
1072
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::shr_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::shr_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
1073
1074
            template <typename T>
1075
            inline T shr_impl(const T v0, const T v1, int_type_tag)
1076
            {
1077
               return v0 >> v1;
1078
            }
1079
1080
            template <typename T>
1081
            inline T shl_impl(const T v0, const T v1, real_type_tag)
1082
0
            {
1083
0
               return v0 * std::pow(T(2),static_cast<T>(static_cast<int>(v1)));
1084
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::shl_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::shl_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
1085
1086
            template <typename T>
1087
            inline T shl_impl(const T v0, const T v1, int_type_tag)
1088
            {
1089
               return v0 << v1;
1090
            }
1091
1092
            template <typename T>
1093
            inline T sgn_impl(const T v, real_type_tag)
1094
1.80M
            {
1095
1.80M
               if      (v > T(0)) return T(+1);
1096
1.00M
               else if (v < T(0)) return T(-1);
1097
989k
               else               return T( 0);
1098
1.80M
            }
double exprtk::details::numeric::details::sgn_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1094
900k
            {
1095
900k
               if      (v > T(0)) return T(+1);
1096
500k
               else if (v < T(0)) return T(-1);
1097
490k
               else               return T( 0);
1098
900k
            }
float exprtk::details::numeric::details::sgn_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1094
900k
            {
1095
900k
               if      (v > T(0)) return T(+1);
1096
500k
               else if (v < T(0)) return T(-1);
1097
498k
               else               return T( 0);
1098
900k
            }
1099
1100
            template <typename T>
1101
            inline T sgn_impl(const T v, int_type_tag)
1102
            {
1103
               if      (v > T(0)) return T(+1);
1104
               else if (v < T(0)) return T(-1);
1105
               else               return T( 0);
1106
            }
1107
1108
            template <typename T>
1109
            inline T and_impl(const T v0, const T v1, real_type_tag)
1110
3.73k
            {
1111
3.73k
               return (is_true_impl(v0) && is_true_impl(v1)) ? T(1) : T(0);
1112
3.73k
            }
double exprtk::details::numeric::details::and_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1110
1.87k
            {
1111
1.87k
               return (is_true_impl(v0) && is_true_impl(v1)) ? T(1) : T(0);
1112
1.87k
            }
float exprtk::details::numeric::details::and_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1110
1.86k
            {
1111
1.86k
               return (is_true_impl(v0) && is_true_impl(v1)) ? T(1) : T(0);
1112
1.86k
            }
1113
1114
            template <typename T>
1115
            inline T and_impl(const T v0, const T v1, int_type_tag)
1116
            {
1117
               return v0 && v1;
1118
            }
1119
1120
            template <typename T>
1121
            inline T nand_impl(const T v0, const T v1, real_type_tag)
1122
1.04k
            {
1123
1.04k
               return (is_false_impl(v0) || is_false_impl(v1)) ? T(1) : T(0);
1124
1.04k
            }
double exprtk::details::numeric::details::nand_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1122
525
            {
1123
525
               return (is_false_impl(v0) || is_false_impl(v1)) ? T(1) : T(0);
1124
525
            }
float exprtk::details::numeric::details::nand_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1122
523
            {
1123
523
               return (is_false_impl(v0) || is_false_impl(v1)) ? T(1) : T(0);
1124
523
            }
1125
1126
            template <typename T>
1127
            inline T nand_impl(const T v0, const T v1, int_type_tag)
1128
            {
1129
               return !(v0 && v1);
1130
            }
1131
1132
            template <typename T>
1133
            inline T or_impl(const T v0, const T v1, real_type_tag)
1134
16
            {
1135
16
               return (is_true_impl(v0) || is_true_impl(v1)) ? T(1) : T(0);
1136
16
            }
double exprtk::details::numeric::details::or_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1134
8
            {
1135
8
               return (is_true_impl(v0) || is_true_impl(v1)) ? T(1) : T(0);
1136
8
            }
float exprtk::details::numeric::details::or_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1134
8
            {
1135
8
               return (is_true_impl(v0) || is_true_impl(v1)) ? T(1) : T(0);
1136
8
            }
1137
1138
            template <typename T>
1139
            inline T or_impl(const T v0, const T v1, int_type_tag)
1140
            {
1141
               return (v0 || v1);
1142
            }
1143
1144
            template <typename T>
1145
            inline T nor_impl(const T v0, const T v1, real_type_tag)
1146
412
            {
1147
412
               return (is_false_impl(v0) && is_false_impl(v1)) ? T(1) : T(0);
1148
412
            }
double exprtk::details::numeric::details::nor_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1146
206
            {
1147
206
               return (is_false_impl(v0) && is_false_impl(v1)) ? T(1) : T(0);
1148
206
            }
float exprtk::details::numeric::details::nor_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1146
206
            {
1147
206
               return (is_false_impl(v0) && is_false_impl(v1)) ? T(1) : T(0);
1148
206
            }
1149
1150
            template <typename T>
1151
            inline T nor_impl(const T v0, const T v1, int_type_tag)
1152
            {
1153
               return !(v0 || v1);
1154
            }
1155
1156
            template <typename T>
1157
            inline T xor_impl(const T v0, const T v1, real_type_tag)
1158
62.4M
            {
1159
62.4M
               return (is_false_impl(v0) != is_false_impl(v1)) ? T(1) : T(0);
1160
62.4M
            }
double exprtk::details::numeric::details::xor_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1158
31.3M
            {
1159
31.3M
               return (is_false_impl(v0) != is_false_impl(v1)) ? T(1) : T(0);
1160
31.3M
            }
float exprtk::details::numeric::details::xor_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1158
31.0M
            {
1159
31.0M
               return (is_false_impl(v0) != is_false_impl(v1)) ? T(1) : T(0);
1160
31.0M
            }
1161
1162
            template <typename T>
1163
            inline T xor_impl(const T v0, const T v1, int_type_tag)
1164
            {
1165
               return v0 ^ v1;
1166
            }
1167
1168
            template <typename T>
1169
            inline T xnor_impl(const T v0, const T v1, real_type_tag)
1170
57.9M
            {
1171
57.9M
               const bool v0_true = is_true_impl(v0);
1172
57.9M
               const bool v1_true = is_true_impl(v1);
1173
1174
57.9M
               if ((v0_true &&  v1_true) || (!v0_true && !v1_true))
1175
29.7M
                  return T(1);
1176
28.1M
               else
1177
28.1M
                  return T(0);
1178
57.9M
            }
double exprtk::details::numeric::details::xnor_impl<double>(double, double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1170
29.2M
            {
1171
29.2M
               const bool v0_true = is_true_impl(v0);
1172
29.2M
               const bool v1_true = is_true_impl(v1);
1173
1174
29.2M
               if ((v0_true &&  v1_true) || (!v0_true && !v1_true))
1175
15.1M
                  return T(1);
1176
14.1M
               else
1177
14.1M
                  return T(0);
1178
29.2M
            }
float exprtk::details::numeric::details::xnor_impl<float>(float, float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1170
28.6M
            {
1171
28.6M
               const bool v0_true = is_true_impl(v0);
1172
28.6M
               const bool v1_true = is_true_impl(v1);
1173
1174
28.6M
               if ((v0_true &&  v1_true) || (!v0_true && !v1_true))
1175
14.6M
                  return T(1);
1176
13.9M
               else
1177
13.9M
                  return T(0);
1178
28.6M
            }
1179
1180
            template <typename T>
1181
            inline T xnor_impl(const T v0, const T v1, int_type_tag)
1182
            {
1183
               const bool v0_true = is_true_impl(v0);
1184
               const bool v1_true = is_true_impl(v1);
1185
1186
               if ((v0_true &&  v1_true) || (!v0_true && !v1_true))
1187
                  return T(1);
1188
               else
1189
                  return T(0);
1190
            }
1191
1192
            #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || !defined(_MSC_VER)
1193
            #define exprtk_define_erf(TT, impl)                \
1194
18
            inline TT erf_impl(const TT v) { return impl(v); } \
exprtk::details::numeric::details::erf_impl(double)
Line
Count
Source
1194
9
            inline TT erf_impl(const TT v) { return impl(v); } \
exprtk::details::numeric::details::erf_impl(float)
Line
Count
Source
1194
9
            inline TT erf_impl(const TT v) { return impl(v); } \
Unexecuted instantiation: exprtk::details::numeric::details::erf_impl(long double)
1195
1196
            exprtk_define_erf(      float,::erff)
1197
            exprtk_define_erf(     double,::erf )
1198
            exprtk_define_erf(long double,::erfl)
1199
            #undef exprtk_define_erf
1200
            #endif
1201
1202
            template <typename T>
1203
            inline T erf_impl(const T v, real_type_tag)
1204
18
            {
1205
               #if defined(_MSC_VER) && (_MSC_VER < 1900)
1206
               // Credits: Abramowitz & Stegun Equations 7.1.25-28
1207
               static const T c[] = {
1208
                                      T( 1.26551223), T(1.00002368),
1209
                                      T( 0.37409196), T(0.09678418),
1210
                                      T(-0.18628806), T(0.27886807),
1211
                                      T(-1.13520398), T(1.48851587),
1212
                                      T(-0.82215223), T(0.17087277)
1213
                                    };
1214
1215
               const T t = T(1) / (T(1) + T(0.5) * abs_impl(v,real_type_tag()));
1216
1217
               const T result = T(1) - t * std::exp((-v * v) -
1218
                                            c[0] + t * (c[1] + t *
1219
                                           (c[2] + t * (c[3] + t *
1220
                                           (c[4] + t * (c[5] + t *
1221
                                           (c[6] + t * (c[7] + t *
1222
                                           (c[8] + t * (c[9]))))))))));
1223
1224
               return (v >= T(0)) ? result : -result;
1225
               #else
1226
18
               return erf_impl(v);
1227
18
               #endif
1228
18
            }
double exprtk::details::numeric::details::erf_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1204
9
            {
1205
               #if defined(_MSC_VER) && (_MSC_VER < 1900)
1206
               // Credits: Abramowitz & Stegun Equations 7.1.25-28
1207
               static const T c[] = {
1208
                                      T( 1.26551223), T(1.00002368),
1209
                                      T( 0.37409196), T(0.09678418),
1210
                                      T(-0.18628806), T(0.27886807),
1211
                                      T(-1.13520398), T(1.48851587),
1212
                                      T(-0.82215223), T(0.17087277)
1213
                                    };
1214
1215
               const T t = T(1) / (T(1) + T(0.5) * abs_impl(v,real_type_tag()));
1216
1217
               const T result = T(1) - t * std::exp((-v * v) -
1218
                                            c[0] + t * (c[1] + t *
1219
                                           (c[2] + t * (c[3] + t *
1220
                                           (c[4] + t * (c[5] + t *
1221
                                           (c[6] + t * (c[7] + t *
1222
                                           (c[8] + t * (c[9]))))))))));
1223
1224
               return (v >= T(0)) ? result : -result;
1225
               #else
1226
9
               return erf_impl(v);
1227
9
               #endif
1228
9
            }
float exprtk::details::numeric::details::erf_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1204
9
            {
1205
               #if defined(_MSC_VER) && (_MSC_VER < 1900)
1206
               // Credits: Abramowitz & Stegun Equations 7.1.25-28
1207
               static const T c[] = {
1208
                                      T( 1.26551223), T(1.00002368),
1209
                                      T( 0.37409196), T(0.09678418),
1210
                                      T(-0.18628806), T(0.27886807),
1211
                                      T(-1.13520398), T(1.48851587),
1212
                                      T(-0.82215223), T(0.17087277)
1213
                                    };
1214
1215
               const T t = T(1) / (T(1) + T(0.5) * abs_impl(v,real_type_tag()));
1216
1217
               const T result = T(1) - t * std::exp((-v * v) -
1218
                                            c[0] + t * (c[1] + t *
1219
                                           (c[2] + t * (c[3] + t *
1220
                                           (c[4] + t * (c[5] + t *
1221
                                           (c[6] + t * (c[7] + t *
1222
                                           (c[8] + t * (c[9]))))))))));
1223
1224
               return (v >= T(0)) ? result : -result;
1225
               #else
1226
9
               return erf_impl(v);
1227
9
               #endif
1228
9
            }
1229
1230
            template <typename T>
1231
            inline T erf_impl(const T v, int_type_tag)
1232
            {
1233
               return erf_impl(static_cast<double>(v),real_type_tag());
1234
            }
1235
1236
            #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || !defined(_MSC_VER)
1237
            #define exprtk_define_erfc(TT, impl)                \
1238
0
            inline TT erfc_impl(const TT v) { return impl(v); } \
Unexecuted instantiation: exprtk::details::numeric::details::erfc_impl(double)
Unexecuted instantiation: exprtk::details::numeric::details::erfc_impl(float)
Unexecuted instantiation: exprtk::details::numeric::details::erfc_impl(long double)
1239
1240
            exprtk_define_erfc(float      ,::erfcf)
1241
            exprtk_define_erfc(double     ,::erfc )
1242
            exprtk_define_erfc(long double,::erfcl)
1243
            #undef exprtk_define_erfc
1244
            #endif
1245
1246
            template <typename T>
1247
            inline T erfc_impl(const T v, real_type_tag)
1248
0
            {
1249
               #if defined(_MSC_VER) && (_MSC_VER < 1900)
1250
               return T(1) - erf_impl(v,real_type_tag());
1251
               #else
1252
0
               return erfc_impl(v);
1253
0
               #endif
1254
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::erfc_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::erfc_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1255
1256
            template <typename T>
1257
            inline T erfc_impl(const T v, int_type_tag)
1258
            {
1259
               return erfc_impl(static_cast<double>(v),real_type_tag());
1260
            }
1261
1262
            template <typename T>
1263
            inline T ncdf_impl(const T v, real_type_tag)
1264
0
            {
1265
0
               const T cnd = T(0.5) * (T(1) +
1266
0
                             erf_impl(abs_impl(v,real_type_tag()) /
1267
0
                                      T(numeric::constant::sqrt2),real_type_tag()));
1268
0
               return  (v < T(0)) ? (T(1) - cnd) : cnd;
1269
0
            }
Unexecuted instantiation: double exprtk::details::numeric::details::ncdf_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::ncdf_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1270
1271
            template <typename T>
1272
            inline T ncdf_impl(const T v, int_type_tag)
1273
            {
1274
               return ncdf_impl(static_cast<double>(v),real_type_tag());
1275
            }
1276
1277
            template <typename T>
1278
            inline T sinc_impl(const T v, real_type_tag)
1279
600k
            {
1280
600k
               if (std::abs(v) >= std::numeric_limits<T>::epsilon())
1281
200k
                   return(std::sin(v) / v);
1282
399k
               else
1283
399k
                  return T(1);
1284
600k
            }
double exprtk::details::numeric::details::sinc_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1279
300k
            {
1280
300k
               if (std::abs(v) >= std::numeric_limits<T>::epsilon())
1281
100k
                   return(std::sin(v) / v);
1282
199k
               else
1283
199k
                  return T(1);
1284
300k
            }
float exprtk::details::numeric::details::sinc_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1279
300k
            {
1280
300k
               if (std::abs(v) >= std::numeric_limits<T>::epsilon())
1281
99.9k
                   return(std::sin(v) / v);
1282
200k
               else
1283
200k
                  return T(1);
1284
300k
            }
1285
1286
            template <typename T>
1287
            inline T sinc_impl(const T v, int_type_tag)
1288
            {
1289
               return sinc_impl(static_cast<double>(v),real_type_tag());
1290
            }
1291
1292
600k
            template <typename T> inline T  acos_impl(const T v, real_type_tag) { return std::acos (v); }
double exprtk::details::numeric::details::acos_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1292
300k
            template <typename T> inline T  acos_impl(const T v, real_type_tag) { return std::acos (v); }
float exprtk::details::numeric::details::acos_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1292
300k
            template <typename T> inline T  acos_impl(const T v, real_type_tag) { return std::acos (v); }
1293
2.40M
            template <typename T> inline T acosh_impl(const T v, real_type_tag) { return std::log(v + std::sqrt((v * v) - T(1))); }
double exprtk::details::numeric::details::acosh_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1293
1.20M
            template <typename T> inline T acosh_impl(const T v, real_type_tag) { return std::log(v + std::sqrt((v * v) - T(1))); }
float exprtk::details::numeric::details::acosh_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1293
1.20M
            template <typename T> inline T acosh_impl(const T v, real_type_tag) { return std::log(v + std::sqrt((v * v) - T(1))); }
1294
0
            template <typename T> inline T  asin_impl(const T v, real_type_tag) { return std::asin (v); }
Unexecuted instantiation: double exprtk::details::numeric::details::asin_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::asin_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1295
1.00M
            template <typename T> inline T asinh_impl(const T v, real_type_tag) { return std::log(v + std::sqrt((v * v) + T(1))); }
double exprtk::details::numeric::details::asinh_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1295
500k
            template <typename T> inline T asinh_impl(const T v, real_type_tag) { return std::log(v + std::sqrt((v * v) + T(1))); }
float exprtk::details::numeric::details::asinh_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1295
500k
            template <typename T> inline T asinh_impl(const T v, real_type_tag) { return std::log(v + std::sqrt((v * v) + T(1))); }
1296
50
            template <typename T> inline T  atan_impl(const T v, real_type_tag) { return std::atan (v); }
double exprtk::details::numeric::details::atan_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1296
25
            template <typename T> inline T  atan_impl(const T v, real_type_tag) { return std::atan (v); }
float exprtk::details::numeric::details::atan_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1296
25
            template <typename T> inline T  atan_impl(const T v, real_type_tag) { return std::atan (v); }
1297
1.40M
            template <typename T> inline T atanh_impl(const T v, real_type_tag) { return (std::log(T(1) + v) - std::log(T(1) - v)) / T(2); }
double exprtk::details::numeric::details::atanh_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1297
700k
            template <typename T> inline T atanh_impl(const T v, real_type_tag) { return (std::log(T(1) + v) - std::log(T(1) - v)) / T(2); }
float exprtk::details::numeric::details::atanh_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1297
700k
            template <typename T> inline T atanh_impl(const T v, real_type_tag) { return (std::log(T(1) + v) - std::log(T(1) - v)) / T(2); }
1298
0
            template <typename T> inline T  ceil_impl(const T v, real_type_tag) { return std::ceil (v); }
Unexecuted instantiation: double exprtk::details::numeric::details::ceil_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::ceil_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1299
9.10M
            template <typename T> inline T   cos_impl(const T v, real_type_tag) { return std::cos  (v); }
double exprtk::details::numeric::details::cos_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1299
4.90M
            template <typename T> inline T   cos_impl(const T v, real_type_tag) { return std::cos  (v); }
float exprtk::details::numeric::details::cos_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1299
4.20M
            template <typename T> inline T   cos_impl(const T v, real_type_tag) { return std::cos  (v); }
1300
3.30M
            template <typename T> inline T  cosh_impl(const T v, real_type_tag) { return std::cosh (v); }
double exprtk::details::numeric::details::cosh_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1300
1.70M
            template <typename T> inline T  cosh_impl(const T v, real_type_tag) { return std::cosh (v); }
float exprtk::details::numeric::details::cosh_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1300
1.60M
            template <typename T> inline T  cosh_impl(const T v, real_type_tag) { return std::cosh (v); }
1301
200k
            template <typename T> inline T   exp_impl(const T v, real_type_tag) { return std::exp  (v); }
double exprtk::details::numeric::details::exp_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1301
100k
            template <typename T> inline T   exp_impl(const T v, real_type_tag) { return std::exp  (v); }
float exprtk::details::numeric::details::exp_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1301
100k
            template <typename T> inline T   exp_impl(const T v, real_type_tag) { return std::exp  (v); }
1302
0
            template <typename T> inline T floor_impl(const T v, real_type_tag) { return std::floor(v); }
Unexecuted instantiation: double exprtk::details::numeric::details::floor_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::floor_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1303
26.0M
            template <typename T> inline T   log_impl(const T v, real_type_tag) { return std::log  (v); }
double exprtk::details::numeric::details::log_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1303
13.0M
            template <typename T> inline T   log_impl(const T v, real_type_tag) { return std::log  (v); }
float exprtk::details::numeric::details::log_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1303
12.9M
            template <typename T> inline T   log_impl(const T v, real_type_tag) { return std::log  (v); }
1304
601k
            template <typename T> inline T log10_impl(const T v, real_type_tag) { return std::log10(v); }
double exprtk::details::numeric::details::log10_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1304
301k
            template <typename T> inline T log10_impl(const T v, real_type_tag) { return std::log10(v); }
float exprtk::details::numeric::details::log10_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1304
300k
            template <typename T> inline T log10_impl(const T v, real_type_tag) { return std::log10(v); }
1305
400k
            template <typename T> inline T  log2_impl(const T v, real_type_tag) { return std::log(v)/T(numeric::constant::log2); }
double exprtk::details::numeric::details::log2_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1305
200k
            template <typename T> inline T  log2_impl(const T v, real_type_tag) { return std::log(v)/T(numeric::constant::log2); }
float exprtk::details::numeric::details::log2_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1305
200k
            template <typename T> inline T  log2_impl(const T v, real_type_tag) { return std::log(v)/T(numeric::constant::log2); }
1306
93.1M
            template <typename T> inline T   neg_impl(const T v, real_type_tag) { return -v;            }
double exprtk::details::numeric::details::neg_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1306
48.0M
            template <typename T> inline T   neg_impl(const T v, real_type_tag) { return -v;            }
float exprtk::details::numeric::details::neg_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1306
45.0M
            template <typename T> inline T   neg_impl(const T v, real_type_tag) { return -v;            }
1307
0
            template <typename T> inline T   pos_impl(const T v, real_type_tag) { return +v;            }
Unexecuted instantiation: double exprtk::details::numeric::details::pos_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::pos_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1308
16
            template <typename T> inline T   sin_impl(const T v, real_type_tag) { return std::sin  (v); }
double exprtk::details::numeric::details::sin_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1308
8
            template <typename T> inline T   sin_impl(const T v, real_type_tag) { return std::sin  (v); }
float exprtk::details::numeric::details::sin_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1308
8
            template <typename T> inline T   sin_impl(const T v, real_type_tag) { return std::sin  (v); }
1309
1.00M
            template <typename T> inline T  sinh_impl(const T v, real_type_tag) { return std::sinh (v); }
double exprtk::details::numeric::details::sinh_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1309
500k
            template <typename T> inline T  sinh_impl(const T v, real_type_tag) { return std::sinh (v); }
float exprtk::details::numeric::details::sinh_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1309
500k
            template <typename T> inline T  sinh_impl(const T v, real_type_tag) { return std::sinh (v); }
1310
0
            template <typename T> inline T  sqrt_impl(const T v, real_type_tag) { return std::sqrt (v); }
Unexecuted instantiation: double exprtk::details::numeric::details::sqrt_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::sqrt_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1311
492
            template <typename T> inline T   tan_impl(const T v, real_type_tag) { return std::tan  (v); }
double exprtk::details::numeric::details::tan_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1311
258
            template <typename T> inline T   tan_impl(const T v, real_type_tag) { return std::tan  (v); }
float exprtk::details::numeric::details::tan_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1311
234
            template <typename T> inline T   tan_impl(const T v, real_type_tag) { return std::tan  (v); }
1312
2.70M
            template <typename T> inline T  tanh_impl(const T v, real_type_tag) { return std::tanh (v); }
double exprtk::details::numeric::details::tanh_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1312
1.50M
            template <typename T> inline T  tanh_impl(const T v, real_type_tag) { return std::tanh (v); }
float exprtk::details::numeric::details::tanh_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1312
1.20M
            template <typename T> inline T  tanh_impl(const T v, real_type_tag) { return std::tanh (v); }
1313
5.20M
            template <typename T> inline T   cot_impl(const T v, real_type_tag) { return T(1) / std::tan(v); }
double exprtk::details::numeric::details::cot_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1313
2.60M
            template <typename T> inline T   cot_impl(const T v, real_type_tag) { return T(1) / std::tan(v); }
float exprtk::details::numeric::details::cot_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1313
2.60M
            template <typename T> inline T   cot_impl(const T v, real_type_tag) { return T(1) / std::tan(v); }
1314
0
            template <typename T> inline T   sec_impl(const T v, real_type_tag) { return T(1) / std::cos(v); }
Unexecuted instantiation: double exprtk::details::numeric::details::sec_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::sec_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1315
465
            template <typename T> inline T   csc_impl(const T v, real_type_tag) { return T(1) / std::sin(v); }
double exprtk::details::numeric::details::csc_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1315
373
            template <typename T> inline T   csc_impl(const T v, real_type_tag) { return T(1) / std::sin(v); }
float exprtk::details::numeric::details::csc_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1315
92
            template <typename T> inline T   csc_impl(const T v, real_type_tag) { return T(1) / std::sin(v); }
1316
0
            template <typename T> inline T   r2d_impl(const T v, real_type_tag) { return (v * T(numeric::constant::_180_pi)); }
Unexecuted instantiation: double exprtk::details::numeric::details::r2d_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::r2d_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1317
0
            template <typename T> inline T   d2r_impl(const T v, real_type_tag) { return (v * T(numeric::constant::pi_180));  }
Unexecuted instantiation: double exprtk::details::numeric::details::d2r_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::d2r_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1318
0
            template <typename T> inline T   d2g_impl(const T v, real_type_tag) { return (v * T(10.0/9.0)); }
Unexecuted instantiation: double exprtk::details::numeric::details::d2g_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::d2g_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1319
0
            template <typename T> inline T   g2d_impl(const T v, real_type_tag) { return (v * T(9.0/10.0)); }
Unexecuted instantiation: double exprtk::details::numeric::details::g2d_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::g2d_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1320
866
            template <typename T> inline T  notl_impl(const T v, real_type_tag) { return (std::not_equal_to<T>()(T(0),v) ? T(0) : T(1)); }
double exprtk::details::numeric::details::notl_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1320
603
            template <typename T> inline T  notl_impl(const T v, real_type_tag) { return (std::not_equal_to<T>()(T(0),v) ? T(0) : T(1)); }
float exprtk::details::numeric::details::notl_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1320
263
            template <typename T> inline T  notl_impl(const T v, real_type_tag) { return (std::not_equal_to<T>()(T(0),v) ? T(0) : T(1)); }
1321
0
            template <typename T> inline T  frac_impl(const T v, real_type_tag) { return (v - static_cast<long long>(v)); }
Unexecuted instantiation: double exprtk::details::numeric::details::frac_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Unexecuted instantiation: float exprtk::details::numeric::details::frac_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
1322
100k
            template <typename T> inline T trunc_impl(const T v, real_type_tag) { return T(static_cast<long long>(v));    }
double exprtk::details::numeric::details::trunc_impl<double>(double, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1322
30
            template <typename T> inline T trunc_impl(const T v, real_type_tag) { return T(static_cast<long long>(v));    }
float exprtk::details::numeric::details::trunc_impl<float>(float, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1322
100k
            template <typename T> inline T trunc_impl(const T v, real_type_tag) { return T(static_cast<long long>(v));    }
1323
1324
2
            template <typename T> inline T   const_pi_impl(real_type_tag) { return T(numeric::constant::pi);            }
double exprtk::details::numeric::details::const_pi_impl<double>(exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1324
1
            template <typename T> inline T   const_pi_impl(real_type_tag) { return T(numeric::constant::pi);            }
float exprtk::details::numeric::details::const_pi_impl<float>(exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1324
1
            template <typename T> inline T   const_pi_impl(real_type_tag) { return T(numeric::constant::pi);            }
1325
            template <typename T> inline T    const_e_impl(real_type_tag) { return T(numeric::constant::e);             }
1326
            template <typename T> inline T const_qnan_impl(real_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1327
1328
            template <typename T> inline T   abs_impl(const T v, int_type_tag) { return ((v >= T(0)) ? v : -v); }
1329
            template <typename T> inline T   exp_impl(const T v, int_type_tag) { return std::exp  (v); }
1330
            template <typename T> inline T   log_impl(const T v, int_type_tag) { return std::log  (v); }
1331
            template <typename T> inline T log10_impl(const T v, int_type_tag) { return std::log10(v); }
1332
            template <typename T> inline T  log2_impl(const T v, int_type_tag) { return std::log(v)/T(numeric::constant::log2); }
1333
            template <typename T> inline T   neg_impl(const T v, int_type_tag) { return -v;            }
1334
            template <typename T> inline T   pos_impl(const T v, int_type_tag) { return +v;            }
1335
            template <typename T> inline T  ceil_impl(const T v, int_type_tag) { return v;             }
1336
            template <typename T> inline T floor_impl(const T v, int_type_tag) { return v;             }
1337
            template <typename T> inline T round_impl(const T v, int_type_tag) { return v;             }
1338
            template <typename T> inline T  notl_impl(const T v, int_type_tag) { return !v;            }
1339
            template <typename T> inline T  sqrt_impl(const T v, int_type_tag) { return std::sqrt (v); }
1340
            template <typename T> inline T  frac_impl(const T  , int_type_tag) { return T(0);          }
1341
            template <typename T> inline T trunc_impl(const T v, int_type_tag) { return v;             }
1342
            template <typename T> inline T  acos_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1343
            template <typename T> inline T acosh_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1344
            template <typename T> inline T  asin_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1345
            template <typename T> inline T asinh_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1346
            template <typename T> inline T  atan_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1347
            template <typename T> inline T atanh_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1348
            template <typename T> inline T   cos_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1349
            template <typename T> inline T  cosh_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1350
            template <typename T> inline T   sin_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1351
            template <typename T> inline T  sinh_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1352
            template <typename T> inline T   tan_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1353
            template <typename T> inline T  tanh_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1354
            template <typename T> inline T   cot_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1355
            template <typename T> inline T   sec_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1356
            template <typename T> inline T   csc_impl(const T  , int_type_tag) { return std::numeric_limits<T>::quiet_NaN(); }
1357
1358
            template <typename T>
1359
            inline bool is_integer_impl(const T& v, real_type_tag)
1360
249k
            {
1361
249k
               return std::equal_to<T>()(T(0),std::fmod(v,T(1)));
1362
249k
            }
bool exprtk::details::numeric::details::is_integer_impl<double>(double const&, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1360
128k
            {
1361
128k
               return std::equal_to<T>()(T(0),std::fmod(v,T(1)));
1362
128k
            }
bool exprtk::details::numeric::details::is_integer_impl<float>(float const&, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1360
121k
            {
1361
121k
               return std::equal_to<T>()(T(0),std::fmod(v,T(1)));
1362
121k
            }
1363
1364
            template <typename T>
1365
            inline bool is_integer_impl(const T&, int_type_tag)
1366
            {
1367
               return true;
1368
            }
1369
         }
1370
1371
         template <typename Type>
1372
         struct numeric_info { enum { length = 0, size = 32, bound_length = 0, min_exp = 0, max_exp = 0 }; };
1373
1374
         template <> struct numeric_info<int        > { enum { length = 10, size = 16, bound_length = 9 }; };
1375
         template <> struct numeric_info<float      > { enum { min_exp =  -38, max_exp =  +38 }; };
1376
         template <> struct numeric_info<double     > { enum { min_exp = -308, max_exp = +308 }; };
1377
         template <> struct numeric_info<long double> { enum { min_exp = -308, max_exp = +308 }; };
1378
1379
         template <typename T>
1380
         inline int to_int32(const T v)
1381
240k
         {
1382
240k
            const typename details::number_type<T>::type num_type;
1383
240k
            return to_int32_impl(v, num_type);
1384
240k
         }
int exprtk::details::numeric::to_int32<double>(double)
Line
Count
Source
1381
123k
         {
1382
123k
            const typename details::number_type<T>::type num_type;
1383
123k
            return to_int32_impl(v, num_type);
1384
123k
         }
int exprtk::details::numeric::to_int32<float>(float)
Line
Count
Source
1381
116k
         {
1382
116k
            const typename details::number_type<T>::type num_type;
1383
116k
            return to_int32_impl(v, num_type);
1384
116k
         }
1385
1386
         template <typename T>
1387
         inline _int64_t to_int64(const T v)
1388
292
         {
1389
292
            const typename details::number_type<T>::type num_type;
1390
292
            return to_int64_impl(v, num_type);
1391
292
         }
long long exprtk::details::numeric::to_int64<double>(double)
Line
Count
Source
1388
146
         {
1389
146
            const typename details::number_type<T>::type num_type;
1390
146
            return to_int64_impl(v, num_type);
1391
146
         }
long long exprtk::details::numeric::to_int64<float>(float)
Line
Count
Source
1388
146
         {
1389
146
            const typename details::number_type<T>::type num_type;
1390
146
            return to_int64_impl(v, num_type);
1391
146
         }
1392
1393
         template <typename T>
1394
         inline bool is_nan(const T v)
1395
400k
         {
1396
400k
            const typename details::number_type<T>::type num_type;
1397
400k
            return is_nan_impl(v, num_type);
1398
400k
         }
bool exprtk::details::numeric::is_nan<double>(double)
Line
Count
Source
1395
200k
         {
1396
200k
            const typename details::number_type<T>::type num_type;
1397
200k
            return is_nan_impl(v, num_type);
1398
200k
         }
bool exprtk::details::numeric::is_nan<float>(float)
Line
Count
Source
1395
200k
         {
1396
200k
            const typename details::number_type<T>::type num_type;
1397
200k
            return is_nan_impl(v, num_type);
1398
200k
         }
1399
1400
         template <typename T>
1401
         inline T min(const T v0, const T v1)
1402
         {
1403
            const typename details::number_type<T>::type num_type;
1404
            return min_impl(v0, v1, num_type);
1405
         }
1406
1407
         template <typename T>
1408
         inline T max(const T v0, const T v1)
1409
         {
1410
            const typename details::number_type<T>::type num_type;
1411
            return max_impl(v0, v1, num_type);
1412
         }
1413
1414
         template <typename T>
1415
         inline T equal(const T v0, const T v1)
1416
0
         {
1417
0
            const typename details::number_type<T>::type num_type;
1418
0
            return equal_impl(v0, v1, num_type);
1419
0
         }
Unexecuted instantiation: double exprtk::details::numeric::equal<double>(double, double)
Unexecuted instantiation: float exprtk::details::numeric::equal<float>(float, float)
1420
1421
         template <typename T>
1422
         inline T nequal(const T v0, const T v1)
1423
0
         {
1424
0
            const typename details::number_type<T>::type num_type;
1425
0
            return nequal_impl(v0, v1, num_type);
1426
0
         }
Unexecuted instantiation: double exprtk::details::numeric::nequal<double>(double, double)
Unexecuted instantiation: float exprtk::details::numeric::nequal<float>(float, float)
1427
1428
         template <typename T>
1429
         inline T modulus(const T v0, const T v1)
1430
218M
         {
1431
218M
            const typename details::number_type<T>::type num_type;
1432
218M
            return modulus_impl(v0, v1, num_type);
1433
218M
         }
double exprtk::details::numeric::modulus<double>(double, double)
Line
Count
Source
1430
111M
         {
1431
111M
            const typename details::number_type<T>::type num_type;
1432
111M
            return modulus_impl(v0, v1, num_type);
1433
111M
         }
float exprtk::details::numeric::modulus<float>(float, float)
Line
Count
Source
1430
106M
         {
1431
106M
            const typename details::number_type<T>::type num_type;
1432
106M
            return modulus_impl(v0, v1, num_type);
1433
106M
         }
1434
1435
         template <typename T>
1436
         inline T pow(const T v0, const T v1)
1437
163M
         {
1438
163M
            const typename details::number_type<T>::type num_type;
1439
163M
            return pow_impl(v0, v1, num_type);
1440
163M
         }
double exprtk::details::numeric::pow<double>(double, double)
Line
Count
Source
1437
82.7M
         {
1438
82.7M
            const typename details::number_type<T>::type num_type;
1439
82.7M
            return pow_impl(v0, v1, num_type);
1440
82.7M
         }
float exprtk::details::numeric::pow<float>(float, float)
Line
Count
Source
1437
80.5M
         {
1438
80.5M
            const typename details::number_type<T>::type num_type;
1439
80.5M
            return pow_impl(v0, v1, num_type);
1440
80.5M
         }
1441
1442
         template <typename T>
1443
         inline T logn(const T v0, const T v1)
1444
0
         {
1445
0
            const typename details::number_type<T>::type num_type;
1446
0
            return logn_impl(v0, v1, num_type);
1447
0
         }
Unexecuted instantiation: double exprtk::details::numeric::logn<double>(double, double)
Unexecuted instantiation: float exprtk::details::numeric::logn<float>(float, float)
1448
1449
         template <typename T>
1450
         inline T root(const T v0, const T v1)
1451
0
         {
1452
0
            const typename details::number_type<T>::type num_type;
1453
0
            return root_impl(v0, v1, num_type);
1454
0
         }
Unexecuted instantiation: double exprtk::details::numeric::root<double>(double, double)
Unexecuted instantiation: float exprtk::details::numeric::root<float>(float, float)
1455
1456
         template <typename T>
1457
         inline T roundn(const T v0, const T v1)
1458
0
         {
1459
0
            const typename details::number_type<T>::type num_type;
1460
0
            return roundn_impl(v0, v1, num_type);
1461
0
         }
Unexecuted instantiation: double exprtk::details::numeric::roundn<double>(double, double)
Unexecuted instantiation: float exprtk::details::numeric::roundn<float>(float, float)
1462
1463
         template <typename T>
1464
         inline T hypot(const T v0, const T v1)
1465
0
         {
1466
0
            const typename details::number_type<T>::type num_type;
1467
0
            return hypot_impl(v0, v1, num_type);
1468
0
         }
Unexecuted instantiation: double exprtk::details::numeric::hypot<double>(double, double)
Unexecuted instantiation: float exprtk::details::numeric::hypot<float>(float, float)
1469
1470
         template <typename T>
1471
         inline T atan2(const T v0, const T v1)
1472
0
         {
1473
0
            const typename details::number_type<T>::type num_type;
1474
0
            return atan2_impl(v0, v1, num_type);
1475
0
         }
Unexecuted instantiation: double exprtk::details::numeric::atan2<double>(double, double)
Unexecuted instantiation: float exprtk::details::numeric::atan2<float>(float, float)
1476
1477
         template <typename T>
1478
         inline T shr(const T v0, const T v1)
1479
0
         {
1480
0
            const typename details::number_type<T>::type num_type;
1481
0
            return shr_impl(v0, v1, num_type);
1482
0
         }
Unexecuted instantiation: double exprtk::details::numeric::shr<double>(double, double)
Unexecuted instantiation: float exprtk::details::numeric::shr<float>(float, float)
1483
1484
         template <typename T>
1485
         inline T shl(const T v0, const T v1)
1486
0
         {
1487
0
            const typename details::number_type<T>::type num_type;
1488
0
            return shl_impl(v0, v1, num_type);
1489
0
         }
Unexecuted instantiation: double exprtk::details::numeric::shl<double>(double, double)
Unexecuted instantiation: float exprtk::details::numeric::shl<float>(float, float)
1490
1491
         template <typename T>
1492
         inline T and_opr(const T v0, const T v1)
1493
3.73k
         {
1494
3.73k
            const typename details::number_type<T>::type num_type;
1495
3.73k
            return and_impl(v0, v1, num_type);
1496
3.73k
         }
double exprtk::details::numeric::and_opr<double>(double, double)
Line
Count
Source
1493
1.87k
         {
1494
1.87k
            const typename details::number_type<T>::type num_type;
1495
1.87k
            return and_impl(v0, v1, num_type);
1496
1.87k
         }
float exprtk::details::numeric::and_opr<float>(float, float)
Line
Count
Source
1493
1.86k
         {
1494
1.86k
            const typename details::number_type<T>::type num_type;
1495
1.86k
            return and_impl(v0, v1, num_type);
1496
1.86k
         }
1497
1498
         template <typename T>
1499
         inline T nand_opr(const T v0, const T v1)
1500
1.04k
         {
1501
1.04k
            const typename details::number_type<T>::type num_type;
1502
1.04k
            return nand_impl(v0, v1, num_type);
1503
1.04k
         }
double exprtk::details::numeric::nand_opr<double>(double, double)
Line
Count
Source
1500
525
         {
1501
525
            const typename details::number_type<T>::type num_type;
1502
525
            return nand_impl(v0, v1, num_type);
1503
525
         }
float exprtk::details::numeric::nand_opr<float>(float, float)
Line
Count
Source
1500
523
         {
1501
523
            const typename details::number_type<T>::type num_type;
1502
523
            return nand_impl(v0, v1, num_type);
1503
523
         }
1504
1505
         template <typename T>
1506
         inline T or_opr(const T v0, const T v1)
1507
16
         {
1508
16
            const typename details::number_type<T>::type num_type;
1509
16
            return or_impl(v0, v1, num_type);
1510
16
         }
double exprtk::details::numeric::or_opr<double>(double, double)
Line
Count
Source
1507
8
         {
1508
8
            const typename details::number_type<T>::type num_type;
1509
8
            return or_impl(v0, v1, num_type);
1510
8
         }
float exprtk::details::numeric::or_opr<float>(float, float)
Line
Count
Source
1507
8
         {
1508
8
            const typename details::number_type<T>::type num_type;
1509
8
            return or_impl(v0, v1, num_type);
1510
8
         }
1511
1512
         template <typename T>
1513
         inline T nor_opr(const T v0, const T v1)
1514
412
         {
1515
412
            const typename details::number_type<T>::type num_type;
1516
412
            return nor_impl(v0, v1, num_type);
1517
412
         }
double exprtk::details::numeric::nor_opr<double>(double, double)
Line
Count
Source
1514
206
         {
1515
206
            const typename details::number_type<T>::type num_type;
1516
206
            return nor_impl(v0, v1, num_type);
1517
206
         }
float exprtk::details::numeric::nor_opr<float>(float, float)
Line
Count
Source
1514
206
         {
1515
206
            const typename details::number_type<T>::type num_type;
1516
206
            return nor_impl(v0, v1, num_type);
1517
206
         }
1518
1519
         template <typename T>
1520
         inline T xor_opr(const T v0, const T v1)
1521
62.4M
         {
1522
62.4M
            const typename details::number_type<T>::type num_type;
1523
62.4M
            return xor_impl(v0, v1, num_type);
1524
62.4M
         }
double exprtk::details::numeric::xor_opr<double>(double, double)
Line
Count
Source
1521
31.3M
         {
1522
31.3M
            const typename details::number_type<T>::type num_type;
1523
31.3M
            return xor_impl(v0, v1, num_type);
1524
31.3M
         }
float exprtk::details::numeric::xor_opr<float>(float, float)
Line
Count
Source
1521
31.0M
         {
1522
31.0M
            const typename details::number_type<T>::type num_type;
1523
31.0M
            return xor_impl(v0, v1, num_type);
1524
31.0M
         }
1525
1526
         template <typename T>
1527
         inline T xnor_opr(const T v0, const T v1)
1528
57.9M
         {
1529
57.9M
            const typename details::number_type<T>::type num_type;
1530
57.9M
            return xnor_impl(v0, v1, num_type);
1531
57.9M
         }
double exprtk::details::numeric::xnor_opr<double>(double, double)
Line
Count
Source
1528
29.2M
         {
1529
29.2M
            const typename details::number_type<T>::type num_type;
1530
29.2M
            return xnor_impl(v0, v1, num_type);
1531
29.2M
         }
float exprtk::details::numeric::xnor_opr<float>(float, float)
Line
Count
Source
1528
28.6M
         {
1529
28.6M
            const typename details::number_type<T>::type num_type;
1530
28.6M
            return xnor_impl(v0, v1, num_type);
1531
28.6M
         }
1532
1533
         template <typename T>
1534
         inline bool is_integer(const T v)
1535
249k
         {
1536
249k
            const typename details::number_type<T>::type num_type;
1537
249k
            return is_integer_impl(v, num_type);
1538
249k
         }
bool exprtk::details::numeric::is_integer<double>(double)
Line
Count
Source
1535
128k
         {
1536
128k
            const typename details::number_type<T>::type num_type;
1537
128k
            return is_integer_impl(v, num_type);
1538
128k
         }
bool exprtk::details::numeric::is_integer<float>(float)
Line
Count
Source
1535
121k
         {
1536
121k
            const typename details::number_type<T>::type num_type;
1537
121k
            return is_integer_impl(v, num_type);
1538
121k
         }
1539
1540
         template <typename T, unsigned int N>
1541
         struct fast_exp
1542
         {
1543
            static inline T result(T v)
1544
303M
            {
1545
303M
               unsigned int k = N;
1546
303M
               T l = T(1);
1547
1548
2.01G
               while (k)
1549
1.71G
               {
1550
1.71G
                  if (1 == (k % 2))
1551
991M
                  {
1552
991M
                     l *= v;
1553
991M
                     --k;
1554
991M
                  }
1555
1556
1.71G
                  v *= v;
1557
1.71G
                  k /= 2;
1558
1.71G
               }
1559
1560
303M
               return l;
1561
303M
            }
exprtk::details::numeric::fast_exp<double, 11u>::result(double)
Line
Count
Source
1544
10.9M
            {
1545
10.9M
               unsigned int k = N;
1546
10.9M
               T l = T(1);
1547
1548
54.5M
               while (k)
1549
43.6M
               {
1550
43.6M
                  if (1 == (k % 2))
1551
32.7M
                  {
1552
32.7M
                     l *= v;
1553
32.7M
                     --k;
1554
32.7M
                  }
1555
1556
43.6M
                  v *= v;
1557
43.6M
                  k /= 2;
1558
43.6M
               }
1559
1560
10.9M
               return l;
1561
10.9M
            }
exprtk::details::numeric::fast_exp<double, 12u>::result(double)
Line
Count
Source
1544
300k
            {
1545
300k
               unsigned int k = N;
1546
300k
               T l = T(1);
1547
1548
1.50M
               while (k)
1549
1.20M
               {
1550
1.20M
                  if (1 == (k % 2))
1551
600k
                  {
1552
600k
                     l *= v;
1553
600k
                     --k;
1554
600k
                  }
1555
1556
1.20M
                  v *= v;
1557
1.20M
                  k /= 2;
1558
1.20M
               }
1559
1560
300k
               return l;
1561
300k
            }
exprtk::details::numeric::fast_exp<double, 13u>::result(double)
Line
Count
Source
1544
1.10M
            {
1545
1.10M
               unsigned int k = N;
1546
1.10M
               T l = T(1);
1547
1548
5.52M
               while (k)
1549
4.42M
               {
1550
4.42M
                  if (1 == (k % 2))
1551
3.31M
                  {
1552
3.31M
                     l *= v;
1553
3.31M
                     --k;
1554
3.31M
                  }
1555
1556
4.42M
                  v *= v;
1557
4.42M
                  k /= 2;
1558
4.42M
               }
1559
1560
1.10M
               return l;
1561
1.10M
            }
exprtk::details::numeric::fast_exp<double, 14u>::result(double)
Line
Count
Source
1544
3.40M
            {
1545
3.40M
               unsigned int k = N;
1546
3.40M
               T l = T(1);
1547
1548
17.0M
               while (k)
1549
13.6M
               {
1550
13.6M
                  if (1 == (k % 2))
1551
10.2M
                  {
1552
10.2M
                     l *= v;
1553
10.2M
                     --k;
1554
10.2M
                  }
1555
1556
13.6M
                  v *= v;
1557
13.6M
                  k /= 2;
1558
13.6M
               }
1559
1560
3.40M
               return l;
1561
3.40M
            }
exprtk::details::numeric::fast_exp<double, 15u>::result(double)
Line
Count
Source
1544
884k
            {
1545
884k
               unsigned int k = N;
1546
884k
               T l = T(1);
1547
1548
4.42M
               while (k)
1549
3.53M
               {
1550
3.53M
                  if (1 == (k % 2))
1551
3.53M
                  {
1552
3.53M
                     l *= v;
1553
3.53M
                     --k;
1554
3.53M
                  }
1555
1556
3.53M
                  v *= v;
1557
3.53M
                  k /= 2;
1558
3.53M
               }
1559
1560
884k
               return l;
1561
884k
            }
exprtk::details::numeric::fast_exp<double, 16u>::result(double)
Line
Count
Source
1544
1.00M
            {
1545
1.00M
               unsigned int k = N;
1546
1.00M
               T l = T(1);
1547
1548
6.00M
               while (k)
1549
5.00M
               {
1550
5.00M
                  if (1 == (k % 2))
1551
1.00M
                  {
1552
1.00M
                     l *= v;
1553
1.00M
                     --k;
1554
1.00M
                  }
1555
1556
5.00M
                  v *= v;
1557
5.00M
                  k /= 2;
1558
5.00M
               }
1559
1560
1.00M
               return l;
1561
1.00M
            }
exprtk::details::numeric::fast_exp<double, 17u>::result(double)
Line
Count
Source
1544
3.50M
            {
1545
3.50M
               unsigned int k = N;
1546
3.50M
               T l = T(1);
1547
1548
21.0M
               while (k)
1549
17.5M
               {
1550
17.5M
                  if (1 == (k % 2))
1551
7.00M
                  {
1552
7.00M
                     l *= v;
1553
7.00M
                     --k;
1554
7.00M
                  }
1555
1556
17.5M
                  v *= v;
1557
17.5M
                  k /= 2;
1558
17.5M
               }
1559
1560
3.50M
               return l;
1561
3.50M
            }
exprtk::details::numeric::fast_exp<double, 18u>::result(double)
Line
Count
Source
1544
500k
            {
1545
500k
               unsigned int k = N;
1546
500k
               T l = T(1);
1547
1548
3.00M
               while (k)
1549
2.50M
               {
1550
2.50M
                  if (1 == (k % 2))
1551
1.00M
                  {
1552
1.00M
                     l *= v;
1553
1.00M
                     --k;
1554
1.00M
                  }
1555
1556
2.50M
                  v *= v;
1557
2.50M
                  k /= 2;
1558
2.50M
               }
1559
1560
500k
               return l;
1561
500k
            }
exprtk::details::numeric::fast_exp<double, 19u>::result(double)
Line
Count
Source
1544
807k
            {
1545
807k
               unsigned int k = N;
1546
807k
               T l = T(1);
1547
1548
4.84M
               while (k)
1549
4.03M
               {
1550
4.03M
                  if (1 == (k % 2))
1551
2.42M
                  {
1552
2.42M
                     l *= v;
1553
2.42M
                     --k;
1554
2.42M
                  }
1555
1556
4.03M
                  v *= v;
1557
4.03M
                  k /= 2;
1558
4.03M
               }
1559
1560
807k
               return l;
1561
807k
            }
exprtk::details::numeric::fast_exp<double, 20u>::result(double)
Line
Count
Source
1544
801k
            {
1545
801k
               unsigned int k = N;
1546
801k
               T l = T(1);
1547
1548
4.80M
               while (k)
1549
4.00M
               {
1550
4.00M
                  if (1 == (k % 2))
1551
1.60M
                  {
1552
1.60M
                     l *= v;
1553
1.60M
                     --k;
1554
1.60M
                  }
1555
1556
4.00M
                  v *= v;
1557
4.00M
                  k /= 2;
1558
4.00M
               }
1559
1560
801k
               return l;
1561
801k
            }
exprtk::details::numeric::fast_exp<double, 21u>::result(double)
Line
Count
Source
1544
2.60M
            {
1545
2.60M
               unsigned int k = N;
1546
2.60M
               T l = T(1);
1547
1548
15.6M
               while (k)
1549
13.0M
               {
1550
13.0M
                  if (1 == (k % 2))
1551
7.81M
                  {
1552
7.81M
                     l *= v;
1553
7.81M
                     --k;
1554
7.81M
                  }
1555
1556
13.0M
                  v *= v;
1557
13.0M
                  k /= 2;
1558
13.0M
               }
1559
1560
2.60M
               return l;
1561
2.60M
            }
exprtk::details::numeric::fast_exp<double, 22u>::result(double)
Line
Count
Source
1544
801k
            {
1545
801k
               unsigned int k = N;
1546
801k
               T l = T(1);
1547
1548
4.80M
               while (k)
1549
4.00M
               {
1550
4.00M
                  if (1 == (k % 2))
1551
2.40M
                  {
1552
2.40M
                     l *= v;
1553
2.40M
                     --k;
1554
2.40M
                  }
1555
1556
4.00M
                  v *= v;
1557
4.00M
                  k /= 2;
1558
4.00M
               }
1559
1560
801k
               return l;
1561
801k
            }
exprtk::details::numeric::fast_exp<double, 23u>::result(double)
Line
Count
Source
1544
800k
            {
1545
800k
               unsigned int k = N;
1546
800k
               T l = T(1);
1547
1548
4.80M
               while (k)
1549
4.00M
               {
1550
4.00M
                  if (1 == (k % 2))
1551
3.20M
                  {
1552
3.20M
                     l *= v;
1553
3.20M
                     --k;
1554
3.20M
                  }
1555
1556
4.00M
                  v *= v;
1557
4.00M
                  k /= 2;
1558
4.00M
               }
1559
1560
800k
               return l;
1561
800k
            }
exprtk::details::numeric::fast_exp<double, 24u>::result(double)
Line
Count
Source
1544
1.40M
            {
1545
1.40M
               unsigned int k = N;
1546
1.40M
               T l = T(1);
1547
1548
8.42M
               while (k)
1549
7.02M
               {
1550
7.02M
                  if (1 == (k % 2))
1551
2.80M
                  {
1552
2.80M
                     l *= v;
1553
2.80M
                     --k;
1554
2.80M
                  }
1555
1556
7.02M
                  v *= v;
1557
7.02M
                  k /= 2;
1558
7.02M
               }
1559
1560
1.40M
               return l;
1561
1.40M
            }
exprtk::details::numeric::fast_exp<double, 25u>::result(double)
Line
Count
Source
1544
1.60M
            {
1545
1.60M
               unsigned int k = N;
1546
1.60M
               T l = T(1);
1547
1548
9.60M
               while (k)
1549
8.00M
               {
1550
8.00M
                  if (1 == (k % 2))
1551
4.80M
                  {
1552
4.80M
                     l *= v;
1553
4.80M
                     --k;
1554
4.80M
                  }
1555
1556
8.00M
                  v *= v;
1557
8.00M
                  k /= 2;
1558
8.00M
               }
1559
1560
1.60M
               return l;
1561
1.60M
            }
exprtk::details::numeric::fast_exp<double, 26u>::result(double)
Line
Count
Source
1544
1.30M
            {
1545
1.30M
               unsigned int k = N;
1546
1.30M
               T l = T(1);
1547
1548
7.80M
               while (k)
1549
6.50M
               {
1550
6.50M
                  if (1 == (k % 2))
1551
3.90M
                  {
1552
3.90M
                     l *= v;
1553
3.90M
                     --k;
1554
3.90M
                  }
1555
1556
6.50M
                  v *= v;
1557
6.50M
                  k /= 2;
1558
6.50M
               }
1559
1560
1.30M
               return l;
1561
1.30M
            }
exprtk::details::numeric::fast_exp<double, 27u>::result(double)
Line
Count
Source
1544
601k
            {
1545
601k
               unsigned int k = N;
1546
601k
               T l = T(1);
1547
1548
3.60M
               while (k)
1549
3.00M
               {
1550
3.00M
                  if (1 == (k % 2))
1551
2.40M
                  {
1552
2.40M
                     l *= v;
1553
2.40M
                     --k;
1554
2.40M
                  }
1555
1556
3.00M
                  v *= v;
1557
3.00M
                  k /= 2;
1558
3.00M
               }
1559
1560
601k
               return l;
1561
601k
            }
exprtk::details::numeric::fast_exp<double, 28u>::result(double)
Line
Count
Source
1544
1.00M
            {
1545
1.00M
               unsigned int k = N;
1546
1.00M
               T l = T(1);
1547
1548
6.01M
               while (k)
1549
5.00M
               {
1550
5.00M
                  if (1 == (k % 2))
1551
3.00M
                  {
1552
3.00M
                     l *= v;
1553
3.00M
                     --k;
1554
3.00M
                  }
1555
1556
5.00M
                  v *= v;
1557
5.00M
                  k /= 2;
1558
5.00M
               }
1559
1560
1.00M
               return l;
1561
1.00M
            }
exprtk::details::numeric::fast_exp<double, 29u>::result(double)
Line
Count
Source
1544
1.80M
            {
1545
1.80M
               unsigned int k = N;
1546
1.80M
               T l = T(1);
1547
1548
10.8M
               while (k)
1549
9.02M
               {
1550
9.02M
                  if (1 == (k % 2))
1551
7.21M
                  {
1552
7.21M
                     l *= v;
1553
7.21M
                     --k;
1554
7.21M
                  }
1555
1556
9.02M
                  v *= v;
1557
9.02M
                  k /= 2;
1558
9.02M
               }
1559
1560
1.80M
               return l;
1561
1.80M
            }
exprtk::details::numeric::fast_exp<double, 30u>::result(double)
Line
Count
Source
1544
1.30M
            {
1545
1.30M
               unsigned int k = N;
1546
1.30M
               T l = T(1);
1547
1548
7.80M
               while (k)
1549
6.50M
               {
1550
6.50M
                  if (1 == (k % 2))
1551
5.20M
                  {
1552
5.20M
                     l *= v;
1553
5.20M
                     --k;
1554
5.20M
                  }
1555
1556
6.50M
                  v *= v;
1557
6.50M
                  k /= 2;
1558
6.50M
               }
1559
1560
1.30M
               return l;
1561
1.30M
            }
exprtk::details::numeric::fast_exp<double, 31u>::result(double)
Line
Count
Source
1544
1.40M
            {
1545
1.40M
               unsigned int k = N;
1546
1.40M
               T l = T(1);
1547
1548
8.44M
               while (k)
1549
7.03M
               {
1550
7.03M
                  if (1 == (k % 2))
1551
7.03M
                  {
1552
7.03M
                     l *= v;
1553
7.03M
                     --k;
1554
7.03M
                  }
1555
1556
7.03M
                  v *= v;
1557
7.03M
                  k /= 2;
1558
7.03M
               }
1559
1560
1.40M
               return l;
1561
1.40M
            }
exprtk::details::numeric::fast_exp<double, 32u>::result(double)
Line
Count
Source
1544
3.07M
            {
1545
3.07M
               unsigned int k = N;
1546
3.07M
               T l = T(1);
1547
1548
21.5M
               while (k)
1549
18.4M
               {
1550
18.4M
                  if (1 == (k % 2))
1551
3.07M
                  {
1552
3.07M
                     l *= v;
1553
3.07M
                     --k;
1554
3.07M
                  }
1555
1556
18.4M
                  v *= v;
1557
18.4M
                  k /= 2;
1558
18.4M
               }
1559
1560
3.07M
               return l;
1561
3.07M
            }
exprtk::details::numeric::fast_exp<double, 33u>::result(double)
Line
Count
Source
1544
4.00M
            {
1545
4.00M
               unsigned int k = N;
1546
4.00M
               T l = T(1);
1547
1548
28.0M
               while (k)
1549
24.0M
               {
1550
24.0M
                  if (1 == (k % 2))
1551
8.00M
                  {
1552
8.00M
                     l *= v;
1553
8.00M
                     --k;
1554
8.00M
                  }
1555
1556
24.0M
                  v *= v;
1557
24.0M
                  k /= 2;
1558
24.0M
               }
1559
1560
4.00M
               return l;
1561
4.00M
            }
exprtk::details::numeric::fast_exp<double, 34u>::result(double)
Line
Count
Source
1544
2.26M
            {
1545
2.26M
               unsigned int k = N;
1546
2.26M
               T l = T(1);
1547
1548
15.8M
               while (k)
1549
13.5M
               {
1550
13.5M
                  if (1 == (k % 2))
1551
4.53M
                  {
1552
4.53M
                     l *= v;
1553
4.53M
                     --k;
1554
4.53M
                  }
1555
1556
13.5M
                  v *= v;
1557
13.5M
                  k /= 2;
1558
13.5M
               }
1559
1560
2.26M
               return l;
1561
2.26M
            }
exprtk::details::numeric::fast_exp<double, 35u>::result(double)
Line
Count
Source
1544
1.70M
            {
1545
1.70M
               unsigned int k = N;
1546
1.70M
               T l = T(1);
1547
1548
11.9M
               while (k)
1549
10.2M
               {
1550
10.2M
                  if (1 == (k % 2))
1551
5.10M
                  {
1552
5.10M
                     l *= v;
1553
5.10M
                     --k;
1554
5.10M
                  }
1555
1556
10.2M
                  v *= v;
1557
10.2M
                  k /= 2;
1558
10.2M
               }
1559
1560
1.70M
               return l;
1561
1.70M
            }
exprtk::details::numeric::fast_exp<double, 36u>::result(double)
Line
Count
Source
1544
2.70M
            {
1545
2.70M
               unsigned int k = N;
1546
2.70M
               T l = T(1);
1547
1548
18.9M
               while (k)
1549
16.2M
               {
1550
16.2M
                  if (1 == (k % 2))
1551
5.40M
                  {
1552
5.40M
                     l *= v;
1553
5.40M
                     --k;
1554
5.40M
                  }
1555
1556
16.2M
                  v *= v;
1557
16.2M
                  k /= 2;
1558
16.2M
               }
1559
1560
2.70M
               return l;
1561
2.70M
            }
exprtk::details::numeric::fast_exp<double, 37u>::result(double)
Line
Count
Source
1544
11.5M
            {
1545
11.5M
               unsigned int k = N;
1546
11.5M
               T l = T(1);
1547
1548
80.5M
               while (k)
1549
69.0M
               {
1550
69.0M
                  if (1 == (k % 2))
1551
34.5M
                  {
1552
34.5M
                     l *= v;
1553
34.5M
                     --k;
1554
34.5M
                  }
1555
1556
69.0M
                  v *= v;
1557
69.0M
                  k /= 2;
1558
69.0M
               }
1559
1560
11.5M
               return l;
1561
11.5M
            }
exprtk::details::numeric::fast_exp<double, 38u>::result(double)
Line
Count
Source
1544
7.40M
            {
1545
7.40M
               unsigned int k = N;
1546
7.40M
               T l = T(1);
1547
1548
51.8M
               while (k)
1549
44.4M
               {
1550
44.4M
                  if (1 == (k % 2))
1551
22.2M
                  {
1552
22.2M
                     l *= v;
1553
22.2M
                     --k;
1554
22.2M
                  }
1555
1556
44.4M
                  v *= v;
1557
44.4M
                  k /= 2;
1558
44.4M
               }
1559
1560
7.40M
               return l;
1561
7.40M
            }
exprtk::details::numeric::fast_exp<double, 39u>::result(double)
Line
Count
Source
1544
1.16M
            {
1545
1.16M
               unsigned int k = N;
1546
1.16M
               T l = T(1);
1547
1548
8.13M
               while (k)
1549
6.97M
               {
1550
6.97M
                  if (1 == (k % 2))
1551
4.64M
                  {
1552
4.64M
                     l *= v;
1553
4.64M
                     --k;
1554
4.64M
                  }
1555
1556
6.97M
                  v *= v;
1557
6.97M
                  k /= 2;
1558
6.97M
               }
1559
1560
1.16M
               return l;
1561
1.16M
            }
exprtk::details::numeric::fast_exp<double, 40u>::result(double)
Line
Count
Source
1544
1.91M
            {
1545
1.91M
               unsigned int k = N;
1546
1.91M
               T l = T(1);
1547
1548
13.3M
               while (k)
1549
11.4M
               {
1550
11.4M
                  if (1 == (k % 2))
1551
3.82M
                  {
1552
3.82M
                     l *= v;
1553
3.82M
                     --k;
1554
3.82M
                  }
1555
1556
11.4M
                  v *= v;
1557
11.4M
                  k /= 2;
1558
11.4M
               }
1559
1560
1.91M
               return l;
1561
1.91M
            }
exprtk::details::numeric::fast_exp<double, 41u>::result(double)
Line
Count
Source
1544
1.80M
            {
1545
1.80M
               unsigned int k = N;
1546
1.80M
               T l = T(1);
1547
1548
12.6M
               while (k)
1549
10.8M
               {
1550
10.8M
                  if (1 == (k % 2))
1551
5.40M
                  {
1552
5.40M
                     l *= v;
1553
5.40M
                     --k;
1554
5.40M
                  }
1555
1556
10.8M
                  v *= v;
1557
10.8M
                  k /= 2;
1558
10.8M
               }
1559
1560
1.80M
               return l;
1561
1.80M
            }
exprtk::details::numeric::fast_exp<double, 42u>::result(double)
Line
Count
Source
1544
400k
            {
1545
400k
               unsigned int k = N;
1546
400k
               T l = T(1);
1547
1548
2.80M
               while (k)
1549
2.40M
               {
1550
2.40M
                  if (1 == (k % 2))
1551
1.20M
                  {
1552
1.20M
                     l *= v;
1553
1.20M
                     --k;
1554
1.20M
                  }
1555
1556
2.40M
                  v *= v;
1557
2.40M
                  k /= 2;
1558
2.40M
               }
1559
1560
400k
               return l;
1561
400k
            }
exprtk::details::numeric::fast_exp<double, 43u>::result(double)
Line
Count
Source
1544
17.4M
            {
1545
17.4M
               unsigned int k = N;
1546
17.4M
               T l = T(1);
1547
1548
121M
               while (k)
1549
104M
               {
1550
104M
                  if (1 == (k % 2))
1551
69.6M
                  {
1552
69.6M
                     l *= v;
1553
69.6M
                     --k;
1554
69.6M
                  }
1555
1556
104M
                  v *= v;
1557
104M
                  k /= 2;
1558
104M
               }
1559
1560
17.4M
               return l;
1561
17.4M
            }
exprtk::details::numeric::fast_exp<double, 44u>::result(double)
Line
Count
Source
1544
9.60M
            {
1545
9.60M
               unsigned int k = N;
1546
9.60M
               T l = T(1);
1547
1548
67.2M
               while (k)
1549
57.6M
               {
1550
57.6M
                  if (1 == (k % 2))
1551
28.8M
                  {
1552
28.8M
                     l *= v;
1553
28.8M
                     --k;
1554
28.8M
                  }
1555
1556
57.6M
                  v *= v;
1557
57.6M
                  k /= 2;
1558
57.6M
               }
1559
1560
9.60M
               return l;
1561
9.60M
            }
exprtk::details::numeric::fast_exp<double, 45u>::result(double)
Line
Count
Source
1544
4.10M
            {
1545
4.10M
               unsigned int k = N;
1546
4.10M
               T l = T(1);
1547
1548
28.7M
               while (k)
1549
24.6M
               {
1550
24.6M
                  if (1 == (k % 2))
1551
16.4M
                  {
1552
16.4M
                     l *= v;
1553
16.4M
                     --k;
1554
16.4M
                  }
1555
1556
24.6M
                  v *= v;
1557
24.6M
                  k /= 2;
1558
24.6M
               }
1559
1560
4.10M
               return l;
1561
4.10M
            }
exprtk::details::numeric::fast_exp<double, 46u>::result(double)
Line
Count
Source
1544
1.10k
            {
1545
1.10k
               unsigned int k = N;
1546
1.10k
               T l = T(1);
1547
1548
7.75k
               while (k)
1549
6.64k
               {
1550
6.64k
                  if (1 == (k % 2))
1551
4.43k
                  {
1552
4.43k
                     l *= v;
1553
4.43k
                     --k;
1554
4.43k
                  }
1555
1556
6.64k
                  v *= v;
1557
6.64k
                  k /= 2;
1558
6.64k
               }
1559
1560
1.10k
               return l;
1561
1.10k
            }
exprtk::details::numeric::fast_exp<double, 47u>::result(double)
Line
Count
Source
1544
2.11M
            {
1545
2.11M
               unsigned int k = N;
1546
2.11M
               T l = T(1);
1547
1548
14.8M
               while (k)
1549
12.7M
               {
1550
12.7M
                  if (1 == (k % 2))
1551
10.5M
                  {
1552
10.5M
                     l *= v;
1553
10.5M
                     --k;
1554
10.5M
                  }
1555
1556
12.7M
                  v *= v;
1557
12.7M
                  k /= 2;
1558
12.7M
               }
1559
1560
2.11M
               return l;
1561
2.11M
            }
exprtk::details::numeric::fast_exp<double, 48u>::result(double)
Line
Count
Source
1544
1.10M
            {
1545
1.10M
               unsigned int k = N;
1546
1.10M
               T l = T(1);
1547
1548
7.72M
               while (k)
1549
6.62M
               {
1550
6.62M
                  if (1 == (k % 2))
1551
2.20M
                  {
1552
2.20M
                     l *= v;
1553
2.20M
                     --k;
1554
2.20M
                  }
1555
1556
6.62M
                  v *= v;
1557
6.62M
                  k /= 2;
1558
6.62M
               }
1559
1560
1.10M
               return l;
1561
1.10M
            }
exprtk::details::numeric::fast_exp<double, 49u>::result(double)
Line
Count
Source
1544
2.40M
            {
1545
2.40M
               unsigned int k = N;
1546
2.40M
               T l = T(1);
1547
1548
16.8M
               while (k)
1549
14.4M
               {
1550
14.4M
                  if (1 == (k % 2))
1551
7.21M
                  {
1552
7.21M
                     l *= v;
1553
7.21M
                     --k;
1554
7.21M
                  }
1555
1556
14.4M
                  v *= v;
1557
14.4M
                  k /= 2;
1558
14.4M
               }
1559
1560
2.40M
               return l;
1561
2.40M
            }
exprtk::details::numeric::fast_exp<double, 50u>::result(double)
Line
Count
Source
1544
1.50M
            {
1545
1.50M
               unsigned int k = N;
1546
1.50M
               T l = T(1);
1547
1548
10.5M
               while (k)
1549
9.01M
               {
1550
9.01M
                  if (1 == (k % 2))
1551
4.50M
                  {
1552
4.50M
                     l *= v;
1553
4.50M
                     --k;
1554
4.50M
                  }
1555
1556
9.01M
                  v *= v;
1557
9.01M
                  k /= 2;
1558
9.01M
               }
1559
1560
1.50M
               return l;
1561
1.50M
            }
exprtk::details::numeric::fast_exp<double, 51u>::result(double)
Line
Count
Source
1544
5.60M
            {
1545
5.60M
               unsigned int k = N;
1546
5.60M
               T l = T(1);
1547
1548
39.2M
               while (k)
1549
33.6M
               {
1550
33.6M
                  if (1 == (k % 2))
1551
22.4M
                  {
1552
22.4M
                     l *= v;
1553
22.4M
                     --k;
1554
22.4M
                  }
1555
1556
33.6M
                  v *= v;
1557
33.6M
                  k /= 2;
1558
33.6M
               }
1559
1560
5.60M
               return l;
1561
5.60M
            }
exprtk::details::numeric::fast_exp<double, 52u>::result(double)
Line
Count
Source
1544
4.30M
            {
1545
4.30M
               unsigned int k = N;
1546
4.30M
               T l = T(1);
1547
1548
30.1M
               while (k)
1549
25.8M
               {
1550
25.8M
                  if (1 == (k % 2))
1551
12.9M
                  {
1552
12.9M
                     l *= v;
1553
12.9M
                     --k;
1554
12.9M
                  }
1555
1556
25.8M
                  v *= v;
1557
25.8M
                  k /= 2;
1558
25.8M
               }
1559
1560
4.30M
               return l;
1561
4.30M
            }
exprtk::details::numeric::fast_exp<double, 53u>::result(double)
Line
Count
Source
1544
1.60M
            {
1545
1.60M
               unsigned int k = N;
1546
1.60M
               T l = T(1);
1547
1548
11.2M
               while (k)
1549
9.60M
               {
1550
9.60M
                  if (1 == (k % 2))
1551
6.40M
                  {
1552
6.40M
                     l *= v;
1553
6.40M
                     --k;
1554
6.40M
                  }
1555
1556
9.60M
                  v *= v;
1557
9.60M
                  k /= 2;
1558
9.60M
               }
1559
1560
1.60M
               return l;
1561
1.60M
            }
exprtk::details::numeric::fast_exp<double, 54u>::result(double)
Line
Count
Source
1544
6.70M
            {
1545
6.70M
               unsigned int k = N;
1546
6.70M
               T l = T(1);
1547
1548
46.9M
               while (k)
1549
40.2M
               {
1550
40.2M
                  if (1 == (k % 2))
1551
26.8M
                  {
1552
26.8M
                     l *= v;
1553
26.8M
                     --k;
1554
26.8M
                  }
1555
1556
40.2M
                  v *= v;
1557
40.2M
                  k /= 2;
1558
40.2M
               }
1559
1560
6.70M
               return l;
1561
6.70M
            }
exprtk::details::numeric::fast_exp<double, 55u>::result(double)
Line
Count
Source
1544
4.08M
            {
1545
4.08M
               unsigned int k = N;
1546
4.08M
               T l = T(1);
1547
1548
28.5M
               while (k)
1549
24.4M
               {
1550
24.4M
                  if (1 == (k % 2))
1551
20.4M
                  {
1552
20.4M
                     l *= v;
1553
20.4M
                     --k;
1554
20.4M
                  }
1555
1556
24.4M
                  v *= v;
1557
24.4M
                  k /= 2;
1558
24.4M
               }
1559
1560
4.08M
               return l;
1561
4.08M
            }
exprtk::details::numeric::fast_exp<double, 56u>::result(double)
Line
Count
Source
1544
10.3M
            {
1545
10.3M
               unsigned int k = N;
1546
10.3M
               T l = T(1);
1547
1548
72.1M
               while (k)
1549
61.8M
               {
1550
61.8M
                  if (1 == (k % 2))
1551
30.9M
                  {
1552
30.9M
                     l *= v;
1553
30.9M
                     --k;
1554
30.9M
                  }
1555
1556
61.8M
                  v *= v;
1557
61.8M
                  k /= 2;
1558
61.8M
               }
1559
1560
10.3M
               return l;
1561
10.3M
            }
exprtk::details::numeric::fast_exp<double, 57u>::result(double)
Line
Count
Source
1544
3.60M
            {
1545
3.60M
               unsigned int k = N;
1546
3.60M
               T l = T(1);
1547
1548
25.2M
               while (k)
1549
21.6M
               {
1550
21.6M
                  if (1 == (k % 2))
1551
14.4M
                  {
1552
14.4M
                     l *= v;
1553
14.4M
                     --k;
1554
14.4M
                  }
1555
1556
21.6M
                  v *= v;
1557
21.6M
                  k /= 2;
1558
21.6M
               }
1559
1560
3.60M
               return l;
1561
3.60M
            }
exprtk::details::numeric::fast_exp<double, 58u>::result(double)
Line
Count
Source
1544
1.20M
            {
1545
1.20M
               unsigned int k = N;
1546
1.20M
               T l = T(1);
1547
1548
8.42M
               while (k)
1549
7.22M
               {
1550
7.22M
                  if (1 == (k % 2))
1551
4.81M
                  {
1552
4.81M
                     l *= v;
1553
4.81M
                     --k;
1554
4.81M
                  }
1555
1556
7.22M
                  v *= v;
1557
7.22M
                  k /= 2;
1558
7.22M
               }
1559
1560
1.20M
               return l;
1561
1.20M
            }
exprtk::details::numeric::fast_exp<double, 59u>::result(double)
Line
Count
Source
1544
5.80M
            {
1545
5.80M
               unsigned int k = N;
1546
5.80M
               T l = T(1);
1547
1548
40.6M
               while (k)
1549
34.8M
               {
1550
34.8M
                  if (1 == (k % 2))
1551
29.0M
                  {
1552
29.0M
                     l *= v;
1553
29.0M
                     --k;
1554
29.0M
                  }
1555
1556
34.8M
                  v *= v;
1557
34.8M
                  k /= 2;
1558
34.8M
               }
1559
1560
5.80M
               return l;
1561
5.80M
            }
exprtk::details::numeric::fast_exp<double, 60u>::result(double)
Line
Count
Source
1544
3.80M
            {
1545
3.80M
               unsigned int k = N;
1546
3.80M
               T l = T(1);
1547
1548
26.6M
               while (k)
1549
22.8M
               {
1550
22.8M
                  if (1 == (k % 2))
1551
15.2M
                  {
1552
15.2M
                     l *= v;
1553
15.2M
                     --k;
1554
15.2M
                  }
1555
1556
22.8M
                  v *= v;
1557
22.8M
                  k /= 2;
1558
22.8M
               }
1559
1560
3.80M
               return l;
1561
3.80M
            }
exprtk::details::numeric::fast_exp<float, 11u>::result(float)
Line
Count
Source
1544
10.4M
            {
1545
10.4M
               unsigned int k = N;
1546
10.4M
               T l = T(1);
1547
1548
52.0M
               while (k)
1549
41.6M
               {
1550
41.6M
                  if (1 == (k % 2))
1551
31.2M
                  {
1552
31.2M
                     l *= v;
1553
31.2M
                     --k;
1554
31.2M
                  }
1555
1556
41.6M
                  v *= v;
1557
41.6M
                  k /= 2;
1558
41.6M
               }
1559
1560
10.4M
               return l;
1561
10.4M
            }
exprtk::details::numeric::fast_exp<float, 12u>::result(float)
Line
Count
Source
1544
300k
            {
1545
300k
               unsigned int k = N;
1546
300k
               T l = T(1);
1547
1548
1.50M
               while (k)
1549
1.20M
               {
1550
1.20M
                  if (1 == (k % 2))
1551
600k
                  {
1552
600k
                     l *= v;
1553
600k
                     --k;
1554
600k
                  }
1555
1556
1.20M
                  v *= v;
1557
1.20M
                  k /= 2;
1558
1.20M
               }
1559
1560
300k
               return l;
1561
300k
            }
exprtk::details::numeric::fast_exp<float, 13u>::result(float)
Line
Count
Source
1544
2.00M
            {
1545
2.00M
               unsigned int k = N;
1546
2.00M
               T l = T(1);
1547
1548
10.0M
               while (k)
1549
8.00M
               {
1550
8.00M
                  if (1 == (k % 2))
1551
6.00M
                  {
1552
6.00M
                     l *= v;
1553
6.00M
                     --k;
1554
6.00M
                  }
1555
1556
8.00M
                  v *= v;
1557
8.00M
                  k /= 2;
1558
8.00M
               }
1559
1560
2.00M
               return l;
1561
2.00M
            }
exprtk::details::numeric::fast_exp<float, 14u>::result(float)
Line
Count
Source
1544
3.60M
            {
1545
3.60M
               unsigned int k = N;
1546
3.60M
               T l = T(1);
1547
1548
18.0M
               while (k)
1549
14.4M
               {
1550
14.4M
                  if (1 == (k % 2))
1551
10.8M
                  {
1552
10.8M
                     l *= v;
1553
10.8M
                     --k;
1554
10.8M
                  }
1555
1556
14.4M
                  v *= v;
1557
14.4M
                  k /= 2;
1558
14.4M
               }
1559
1560
3.60M
               return l;
1561
3.60M
            }
exprtk::details::numeric::fast_exp<float, 15u>::result(float)
Line
Count
Source
1544
881k
            {
1545
881k
               unsigned int k = N;
1546
881k
               T l = T(1);
1547
1548
4.40M
               while (k)
1549
3.52M
               {
1550
3.52M
                  if (1 == (k % 2))
1551
3.52M
                  {
1552
3.52M
                     l *= v;
1553
3.52M
                     --k;
1554
3.52M
                  }
1555
1556
3.52M
                  v *= v;
1557
3.52M
                  k /= 2;
1558
3.52M
               }
1559
1560
881k
               return l;
1561
881k
            }
exprtk::details::numeric::fast_exp<float, 16u>::result(float)
Line
Count
Source
1544
1.00M
            {
1545
1.00M
               unsigned int k = N;
1546
1.00M
               T l = T(1);
1547
1548
6.00M
               while (k)
1549
5.00M
               {
1550
5.00M
                  if (1 == (k % 2))
1551
1.00M
                  {
1552
1.00M
                     l *= v;
1553
1.00M
                     --k;
1554
1.00M
                  }
1555
1556
5.00M
                  v *= v;
1557
5.00M
                  k /= 2;
1558
5.00M
               }
1559
1560
1.00M
               return l;
1561
1.00M
            }
exprtk::details::numeric::fast_exp<float, 17u>::result(float)
Line
Count
Source
1544
3.60M
            {
1545
3.60M
               unsigned int k = N;
1546
3.60M
               T l = T(1);
1547
1548
21.6M
               while (k)
1549
18.0M
               {
1550
18.0M
                  if (1 == (k % 2))
1551
7.20M
                  {
1552
7.20M
                     l *= v;
1553
7.20M
                     --k;
1554
7.20M
                  }
1555
1556
18.0M
                  v *= v;
1557
18.0M
                  k /= 2;
1558
18.0M
               }
1559
1560
3.60M
               return l;
1561
3.60M
            }
exprtk::details::numeric::fast_exp<float, 18u>::result(float)
Line
Count
Source
1544
500k
            {
1545
500k
               unsigned int k = N;
1546
500k
               T l = T(1);
1547
1548
3.00M
               while (k)
1549
2.50M
               {
1550
2.50M
                  if (1 == (k % 2))
1551
1.00M
                  {
1552
1.00M
                     l *= v;
1553
1.00M
                     --k;
1554
1.00M
                  }
1555
1556
2.50M
                  v *= v;
1557
2.50M
                  k /= 2;
1558
2.50M
               }
1559
1560
500k
               return l;
1561
500k
            }
exprtk::details::numeric::fast_exp<float, 19u>::result(float)
Line
Count
Source
1544
801k
            {
1545
801k
               unsigned int k = N;
1546
801k
               T l = T(1);
1547
1548
4.80M
               while (k)
1549
4.00M
               {
1550
4.00M
                  if (1 == (k % 2))
1551
2.40M
                  {
1552
2.40M
                     l *= v;
1553
2.40M
                     --k;
1554
2.40M
                  }
1555
1556
4.00M
                  v *= v;
1557
4.00M
                  k /= 2;
1558
4.00M
               }
1559
1560
801k
               return l;
1561
801k
            }
exprtk::details::numeric::fast_exp<float, 20u>::result(float)
Line
Count
Source
1544
800k
            {
1545
800k
               unsigned int k = N;
1546
800k
               T l = T(1);
1547
1548
4.80M
               while (k)
1549
4.00M
               {
1550
4.00M
                  if (1 == (k % 2))
1551
1.60M
                  {
1552
1.60M
                     l *= v;
1553
1.60M
                     --k;
1554
1.60M
                  }
1555
1556
4.00M
                  v *= v;
1557
4.00M
                  k /= 2;
1558
4.00M
               }
1559
1560
800k
               return l;
1561
800k
            }
exprtk::details::numeric::fast_exp<float, 21u>::result(float)
Line
Count
Source
1544
2.50M
            {
1545
2.50M
               unsigned int k = N;
1546
2.50M
               T l = T(1);
1547
1548
15.0M
               while (k)
1549
12.5M
               {
1550
12.5M
                  if (1 == (k % 2))
1551
7.50M
                  {
1552
7.50M
                     l *= v;
1553
7.50M
                     --k;
1554
7.50M
                  }
1555
1556
12.5M
                  v *= v;
1557
12.5M
                  k /= 2;
1558
12.5M
               }
1559
1560
2.50M
               return l;
1561
2.50M
            }
exprtk::details::numeric::fast_exp<float, 22u>::result(float)
Line
Count
Source
1544
800k
            {
1545
800k
               unsigned int k = N;
1546
800k
               T l = T(1);
1547
1548
4.80M
               while (k)
1549
4.00M
               {
1550
4.00M
                  if (1 == (k % 2))
1551
2.40M
                  {
1552
2.40M
                     l *= v;
1553
2.40M
                     --k;
1554
2.40M
                  }
1555
1556
4.00M
                  v *= v;
1557
4.00M
                  k /= 2;
1558
4.00M
               }
1559
1560
800k
               return l;
1561
800k
            }
exprtk::details::numeric::fast_exp<float, 23u>::result(float)
Line
Count
Source
1544
800k
            {
1545
800k
               unsigned int k = N;
1546
800k
               T l = T(1);
1547
1548
4.80M
               while (k)
1549
4.00M
               {
1550
4.00M
                  if (1 == (k % 2))
1551
3.20M
                  {
1552
3.20M
                     l *= v;
1553
3.20M
                     --k;
1554
3.20M
                  }
1555
1556
4.00M
                  v *= v;
1557
4.00M
                  k /= 2;
1558
4.00M
               }
1559
1560
800k
               return l;
1561
800k
            }
exprtk::details::numeric::fast_exp<float, 24u>::result(float)
Line
Count
Source
1544
1.30M
            {
1545
1.30M
               unsigned int k = N;
1546
1.30M
               T l = T(1);
1547
1548
7.80M
               while (k)
1549
6.50M
               {
1550
6.50M
                  if (1 == (k % 2))
1551
2.60M
                  {
1552
2.60M
                     l *= v;
1553
2.60M
                     --k;
1554
2.60M
                  }
1555
1556
6.50M
                  v *= v;
1557
6.50M
                  k /= 2;
1558
6.50M
               }
1559
1560
1.30M
               return l;
1561
1.30M
            }
exprtk::details::numeric::fast_exp<float, 25u>::result(float)
Line
Count
Source
1544
1.70M
            {
1545
1.70M
               unsigned int k = N;
1546
1.70M
               T l = T(1);
1547
1548
10.2M
               while (k)
1549
8.50M
               {
1550
8.50M
                  if (1 == (k % 2))
1551
5.10M
                  {
1552
5.10M
                     l *= v;
1553
5.10M
                     --k;
1554
5.10M
                  }
1555
1556
8.50M
                  v *= v;
1557
8.50M
                  k /= 2;
1558
8.50M
               }
1559
1560
1.70M
               return l;
1561
1.70M
            }
exprtk::details::numeric::fast_exp<float, 26u>::result(float)
Line
Count
Source
1544
1.20M
            {
1545
1.20M
               unsigned int k = N;
1546
1.20M
               T l = T(1);
1547
1548
7.20M
               while (k)
1549
6.00M
               {
1550
6.00M
                  if (1 == (k % 2))
1551
3.60M
                  {
1552
3.60M
                     l *= v;
1553
3.60M
                     --k;
1554
3.60M
                  }
1555
1556
6.00M
                  v *= v;
1557
6.00M
                  k /= 2;
1558
6.00M
               }
1559
1560
1.20M
               return l;
1561
1.20M
            }
exprtk::details::numeric::fast_exp<float, 27u>::result(float)
Line
Count
Source
1544
1.00M
            {
1545
1.00M
               unsigned int k = N;
1546
1.00M
               T l = T(1);
1547
1548
6.00M
               while (k)
1549
5.00M
               {
1550
5.00M
                  if (1 == (k % 2))
1551
4.00M
                  {
1552
4.00M
                     l *= v;
1553
4.00M
                     --k;
1554
4.00M
                  }
1555
1556
5.00M
                  v *= v;
1557
5.00M
                  k /= 2;
1558
5.00M
               }
1559
1560
1.00M
               return l;
1561
1.00M
            }
exprtk::details::numeric::fast_exp<float, 28u>::result(float)
Line
Count
Source
1544
1.00M
            {
1545
1.00M
               unsigned int k = N;
1546
1.00M
               T l = T(1);
1547
1548
6.00M
               while (k)
1549
5.00M
               {
1550
5.00M
                  if (1 == (k % 2))
1551
3.00M
                  {
1552
3.00M
                     l *= v;
1553
3.00M
                     --k;
1554
3.00M
                  }
1555
1556
5.00M
                  v *= v;
1557
5.00M
                  k /= 2;
1558
5.00M
               }
1559
1560
1.00M
               return l;
1561
1.00M
            }
exprtk::details::numeric::fast_exp<float, 29u>::result(float)
Line
Count
Source
1544
1.80M
            {
1545
1.80M
               unsigned int k = N;
1546
1.80M
               T l = T(1);
1547
1548
10.8M
               while (k)
1549
9.00M
               {
1550
9.00M
                  if (1 == (k % 2))
1551
7.20M
                  {
1552
7.20M
                     l *= v;
1553
7.20M
                     --k;
1554
7.20M
                  }
1555
1556
9.00M
                  v *= v;
1557
9.00M
                  k /= 2;
1558
9.00M
               }
1559
1560
1.80M
               return l;
1561
1.80M
            }
exprtk::details::numeric::fast_exp<float, 30u>::result(float)
Line
Count
Source
1544
1.00M
            {
1545
1.00M
               unsigned int k = N;
1546
1.00M
               T l = T(1);
1547
1548
6.00M
               while (k)
1549
5.00M
               {
1550
5.00M
                  if (1 == (k % 2))
1551
4.00M
                  {
1552
4.00M
                     l *= v;
1553
4.00M
                     --k;
1554
4.00M
                  }
1555
1556
5.00M
                  v *= v;
1557
5.00M
                  k /= 2;
1558
5.00M
               }
1559
1560
1.00M
               return l;
1561
1.00M
            }
exprtk::details::numeric::fast_exp<float, 31u>::result(float)
Line
Count
Source
1544
1.10M
            {
1545
1.10M
               unsigned int k = N;
1546
1.10M
               T l = T(1);
1547
1548
6.60M
               while (k)
1549
5.50M
               {
1550
5.50M
                  if (1 == (k % 2))
1551
5.50M
                  {
1552
5.50M
                     l *= v;
1553
5.50M
                     --k;
1554
5.50M
                  }
1555
1556
5.50M
                  v *= v;
1557
5.50M
                  k /= 2;
1558
5.50M
               }
1559
1560
1.10M
               return l;
1561
1.10M
            }
exprtk::details::numeric::fast_exp<float, 32u>::result(float)
Line
Count
Source
1544
3.07M
            {
1545
3.07M
               unsigned int k = N;
1546
3.07M
               T l = T(1);
1547
1548
21.5M
               while (k)
1549
18.4M
               {
1550
18.4M
                  if (1 == (k % 2))
1551
3.07M
                  {
1552
3.07M
                     l *= v;
1553
3.07M
                     --k;
1554
3.07M
                  }
1555
1556
18.4M
                  v *= v;
1557
18.4M
                  k /= 2;
1558
18.4M
               }
1559
1560
3.07M
               return l;
1561
3.07M
            }
exprtk::details::numeric::fast_exp<float, 33u>::result(float)
Line
Count
Source
1544
4.00M
            {
1545
4.00M
               unsigned int k = N;
1546
4.00M
               T l = T(1);
1547
1548
28.0M
               while (k)
1549
24.0M
               {
1550
24.0M
                  if (1 == (k % 2))
1551
8.00M
                  {
1552
8.00M
                     l *= v;
1553
8.00M
                     --k;
1554
8.00M
                  }
1555
1556
24.0M
                  v *= v;
1557
24.0M
                  k /= 2;
1558
24.0M
               }
1559
1560
4.00M
               return l;
1561
4.00M
            }
exprtk::details::numeric::fast_exp<float, 34u>::result(float)
Line
Count
Source
1544
2.92M
            {
1545
2.92M
               unsigned int k = N;
1546
2.92M
               T l = T(1);
1547
1548
20.4M
               while (k)
1549
17.5M
               {
1550
17.5M
                  if (1 == (k % 2))
1551
5.85M
                  {
1552
5.85M
                     l *= v;
1553
5.85M
                     --k;
1554
5.85M
                  }
1555
1556
17.5M
                  v *= v;
1557
17.5M
                  k /= 2;
1558
17.5M
               }
1559
1560
2.92M
               return l;
1561
2.92M
            }
exprtk::details::numeric::fast_exp<float, 35u>::result(float)
Line
Count
Source
1544
755k
            {
1545
755k
               unsigned int k = N;
1546
755k
               T l = T(1);
1547
1548
5.28M
               while (k)
1549
4.53M
               {
1550
4.53M
                  if (1 == (k % 2))
1551
2.26M
                  {
1552
2.26M
                     l *= v;
1553
2.26M
                     --k;
1554
2.26M
                  }
1555
1556
4.53M
                  v *= v;
1557
4.53M
                  k /= 2;
1558
4.53M
               }
1559
1560
755k
               return l;
1561
755k
            }
exprtk::details::numeric::fast_exp<float, 36u>::result(float)
Line
Count
Source
1544
2.70M
            {
1545
2.70M
               unsigned int k = N;
1546
2.70M
               T l = T(1);
1547
1548
18.9M
               while (k)
1549
16.2M
               {
1550
16.2M
                  if (1 == (k % 2))
1551
5.40M
                  {
1552
5.40M
                     l *= v;
1553
5.40M
                     --k;
1554
5.40M
                  }
1555
1556
16.2M
                  v *= v;
1557
16.2M
                  k /= 2;
1558
16.2M
               }
1559
1560
2.70M
               return l;
1561
2.70M
            }
exprtk::details::numeric::fast_exp<float, 37u>::result(float)
Line
Count
Source
1544
11.7M
            {
1545
11.7M
               unsigned int k = N;
1546
11.7M
               T l = T(1);
1547
1548
82.5M
               while (k)
1549
70.7M
               {
1550
70.7M
                  if (1 == (k % 2))
1551
35.3M
                  {
1552
35.3M
                     l *= v;
1553
35.3M
                     --k;
1554
35.3M
                  }
1555
1556
70.7M
                  v *= v;
1557
70.7M
                  k /= 2;
1558
70.7M
               }
1559
1560
11.7M
               return l;
1561
11.7M
            }
exprtk::details::numeric::fast_exp<float, 38u>::result(float)
Line
Count
Source
1544
7.65M
            {
1545
7.65M
               unsigned int k = N;
1546
7.65M
               T l = T(1);
1547
1548
53.5M
               while (k)
1549
45.9M
               {
1550
45.9M
                  if (1 == (k % 2))
1551
22.9M
                  {
1552
22.9M
                     l *= v;
1553
22.9M
                     --k;
1554
22.9M
                  }
1555
1556
45.9M
                  v *= v;
1557
45.9M
                  k /= 2;
1558
45.9M
               }
1559
1560
7.65M
               return l;
1561
7.65M
            }
exprtk::details::numeric::fast_exp<float, 39u>::result(float)
Line
Count
Source
1544
1.12M
            {
1545
1.12M
               unsigned int k = N;
1546
1.12M
               T l = T(1);
1547
1548
7.89M
               while (k)
1549
6.76M
               {
1550
6.76M
                  if (1 == (k % 2))
1551
4.50M
                  {
1552
4.50M
                     l *= v;
1553
4.50M
                     --k;
1554
4.50M
                  }
1555
1556
6.76M
                  v *= v;
1557
6.76M
                  k /= 2;
1558
6.76M
               }
1559
1560
1.12M
               return l;
1561
1.12M
            }
exprtk::details::numeric::fast_exp<float, 40u>::result(float)
Line
Count
Source
1544
1.90M
            {
1545
1.90M
               unsigned int k = N;
1546
1.90M
               T l = T(1);
1547
1548
13.3M
               while (k)
1549
11.4M
               {
1550
11.4M
                  if (1 == (k % 2))
1551
3.80M
                  {
1552
3.80M
                     l *= v;
1553
3.80M
                     --k;
1554
3.80M
                  }
1555
1556
11.4M
                  v *= v;
1557
11.4M
                  k /= 2;
1558
11.4M
               }
1559
1560
1.90M
               return l;
1561
1.90M
            }
exprtk::details::numeric::fast_exp<float, 41u>::result(float)
Line
Count
Source
1544
1.80M
            {
1545
1.80M
               unsigned int k = N;
1546
1.80M
               T l = T(1);
1547
1548
12.6M
               while (k)
1549
10.8M
               {
1550
10.8M
                  if (1 == (k % 2))
1551
5.40M
                  {
1552
5.40M
                     l *= v;
1553
5.40M
                     --k;
1554
5.40M
                  }
1555
1556
10.8M
                  v *= v;
1557
10.8M
                  k /= 2;
1558
10.8M
               }
1559
1560
1.80M
               return l;
1561
1.80M
            }
exprtk::details::numeric::fast_exp<float, 42u>::result(float)
Line
Count
Source
1544
500k
            {
1545
500k
               unsigned int k = N;
1546
500k
               T l = T(1);
1547
1548
3.50M
               while (k)
1549
3.00M
               {
1550
3.00M
                  if (1 == (k % 2))
1551
1.50M
                  {
1552
1.50M
                     l *= v;
1553
1.50M
                     --k;
1554
1.50M
                  }
1555
1556
3.00M
                  v *= v;
1557
3.00M
                  k /= 2;
1558
3.00M
               }
1559
1560
500k
               return l;
1561
500k
            }
exprtk::details::numeric::fast_exp<float, 43u>::result(float)
Line
Count
Source
1544
1.80M
            {
1545
1.80M
               unsigned int k = N;
1546
1.80M
               T l = T(1);
1547
1548
12.6M
               while (k)
1549
10.8M
               {
1550
10.8M
                  if (1 == (k % 2))
1551
7.21M
                  {
1552
7.21M
                     l *= v;
1553
7.21M
                     --k;
1554
7.21M
                  }
1555
1556
10.8M
                  v *= v;
1557
10.8M
                  k /= 2;
1558
10.8M
               }
1559
1560
1.80M
               return l;
1561
1.80M
            }
exprtk::details::numeric::fast_exp<float, 44u>::result(float)
Line
Count
Source
1544
9.42M
            {
1545
9.42M
               unsigned int k = N;
1546
9.42M
               T l = T(1);
1547
1548
65.9M
               while (k)
1549
56.5M
               {
1550
56.5M
                  if (1 == (k % 2))
1551
28.2M
                  {
1552
28.2M
                     l *= v;
1553
28.2M
                     --k;
1554
28.2M
                  }
1555
1556
56.5M
                  v *= v;
1557
56.5M
                  k /= 2;
1558
56.5M
               }
1559
1560
9.42M
               return l;
1561
9.42M
            }
exprtk::details::numeric::fast_exp<float, 45u>::result(float)
Line
Count
Source
1544
3.80M
            {
1545
3.80M
               unsigned int k = N;
1546
3.80M
               T l = T(1);
1547
1548
26.6M
               while (k)
1549
22.8M
               {
1550
22.8M
                  if (1 == (k % 2))
1551
15.2M
                  {
1552
15.2M
                     l *= v;
1553
15.2M
                     --k;
1554
15.2M
                  }
1555
1556
22.8M
                  v *= v;
1557
22.8M
                  k /= 2;
1558
22.8M
               }
1559
1560
3.80M
               return l;
1561
3.80M
            }
exprtk::details::numeric::fast_exp<float, 46u>::result(float)
Line
Count
Source
1544
100k
            {
1545
100k
               unsigned int k = N;
1546
100k
               T l = T(1);
1547
1548
702k
               while (k)
1549
602k
               {
1550
602k
                  if (1 == (k % 2))
1551
401k
                  {
1552
401k
                     l *= v;
1553
401k
                     --k;
1554
401k
                  }
1555
1556
602k
                  v *= v;
1557
602k
                  k /= 2;
1558
602k
               }
1559
1560
100k
               return l;
1561
100k
            }
exprtk::details::numeric::fast_exp<float, 47u>::result(float)
Line
Count
Source
1544
1.60M
            {
1545
1.60M
               unsigned int k = N;
1546
1.60M
               T l = T(1);
1547
1548
11.2M
               while (k)
1549
9.62M
               {
1550
9.62M
                  if (1 == (k % 2))
1551
8.01M
                  {
1552
8.01M
                     l *= v;
1553
8.01M
                     --k;
1554
8.01M
                  }
1555
1556
9.62M
                  v *= v;
1557
9.62M
                  k /= 2;
1558
9.62M
               }
1559
1560
1.60M
               return l;
1561
1.60M
            }
exprtk::details::numeric::fast_exp<float, 48u>::result(float)
Line
Count
Source
1544
1.00M
            {
1545
1.00M
               unsigned int k = N;
1546
1.00M
               T l = T(1);
1547
1548
7.00M
               while (k)
1549
6.00M
               {
1550
6.00M
                  if (1 == (k % 2))
1551
2.00M
                  {
1552
2.00M
                     l *= v;
1553
2.00M
                     --k;
1554
2.00M
                  }
1555
1556
6.00M
                  v *= v;
1557
6.00M
                  k /= 2;
1558
6.00M
               }
1559
1560
1.00M
               return l;
1561
1.00M
            }
exprtk::details::numeric::fast_exp<float, 49u>::result(float)
Line
Count
Source
1544
2.30M
            {
1545
2.30M
               unsigned int k = N;
1546
2.30M
               T l = T(1);
1547
1548
16.1M
               while (k)
1549
13.8M
               {
1550
13.8M
                  if (1 == (k % 2))
1551
6.90M
                  {
1552
6.90M
                     l *= v;
1553
6.90M
                     --k;
1554
6.90M
                  }
1555
1556
13.8M
                  v *= v;
1557
13.8M
                  k /= 2;
1558
13.8M
               }
1559
1560
2.30M
               return l;
1561
2.30M
            }
exprtk::details::numeric::fast_exp<float, 50u>::result(float)
Line
Count
Source
1544
903k
            {
1545
903k
               unsigned int k = N;
1546
903k
               T l = T(1);
1547
1548
6.32M
               while (k)
1549
5.41M
               {
1550
5.41M
                  if (1 == (k % 2))
1551
2.70M
                  {
1552
2.70M
                     l *= v;
1553
2.70M
                     --k;
1554
2.70M
                  }
1555
1556
5.41M
                  v *= v;
1557
5.41M
                  k /= 2;
1558
5.41M
               }
1559
1560
903k
               return l;
1561
903k
            }
exprtk::details::numeric::fast_exp<float, 51u>::result(float)
Line
Count
Source
1544
4.80M
            {
1545
4.80M
               unsigned int k = N;
1546
4.80M
               T l = T(1);
1547
1548
33.6M
               while (k)
1549
28.8M
               {
1550
28.8M
                  if (1 == (k % 2))
1551
19.2M
                  {
1552
19.2M
                     l *= v;
1553
19.2M
                     --k;
1554
19.2M
                  }
1555
1556
28.8M
                  v *= v;
1557
28.8M
                  k /= 2;
1558
28.8M
               }
1559
1560
4.80M
               return l;
1561
4.80M
            }
exprtk::details::numeric::fast_exp<float, 52u>::result(float)
Line
Count
Source
1544
3.80M
            {
1545
3.80M
               unsigned int k = N;
1546
3.80M
               T l = T(1);
1547
1548
26.6M
               while (k)
1549
22.8M
               {
1550
22.8M
                  if (1 == (k % 2))
1551
11.4M
                  {
1552
11.4M
                     l *= v;
1553
11.4M
                     --k;
1554
11.4M
                  }
1555
1556
22.8M
                  v *= v;
1557
22.8M
                  k /= 2;
1558
22.8M
               }
1559
1560
3.80M
               return l;
1561
3.80M
            }
exprtk::details::numeric::fast_exp<float, 53u>::result(float)
Line
Count
Source
1544
1.95M
            {
1545
1.95M
               unsigned int k = N;
1546
1.95M
               T l = T(1);
1547
1548
13.6M
               while (k)
1549
11.7M
               {
1550
11.7M
                  if (1 == (k % 2))
1551
7.81M
                  {
1552
7.81M
                     l *= v;
1553
7.81M
                     --k;
1554
7.81M
                  }
1555
1556
11.7M
                  v *= v;
1557
11.7M
                  k /= 2;
1558
11.7M
               }
1559
1560
1.95M
               return l;
1561
1.95M
            }
exprtk::details::numeric::fast_exp<float, 54u>::result(float)
Line
Count
Source
1544
6.60M
            {
1545
6.60M
               unsigned int k = N;
1546
6.60M
               T l = T(1);
1547
1548
46.2M
               while (k)
1549
39.6M
               {
1550
39.6M
                  if (1 == (k % 2))
1551
26.4M
                  {
1552
26.4M
                     l *= v;
1553
26.4M
                     --k;
1554
26.4M
                  }
1555
1556
39.6M
                  v *= v;
1557
39.6M
                  k /= 2;
1558
39.6M
               }
1559
1560
6.60M
               return l;
1561
6.60M
            }
exprtk::details::numeric::fast_exp<float, 55u>::result(float)
Line
Count
Source
1544
2.84M
            {
1545
2.84M
               unsigned int k = N;
1546
2.84M
               T l = T(1);
1547
1548
19.8M
               while (k)
1549
17.0M
               {
1550
17.0M
                  if (1 == (k % 2))
1551
14.2M
                  {
1552
14.2M
                     l *= v;
1553
14.2M
                     --k;
1554
14.2M
                  }
1555
1556
17.0M
                  v *= v;
1557
17.0M
                  k /= 2;
1558
17.0M
               }
1559
1560
2.84M
               return l;
1561
2.84M
            }
exprtk::details::numeric::fast_exp<float, 56u>::result(float)
Line
Count
Source
1544
10.3M
            {
1545
10.3M
               unsigned int k = N;
1546
10.3M
               T l = T(1);
1547
1548
72.1M
               while (k)
1549
61.8M
               {
1550
61.8M
                  if (1 == (k % 2))
1551
30.9M
                  {
1552
30.9M
                     l *= v;
1553
30.9M
                     --k;
1554
30.9M
                  }
1555
1556
61.8M
                  v *= v;
1557
61.8M
                  k /= 2;
1558
61.8M
               }
1559
1560
10.3M
               return l;
1561
10.3M
            }
exprtk::details::numeric::fast_exp<float, 57u>::result(float)
Line
Count
Source
1544
3.60M
            {
1545
3.60M
               unsigned int k = N;
1546
3.60M
               T l = T(1);
1547
1548
25.2M
               while (k)
1549
21.6M
               {
1550
21.6M
                  if (1 == (k % 2))
1551
14.4M
                  {
1552
14.4M
                     l *= v;
1553
14.4M
                     --k;
1554
14.4M
                  }
1555
1556
21.6M
                  v *= v;
1557
21.6M
                  k /= 2;
1558
21.6M
               }
1559
1560
3.60M
               return l;
1561
3.60M
            }
exprtk::details::numeric::fast_exp<float, 58u>::result(float)
Line
Count
Source
1544
1.10M
            {
1545
1.10M
               unsigned int k = N;
1546
1.10M
               T l = T(1);
1547
1548
7.71M
               while (k)
1549
6.61M
               {
1550
6.61M
                  if (1 == (k % 2))
1551
4.40M
                  {
1552
4.40M
                     l *= v;
1553
4.40M
                     --k;
1554
4.40M
                  }
1555
1556
6.61M
                  v *= v;
1557
6.61M
                  k /= 2;
1558
6.61M
               }
1559
1560
1.10M
               return l;
1561
1.10M
            }
exprtk::details::numeric::fast_exp<float, 59u>::result(float)
Line
Count
Source
1544
5.90M
            {
1545
5.90M
               unsigned int k = N;
1546
5.90M
               T l = T(1);
1547
1548
41.3M
               while (k)
1549
35.4M
               {
1550
35.4M
                  if (1 == (k % 2))
1551
29.5M
                  {
1552
29.5M
                     l *= v;
1553
29.5M
                     --k;
1554
29.5M
                  }
1555
1556
35.4M
                  v *= v;
1557
35.4M
                  k /= 2;
1558
35.4M
               }
1559
1560
5.90M
               return l;
1561
5.90M
            }
exprtk::details::numeric::fast_exp<float, 60u>::result(float)
Line
Count
Source
1544
4.12M
            {
1545
4.12M
               unsigned int k = N;
1546
4.12M
               T l = T(1);
1547
1548
28.8M
               while (k)
1549
24.7M
               {
1550
24.7M
                  if (1 == (k % 2))
1551
16.5M
                  {
1552
16.5M
                     l *= v;
1553
16.5M
                     --k;
1554
16.5M
                  }
1555
1556
24.7M
                  v *= v;
1557
24.7M
                  k /= 2;
1558
24.7M
               }
1559
1560
4.12M
               return l;
1561
4.12M
            }
1562
         };
1563
1564
15.5M
         template <typename T> struct fast_exp<T,10> { static inline T result(const T v) { T v_5 = fast_exp<T,5>::result(v); return v_5 * v_5; } };
exprtk::details::numeric::fast_exp<double, 10u>::result(double)
Line
Count
Source
1564
7.60M
         template <typename T> struct fast_exp<T,10> { static inline T result(const T v) { T v_5 = fast_exp<T,5>::result(v); return v_5 * v_5; } };
exprtk::details::numeric::fast_exp<float, 10u>::result(float)
Line
Count
Source
1564
7.90M
         template <typename T> struct fast_exp<T,10> { static inline T result(const T v) { T v_5 = fast_exp<T,5>::result(v); return v_5 * v_5; } };
1565
5.21M
         template <typename T> struct fast_exp<T, 9> { static inline T result(const T v) { return fast_exp<T,8>::result(v) * v; } };
exprtk::details::numeric::fast_exp<double, 9u>::result(double)
Line
Count
Source
1565
2.61M
         template <typename T> struct fast_exp<T, 9> { static inline T result(const T v) { return fast_exp<T,8>::result(v) * v; } };
exprtk::details::numeric::fast_exp<float, 9u>::result(float)
Line
Count
Source
1565
2.60M
         template <typename T> struct fast_exp<T, 9> { static inline T result(const T v) { return fast_exp<T,8>::result(v) * v; } };
1566
12.1M
         template <typename T> struct fast_exp<T, 8> { static inline T result(const T v) { T v_4 = fast_exp<T,4>::result(v); return v_4 * v_4; } };
exprtk::details::numeric::fast_exp<double, 8u>::result(double)
Line
Count
Source
1566
6.21M
         template <typename T> struct fast_exp<T, 8> { static inline T result(const T v) { T v_4 = fast_exp<T,4>::result(v); return v_4 * v_4; } };
exprtk::details::numeric::fast_exp<float, 8u>::result(float)
Line
Count
Source
1566
5.95M
         template <typename T> struct fast_exp<T, 8> { static inline T result(const T v) { T v_4 = fast_exp<T,4>::result(v); return v_4 * v_4; } };
1567
25.7M
         template <typename T> struct fast_exp<T, 7> { static inline T result(const T v) { return fast_exp<T,6>::result(v) * v; } };
exprtk::details::numeric::fast_exp<double, 7u>::result(double)
Line
Count
Source
1567
12.9M
         template <typename T> struct fast_exp<T, 7> { static inline T result(const T v) { return fast_exp<T,6>::result(v) * v; } };
exprtk::details::numeric::fast_exp<float, 7u>::result(float)
Line
Count
Source
1567
12.8M
         template <typename T> struct fast_exp<T, 7> { static inline T result(const T v) { return fast_exp<T,6>::result(v) * v; } };
1568
31.2M
         template <typename T> struct fast_exp<T, 6> { static inline T result(const T v) { T v_3 = fast_exp<T,3>::result(v); return v_3 * v_3; } };
exprtk::details::numeric::fast_exp<double, 6u>::result(double)
Line
Count
Source
1568
15.2M
         template <typename T> struct fast_exp<T, 6> { static inline T result(const T v) { T v_3 = fast_exp<T,3>::result(v); return v_3 * v_3; } };
exprtk::details::numeric::fast_exp<float, 6u>::result(float)
Line
Count
Source
1568
16.0M
         template <typename T> struct fast_exp<T, 6> { static inline T result(const T v) { T v_3 = fast_exp<T,3>::result(v); return v_3 * v_3; } };
1569
40.4M
         template <typename T> struct fast_exp<T, 5> { static inline T result(const T v) { return fast_exp<T,4>::result(v) * v; } };
exprtk::details::numeric::fast_exp<double, 5u>::result(double)
Line
Count
Source
1569
19.5M
         template <typename T> struct fast_exp<T, 5> { static inline T result(const T v) { return fast_exp<T,4>::result(v) * v; } };
exprtk::details::numeric::fast_exp<float, 5u>::result(float)
Line
Count
Source
1569
20.9M
         template <typename T> struct fast_exp<T, 5> { static inline T result(const T v) { return fast_exp<T,4>::result(v) * v; } };
1570
58.2M
         template <typename T> struct fast_exp<T, 4> { static inline T result(const T v) { T v_2 = v * v; return v_2 * v_2; } };
exprtk::details::numeric::fast_exp<double, 4u>::result(double)
Line
Count
Source
1570
28.9M
         template <typename T> struct fast_exp<T, 4> { static inline T result(const T v) { T v_2 = v * v; return v_2 * v_2; } };
exprtk::details::numeric::fast_exp<float, 4u>::result(float)
Line
Count
Source
1570
29.3M
         template <typename T> struct fast_exp<T, 4> { static inline T result(const T v) { T v_2 = v * v; return v_2 * v_2; } };
1571
44.0M
         template <typename T> struct fast_exp<T, 3> { static inline T result(const T v) { return v * v * v; } };
exprtk::details::numeric::fast_exp<double, 3u>::result(double)
Line
Count
Source
1571
20.8M
         template <typename T> struct fast_exp<T, 3> { static inline T result(const T v) { return v * v * v; } };
exprtk::details::numeric::fast_exp<float, 3u>::result(float)
Line
Count
Source
1571
23.2M
         template <typename T> struct fast_exp<T, 3> { static inline T result(const T v) { return v * v * v; } };
1572
4.81M
         template <typename T> struct fast_exp<T, 2> { static inline T result(const T v) { return v * v;     } };
exprtk::details::numeric::fast_exp<double, 2u>::result(double)
Line
Count
Source
1572
2.48M
         template <typename T> struct fast_exp<T, 2> { static inline T result(const T v) { return v * v;     } };
exprtk::details::numeric::fast_exp<float, 2u>::result(float)
Line
Count
Source
1572
2.33M
         template <typename T> struct fast_exp<T, 2> { static inline T result(const T v) { return v * v;     } };
1573
2.80M
         template <typename T> struct fast_exp<T, 1> { static inline T result(const T v) { return v;         } };
exprtk::details::numeric::fast_exp<double, 1u>::result(double)
Line
Count
Source
1573
1.40M
         template <typename T> struct fast_exp<T, 1> { static inline T result(const T v) { return v;         } };
exprtk::details::numeric::fast_exp<float, 1u>::result(float)
Line
Count
Source
1573
1.40M
         template <typename T> struct fast_exp<T, 1> { static inline T result(const T v) { return v;         } };
1574
         template <typename T> struct fast_exp<T, 0> { static inline T result(const T  ) { return T(1);      } };
1575
1576
         #define exprtk_define_unary_function(FunctionName)        \
1577
         template <typename T>                                     \
1578
         inline T FunctionName (const T v)                         \
1579
160M
         {                                                         \
1580
160M
            const typename details::number_type<T>::type num_type; \
1581
160M
            return  FunctionName##_impl(v,num_type);               \
1582
160M
         }                                                         \
double exprtk::details::numeric::abs<double>(double)
Line
Count
Source
1579
1.26M
         {                                                         \
1580
1.26M
            const typename details::number_type<T>::type num_type; \
1581
1.26M
            return  FunctionName##_impl(v,num_type);               \
1582
1.26M
         }                                                         \
double exprtk::details::numeric::acos<double>(double)
Line
Count
Source
1579
300k
         {                                                         \
1580
300k
            const typename details::number_type<T>::type num_type; \
1581
300k
            return  FunctionName##_impl(v,num_type);               \
1582
300k
         }                                                         \
double exprtk::details::numeric::acosh<double>(double)
Line
Count
Source
1579
1.20M
         {                                                         \
1580
1.20M
            const typename details::number_type<T>::type num_type; \
1581
1.20M
            return  FunctionName##_impl(v,num_type);               \
1582
1.20M
         }                                                         \
Unexecuted instantiation: double exprtk::details::numeric::asin<double>(double)
double exprtk::details::numeric::asinh<double>(double)
Line
Count
Source
1579
500k
         {                                                         \
1580
500k
            const typename details::number_type<T>::type num_type; \
1581
500k
            return  FunctionName##_impl(v,num_type);               \
1582
500k
         }                                                         \
double exprtk::details::numeric::atanh<double>(double)
Line
Count
Source
1579
700k
         {                                                         \
1580
700k
            const typename details::number_type<T>::type num_type; \
1581
700k
            return  FunctionName##_impl(v,num_type);               \
1582
700k
         }                                                         \
Unexecuted instantiation: double exprtk::details::numeric::ceil<double>(double)
double exprtk::details::numeric::cos<double>(double)
Line
Count
Source
1579
4.90M
         {                                                         \
1580
4.90M
            const typename details::number_type<T>::type num_type; \
1581
4.90M
            return  FunctionName##_impl(v,num_type);               \
1582
4.90M
         }                                                         \
double exprtk::details::numeric::cosh<double>(double)
Line
Count
Source
1579
1.70M
         {                                                         \
1580
1.70M
            const typename details::number_type<T>::type num_type; \
1581
1.70M
            return  FunctionName##_impl(v,num_type);               \
1582
1.70M
         }                                                         \
double exprtk::details::numeric::exp<double>(double)
Line
Count
Source
1579
100k
         {                                                         \
1580
100k
            const typename details::number_type<T>::type num_type; \
1581
100k
            return  FunctionName##_impl(v,num_type);               \
1582
100k
         }                                                         \
Unexecuted instantiation: double exprtk::details::numeric::expm1<double>(double)
Unexecuted instantiation: double exprtk::details::numeric::floor<double>(double)
double exprtk::details::numeric::log<double>(double)
Line
Count
Source
1579
13.0M
         {                                                         \
1580
13.0M
            const typename details::number_type<T>::type num_type; \
1581
13.0M
            return  FunctionName##_impl(v,num_type);               \
1582
13.0M
         }                                                         \
double exprtk::details::numeric::log10<double>(double)
Line
Count
Source
1579
301k
         {                                                         \
1580
301k
            const typename details::number_type<T>::type num_type; \
1581
301k
            return  FunctionName##_impl(v,num_type);               \
1582
301k
         }                                                         \
double exprtk::details::numeric::log2<double>(double)
Line
Count
Source
1579
200k
         {                                                         \
1580
200k
            const typename details::number_type<T>::type num_type; \
1581
200k
            return  FunctionName##_impl(v,num_type);               \
1582
200k
         }                                                         \
double exprtk::details::numeric::log1p<double>(double)
Line
Count
Source
1579
4.30M
         {                                                         \
1580
4.30M
            const typename details::number_type<T>::type num_type; \
1581
4.30M
            return  FunctionName##_impl(v,num_type);               \
1582
4.30M
         }                                                         \
double exprtk::details::numeric::neg<double>(double)
Line
Count
Source
1579
48.0M
         {                                                         \
1580
48.0M
            const typename details::number_type<T>::type num_type; \
1581
48.0M
            return  FunctionName##_impl(v,num_type);               \
1582
48.0M
         }                                                         \
Unexecuted instantiation: double exprtk::details::numeric::pos<double>(double)
Unexecuted instantiation: double exprtk::details::numeric::round<double>(double)
double exprtk::details::numeric::sin<double>(double)
Line
Count
Source
1579
8
         {                                                         \
1580
8
            const typename details::number_type<T>::type num_type; \
1581
8
            return  FunctionName##_impl(v,num_type);               \
1582
8
         }                                                         \
double exprtk::details::numeric::sinc<double>(double)
Line
Count
Source
1579
300k
         {                                                         \
1580
300k
            const typename details::number_type<T>::type num_type; \
1581
300k
            return  FunctionName##_impl(v,num_type);               \
1582
300k
         }                                                         \
double exprtk::details::numeric::sinh<double>(double)
Line
Count
Source
1579
500k
         {                                                         \
1580
500k
            const typename details::number_type<T>::type num_type; \
1581
500k
            return  FunctionName##_impl(v,num_type);               \
1582
500k
         }                                                         \
Unexecuted instantiation: double exprtk::details::numeric::sqrt<double>(double)
double exprtk::details::numeric::tan<double>(double)
Line
Count
Source
1579
258
         {                                                         \
1580
258
            const typename details::number_type<T>::type num_type; \
1581
258
            return  FunctionName##_impl(v,num_type);               \
1582
258
         }                                                         \
double exprtk::details::numeric::tanh<double>(double)
Line
Count
Source
1579
1.50M
         {                                                         \
1580
1.50M
            const typename details::number_type<T>::type num_type; \
1581
1.50M
            return  FunctionName##_impl(v,num_type);               \
1582
1.50M
         }                                                         \
double exprtk::details::numeric::cot<double>(double)
Line
Count
Source
1579
2.60M
         {                                                         \
1580
2.60M
            const typename details::number_type<T>::type num_type; \
1581
2.60M
            return  FunctionName##_impl(v,num_type);               \
1582
2.60M
         }                                                         \
Unexecuted instantiation: double exprtk::details::numeric::sec<double>(double)
double exprtk::details::numeric::csc<double>(double)
Line
Count
Source
1579
373
         {                                                         \
1580
373
            const typename details::number_type<T>::type num_type; \
1581
373
            return  FunctionName##_impl(v,num_type);               \
1582
373
         }                                                         \
Unexecuted instantiation: double exprtk::details::numeric::r2d<double>(double)
Unexecuted instantiation: double exprtk::details::numeric::d2r<double>(double)
Unexecuted instantiation: double exprtk::details::numeric::d2g<double>(double)
Unexecuted instantiation: double exprtk::details::numeric::g2d<double>(double)
double exprtk::details::numeric::notl<double>(double)
Line
Count
Source
1579
603
         {                                                         \
1580
603
            const typename details::number_type<T>::type num_type; \
1581
603
            return  FunctionName##_impl(v,num_type);               \
1582
603
         }                                                         \
double exprtk::details::numeric::sgn<double>(double)
Line
Count
Source
1579
900k
         {                                                         \
1580
900k
            const typename details::number_type<T>::type num_type; \
1581
900k
            return  FunctionName##_impl(v,num_type);               \
1582
900k
         }                                                         \
double exprtk::details::numeric::erf<double>(double)
Line
Count
Source
1579
9
         {                                                         \
1580
9
            const typename details::number_type<T>::type num_type; \
1581
9
            return  FunctionName##_impl(v,num_type);               \
1582
9
         }                                                         \
Unexecuted instantiation: double exprtk::details::numeric::erfc<double>(double)
Unexecuted instantiation: double exprtk::details::numeric::ncdf<double>(double)
Unexecuted instantiation: double exprtk::details::numeric::frac<double>(double)
double exprtk::details::numeric::trunc<double>(double)
Line
Count
Source
1579
30
         {                                                         \
1580
30
            const typename details::number_type<T>::type num_type; \
1581
30
            return  FunctionName##_impl(v,num_type);               \
1582
30
         }                                                         \
double exprtk::details::numeric::atan<double>(double)
Line
Count
Source
1579
25
         {                                                         \
1580
25
            const typename details::number_type<T>::type num_type; \
1581
25
            return  FunctionName##_impl(v,num_type);               \
1582
25
         }                                                         \
float exprtk::details::numeric::abs<float>(float)
Line
Count
Source
1579
1.25M
         {                                                         \
1580
1.25M
            const typename details::number_type<T>::type num_type; \
1581
1.25M
            return  FunctionName##_impl(v,num_type);               \
1582
1.25M
         }                                                         \
float exprtk::details::numeric::acos<float>(float)
Line
Count
Source
1579
300k
         {                                                         \
1580
300k
            const typename details::number_type<T>::type num_type; \
1581
300k
            return  FunctionName##_impl(v,num_type);               \
1582
300k
         }                                                         \
float exprtk::details::numeric::acosh<float>(float)
Line
Count
Source
1579
1.20M
         {                                                         \
1580
1.20M
            const typename details::number_type<T>::type num_type; \
1581
1.20M
            return  FunctionName##_impl(v,num_type);               \
1582
1.20M
         }                                                         \
Unexecuted instantiation: float exprtk::details::numeric::asin<float>(float)
float exprtk::details::numeric::asinh<float>(float)
Line
Count
Source
1579
500k
         {                                                         \
1580
500k
            const typename details::number_type<T>::type num_type; \
1581
500k
            return  FunctionName##_impl(v,num_type);               \
1582
500k
         }                                                         \
float exprtk::details::numeric::atanh<float>(float)
Line
Count
Source
1579
700k
         {                                                         \
1580
700k
            const typename details::number_type<T>::type num_type; \
1581
700k
            return  FunctionName##_impl(v,num_type);               \
1582
700k
         }                                                         \
Unexecuted instantiation: float exprtk::details::numeric::ceil<float>(float)
float exprtk::details::numeric::cos<float>(float)
Line
Count
Source
1579
4.20M
         {                                                         \
1580
4.20M
            const typename details::number_type<T>::type num_type; \
1581
4.20M
            return  FunctionName##_impl(v,num_type);               \
1582
4.20M
         }                                                         \
float exprtk::details::numeric::cosh<float>(float)
Line
Count
Source
1579
1.60M
         {                                                         \
1580
1.60M
            const typename details::number_type<T>::type num_type; \
1581
1.60M
            return  FunctionName##_impl(v,num_type);               \
1582
1.60M
         }                                                         \
float exprtk::details::numeric::exp<float>(float)
Line
Count
Source
1579
100k
         {                                                         \
1580
100k
            const typename details::number_type<T>::type num_type; \
1581
100k
            return  FunctionName##_impl(v,num_type);               \
1582
100k
         }                                                         \
Unexecuted instantiation: float exprtk::details::numeric::expm1<float>(float)
Unexecuted instantiation: float exprtk::details::numeric::floor<float>(float)
float exprtk::details::numeric::log<float>(float)
Line
Count
Source
1579
12.9M
         {                                                         \
1580
12.9M
            const typename details::number_type<T>::type num_type; \
1581
12.9M
            return  FunctionName##_impl(v,num_type);               \
1582
12.9M
         }                                                         \
float exprtk::details::numeric::log10<float>(float)
Line
Count
Source
1579
300k
         {                                                         \
1580
300k
            const typename details::number_type<T>::type num_type; \
1581
300k
            return  FunctionName##_impl(v,num_type);               \
1582
300k
         }                                                         \
float exprtk::details::numeric::log2<float>(float)
Line
Count
Source
1579
200k
         {                                                         \
1580
200k
            const typename details::number_type<T>::type num_type; \
1581
200k
            return  FunctionName##_impl(v,num_type);               \
1582
200k
         }                                                         \
float exprtk::details::numeric::log1p<float>(float)
Line
Count
Source
1579
4.40M
         {                                                         \
1580
4.40M
            const typename details::number_type<T>::type num_type; \
1581
4.40M
            return  FunctionName##_impl(v,num_type);               \
1582
4.40M
         }                                                         \
float exprtk::details::numeric::neg<float>(float)
Line
Count
Source
1579
45.0M
         {                                                         \
1580
45.0M
            const typename details::number_type<T>::type num_type; \
1581
45.0M
            return  FunctionName##_impl(v,num_type);               \
1582
45.0M
         }                                                         \
Unexecuted instantiation: float exprtk::details::numeric::pos<float>(float)
Unexecuted instantiation: float exprtk::details::numeric::round<float>(float)
float exprtk::details::numeric::sin<float>(float)
Line
Count
Source
1579
8
         {                                                         \
1580
8
            const typename details::number_type<T>::type num_type; \
1581
8
            return  FunctionName##_impl(v,num_type);               \
1582
8
         }                                                         \
float exprtk::details::numeric::sinc<float>(float)
Line
Count
Source
1579
300k
         {                                                         \
1580
300k
            const typename details::number_type<T>::type num_type; \
1581
300k
            return  FunctionName##_impl(v,num_type);               \
1582
300k
         }                                                         \
float exprtk::details::numeric::sinh<float>(float)
Line
Count
Source
1579
500k
         {                                                         \
1580
500k
            const typename details::number_type<T>::type num_type; \
1581
500k
            return  FunctionName##_impl(v,num_type);               \
1582
500k
         }                                                         \
Unexecuted instantiation: float exprtk::details::numeric::sqrt<float>(float)
float exprtk::details::numeric::tan<float>(float)
Line
Count
Source
1579
234
         {                                                         \
1580
234
            const typename details::number_type<T>::type num_type; \
1581
234
            return  FunctionName##_impl(v,num_type);               \
1582
234
         }                                                         \
float exprtk::details::numeric::tanh<float>(float)
Line
Count
Source
1579
1.20M
         {                                                         \
1580
1.20M
            const typename details::number_type<T>::type num_type; \
1581
1.20M
            return  FunctionName##_impl(v,num_type);               \
1582
1.20M
         }                                                         \
float exprtk::details::numeric::cot<float>(float)
Line
Count
Source
1579
2.60M
         {                                                         \
1580
2.60M
            const typename details::number_type<T>::type num_type; \
1581
2.60M
            return  FunctionName##_impl(v,num_type);               \
1582
2.60M
         }                                                         \
Unexecuted instantiation: float exprtk::details::numeric::sec<float>(float)
float exprtk::details::numeric::csc<float>(float)
Line
Count
Source
1579
92
         {                                                         \
1580
92
            const typename details::number_type<T>::type num_type; \
1581
92
            return  FunctionName##_impl(v,num_type);               \
1582
92
         }                                                         \
Unexecuted instantiation: float exprtk::details::numeric::r2d<float>(float)
Unexecuted instantiation: float exprtk::details::numeric::d2r<float>(float)
Unexecuted instantiation: float exprtk::details::numeric::d2g<float>(float)
Unexecuted instantiation: float exprtk::details::numeric::g2d<float>(float)
float exprtk::details::numeric::notl<float>(float)
Line
Count
Source
1579
263
         {                                                         \
1580
263
            const typename details::number_type<T>::type num_type; \
1581
263
            return  FunctionName##_impl(v,num_type);               \
1582
263
         }                                                         \
float exprtk::details::numeric::sgn<float>(float)
Line
Count
Source
1579
900k
         {                                                         \
1580
900k
            const typename details::number_type<T>::type num_type; \
1581
900k
            return  FunctionName##_impl(v,num_type);               \
1582
900k
         }                                                         \
float exprtk::details::numeric::erf<float>(float)
Line
Count
Source
1579
9
         {                                                         \
1580
9
            const typename details::number_type<T>::type num_type; \
1581
9
            return  FunctionName##_impl(v,num_type);               \
1582
9
         }                                                         \
Unexecuted instantiation: float exprtk::details::numeric::erfc<float>(float)
Unexecuted instantiation: float exprtk::details::numeric::ncdf<float>(float)
Unexecuted instantiation: float exprtk::details::numeric::frac<float>(float)
float exprtk::details::numeric::trunc<float>(float)
Line
Count
Source
1579
100k
         {                                                         \
1580
100k
            const typename details::number_type<T>::type num_type; \
1581
100k
            return  FunctionName##_impl(v,num_type);               \
1582
100k
         }                                                         \
float exprtk::details::numeric::atan<float>(float)
Line
Count
Source
1579
25
         {                                                         \
1580
25
            const typename details::number_type<T>::type num_type; \
1581
25
            return  FunctionName##_impl(v,num_type);               \
1582
25
         }                                                         \
1583
1584
         exprtk_define_unary_function(abs  )
1585
         exprtk_define_unary_function(acos )
1586
         exprtk_define_unary_function(acosh)
1587
         exprtk_define_unary_function(asin )
1588
         exprtk_define_unary_function(asinh)
1589
         exprtk_define_unary_function(atan )
1590
         exprtk_define_unary_function(atanh)
1591
         exprtk_define_unary_function(ceil )
1592
         exprtk_define_unary_function(cos  )
1593
         exprtk_define_unary_function(cosh )
1594
         exprtk_define_unary_function(exp  )
1595
         exprtk_define_unary_function(expm1)
1596
         exprtk_define_unary_function(floor)
1597
         exprtk_define_unary_function(log  )
1598
         exprtk_define_unary_function(log10)
1599
         exprtk_define_unary_function(log2 )
1600
         exprtk_define_unary_function(log1p)
1601
         exprtk_define_unary_function(neg  )
1602
         exprtk_define_unary_function(pos  )
1603
         exprtk_define_unary_function(round)
1604
         exprtk_define_unary_function(sin  )
1605
         exprtk_define_unary_function(sinc )
1606
         exprtk_define_unary_function(sinh )
1607
         exprtk_define_unary_function(sqrt )
1608
         exprtk_define_unary_function(tan  )
1609
         exprtk_define_unary_function(tanh )
1610
         exprtk_define_unary_function(cot  )
1611
         exprtk_define_unary_function(sec  )
1612
         exprtk_define_unary_function(csc  )
1613
         exprtk_define_unary_function(r2d  )
1614
         exprtk_define_unary_function(d2r  )
1615
         exprtk_define_unary_function(d2g  )
1616
         exprtk_define_unary_function(g2d  )
1617
         exprtk_define_unary_function(notl )
1618
         exprtk_define_unary_function(sgn  )
1619
         exprtk_define_unary_function(erf  )
1620
         exprtk_define_unary_function(erfc )
1621
         exprtk_define_unary_function(ncdf )
1622
         exprtk_define_unary_function(frac )
1623
         exprtk_define_unary_function(trunc)
1624
         #undef exprtk_define_unary_function
1625
      }
1626
1627
      template <typename T>
1628
      inline T compute_pow10(T d, const int exponent)
1629
51.4k
      {
1630
51.4k
         static const double fract10[] =
1631
51.4k
         {
1632
51.4k
           0.0,
1633
51.4k
           1.0E+001, 1.0E+002, 1.0E+003, 1.0E+004, 1.0E+005, 1.0E+006, 1.0E+007, 1.0E+008, 1.0E+009, 1.0E+010,
1634
51.4k
           1.0E+011, 1.0E+012, 1.0E+013, 1.0E+014, 1.0E+015, 1.0E+016, 1.0E+017, 1.0E+018, 1.0E+019, 1.0E+020,
1635
51.4k
           1.0E+021, 1.0E+022, 1.0E+023, 1.0E+024, 1.0E+025, 1.0E+026, 1.0E+027, 1.0E+028, 1.0E+029, 1.0E+030,
1636
51.4k
           1.0E+031, 1.0E+032, 1.0E+033, 1.0E+034, 1.0E+035, 1.0E+036, 1.0E+037, 1.0E+038, 1.0E+039, 1.0E+040,
1637
51.4k
           1.0E+041, 1.0E+042, 1.0E+043, 1.0E+044, 1.0E+045, 1.0E+046, 1.0E+047, 1.0E+048, 1.0E+049, 1.0E+050,
1638
51.4k
           1.0E+051, 1.0E+052, 1.0E+053, 1.0E+054, 1.0E+055, 1.0E+056, 1.0E+057, 1.0E+058, 1.0E+059, 1.0E+060,
1639
51.4k
           1.0E+061, 1.0E+062, 1.0E+063, 1.0E+064, 1.0E+065, 1.0E+066, 1.0E+067, 1.0E+068, 1.0E+069, 1.0E+070,
1640
51.4k
           1.0E+071, 1.0E+072, 1.0E+073, 1.0E+074, 1.0E+075, 1.0E+076, 1.0E+077, 1.0E+078, 1.0E+079, 1.0E+080,
1641
51.4k
           1.0E+081, 1.0E+082, 1.0E+083, 1.0E+084, 1.0E+085, 1.0E+086, 1.0E+087, 1.0E+088, 1.0E+089, 1.0E+090,
1642
51.4k
           1.0E+091, 1.0E+092, 1.0E+093, 1.0E+094, 1.0E+095, 1.0E+096, 1.0E+097, 1.0E+098, 1.0E+099, 1.0E+100,
1643
51.4k
           1.0E+101, 1.0E+102, 1.0E+103, 1.0E+104, 1.0E+105, 1.0E+106, 1.0E+107, 1.0E+108, 1.0E+109, 1.0E+110,
1644
51.4k
           1.0E+111, 1.0E+112, 1.0E+113, 1.0E+114, 1.0E+115, 1.0E+116, 1.0E+117, 1.0E+118, 1.0E+119, 1.0E+120,
1645
51.4k
           1.0E+121, 1.0E+122, 1.0E+123, 1.0E+124, 1.0E+125, 1.0E+126, 1.0E+127, 1.0E+128, 1.0E+129, 1.0E+130,
1646
51.4k
           1.0E+131, 1.0E+132, 1.0E+133, 1.0E+134, 1.0E+135, 1.0E+136, 1.0E+137, 1.0E+138, 1.0E+139, 1.0E+140,
1647
51.4k
           1.0E+141, 1.0E+142, 1.0E+143, 1.0E+144, 1.0E+145, 1.0E+146, 1.0E+147, 1.0E+148, 1.0E+149, 1.0E+150,
1648
51.4k
           1.0E+151, 1.0E+152, 1.0E+153, 1.0E+154, 1.0E+155, 1.0E+156, 1.0E+157, 1.0E+158, 1.0E+159, 1.0E+160,
1649
51.4k
           1.0E+161, 1.0E+162, 1.0E+163, 1.0E+164, 1.0E+165, 1.0E+166, 1.0E+167, 1.0E+168, 1.0E+169, 1.0E+170,
1650
51.4k
           1.0E+171, 1.0E+172, 1.0E+173, 1.0E+174, 1.0E+175, 1.0E+176, 1.0E+177, 1.0E+178, 1.0E+179, 1.0E+180,
1651
51.4k
           1.0E+181, 1.0E+182, 1.0E+183, 1.0E+184, 1.0E+185, 1.0E+186, 1.0E+187, 1.0E+188, 1.0E+189, 1.0E+190,
1652
51.4k
           1.0E+191, 1.0E+192, 1.0E+193, 1.0E+194, 1.0E+195, 1.0E+196, 1.0E+197, 1.0E+198, 1.0E+199, 1.0E+200,
1653
51.4k
           1.0E+201, 1.0E+202, 1.0E+203, 1.0E+204, 1.0E+205, 1.0E+206, 1.0E+207, 1.0E+208, 1.0E+209, 1.0E+210,
1654
51.4k
           1.0E+211, 1.0E+212, 1.0E+213, 1.0E+214, 1.0E+215, 1.0E+216, 1.0E+217, 1.0E+218, 1.0E+219, 1.0E+220,
1655
51.4k
           1.0E+221, 1.0E+222, 1.0E+223, 1.0E+224, 1.0E+225, 1.0E+226, 1.0E+227, 1.0E+228, 1.0E+229, 1.0E+230,
1656
51.4k
           1.0E+231, 1.0E+232, 1.0E+233, 1.0E+234, 1.0E+235, 1.0E+236, 1.0E+237, 1.0E+238, 1.0E+239, 1.0E+240,
1657
51.4k
           1.0E+241, 1.0E+242, 1.0E+243, 1.0E+244, 1.0E+245, 1.0E+246, 1.0E+247, 1.0E+248, 1.0E+249, 1.0E+250,
1658
51.4k
           1.0E+251, 1.0E+252, 1.0E+253, 1.0E+254, 1.0E+255, 1.0E+256, 1.0E+257, 1.0E+258, 1.0E+259, 1.0E+260,
1659
51.4k
           1.0E+261, 1.0E+262, 1.0E+263, 1.0E+264, 1.0E+265, 1.0E+266, 1.0E+267, 1.0E+268, 1.0E+269, 1.0E+270,
1660
51.4k
           1.0E+271, 1.0E+272, 1.0E+273, 1.0E+274, 1.0E+275, 1.0E+276, 1.0E+277, 1.0E+278, 1.0E+279, 1.0E+280,
1661
51.4k
           1.0E+281, 1.0E+282, 1.0E+283, 1.0E+284, 1.0E+285, 1.0E+286, 1.0E+287, 1.0E+288, 1.0E+289, 1.0E+290,
1662
51.4k
           1.0E+291, 1.0E+292, 1.0E+293, 1.0E+294, 1.0E+295, 1.0E+296, 1.0E+297, 1.0E+298, 1.0E+299, 1.0E+300,
1663
51.4k
           1.0E+301, 1.0E+302, 1.0E+303, 1.0E+304, 1.0E+305, 1.0E+306, 1.0E+307, 1.0E+308
1664
51.4k
         };
1665
1666
51.4k
         static const int fract10_size = static_cast<int>(sizeof(fract10) / sizeof(double));
1667
1668
51.4k
         const int e = std::abs(exponent);
1669
1670
51.4k
         if (exponent >= std::numeric_limits<T>::min_exponent10)
1671
49.7k
         {
1672
49.7k
            if (e < fract10_size)
1673
49.7k
            {
1674
49.7k
               if (exponent > 0)
1675
13.2k
                  return T(d * fract10[e]);
1676
36.4k
               else
1677
36.4k
                  return T(d / fract10[e]);
1678
49.7k
            }
1679
0
            else
1680
0
               return T(d * std::pow(10.0, 10.0 * exponent));
1681
49.7k
         }
1682
1.74k
         else
1683
1.74k
         {
1684
1.74k
                     d /= T(fract10[           -std::numeric_limits<T>::min_exponent10]);
1685
1.74k
            return T(d /    fract10[-exponent + std::numeric_limits<T>::min_exponent10]);
1686
1.74k
         }
1687
51.4k
      }
double exprtk::details::compute_pow10<double>(double, int)
Line
Count
Source
1629
28.1k
      {
1630
28.1k
         static const double fract10[] =
1631
28.1k
         {
1632
28.1k
           0.0,
1633
28.1k
           1.0E+001, 1.0E+002, 1.0E+003, 1.0E+004, 1.0E+005, 1.0E+006, 1.0E+007, 1.0E+008, 1.0E+009, 1.0E+010,
1634
28.1k
           1.0E+011, 1.0E+012, 1.0E+013, 1.0E+014, 1.0E+015, 1.0E+016, 1.0E+017, 1.0E+018, 1.0E+019, 1.0E+020,
1635
28.1k
           1.0E+021, 1.0E+022, 1.0E+023, 1.0E+024, 1.0E+025, 1.0E+026, 1.0E+027, 1.0E+028, 1.0E+029, 1.0E+030,
1636
28.1k
           1.0E+031, 1.0E+032, 1.0E+033, 1.0E+034, 1.0E+035, 1.0E+036, 1.0E+037, 1.0E+038, 1.0E+039, 1.0E+040,
1637
28.1k
           1.0E+041, 1.0E+042, 1.0E+043, 1.0E+044, 1.0E+045, 1.0E+046, 1.0E+047, 1.0E+048, 1.0E+049, 1.0E+050,
1638
28.1k
           1.0E+051, 1.0E+052, 1.0E+053, 1.0E+054, 1.0E+055, 1.0E+056, 1.0E+057, 1.0E+058, 1.0E+059, 1.0E+060,
1639
28.1k
           1.0E+061, 1.0E+062, 1.0E+063, 1.0E+064, 1.0E+065, 1.0E+066, 1.0E+067, 1.0E+068, 1.0E+069, 1.0E+070,
1640
28.1k
           1.0E+071, 1.0E+072, 1.0E+073, 1.0E+074, 1.0E+075, 1.0E+076, 1.0E+077, 1.0E+078, 1.0E+079, 1.0E+080,
1641
28.1k
           1.0E+081, 1.0E+082, 1.0E+083, 1.0E+084, 1.0E+085, 1.0E+086, 1.0E+087, 1.0E+088, 1.0E+089, 1.0E+090,
1642
28.1k
           1.0E+091, 1.0E+092, 1.0E+093, 1.0E+094, 1.0E+095, 1.0E+096, 1.0E+097, 1.0E+098, 1.0E+099, 1.0E+100,
1643
28.1k
           1.0E+101, 1.0E+102, 1.0E+103, 1.0E+104, 1.0E+105, 1.0E+106, 1.0E+107, 1.0E+108, 1.0E+109, 1.0E+110,
1644
28.1k
           1.0E+111, 1.0E+112, 1.0E+113, 1.0E+114, 1.0E+115, 1.0E+116, 1.0E+117, 1.0E+118, 1.0E+119, 1.0E+120,
1645
28.1k
           1.0E+121, 1.0E+122, 1.0E+123, 1.0E+124, 1.0E+125, 1.0E+126, 1.0E+127, 1.0E+128, 1.0E+129, 1.0E+130,
1646
28.1k
           1.0E+131, 1.0E+132, 1.0E+133, 1.0E+134, 1.0E+135, 1.0E+136, 1.0E+137, 1.0E+138, 1.0E+139, 1.0E+140,
1647
28.1k
           1.0E+141, 1.0E+142, 1.0E+143, 1.0E+144, 1.0E+145, 1.0E+146, 1.0E+147, 1.0E+148, 1.0E+149, 1.0E+150,
1648
28.1k
           1.0E+151, 1.0E+152, 1.0E+153, 1.0E+154, 1.0E+155, 1.0E+156, 1.0E+157, 1.0E+158, 1.0E+159, 1.0E+160,
1649
28.1k
           1.0E+161, 1.0E+162, 1.0E+163, 1.0E+164, 1.0E+165, 1.0E+166, 1.0E+167, 1.0E+168, 1.0E+169, 1.0E+170,
1650
28.1k
           1.0E+171, 1.0E+172, 1.0E+173, 1.0E+174, 1.0E+175, 1.0E+176, 1.0E+177, 1.0E+178, 1.0E+179, 1.0E+180,
1651
28.1k
           1.0E+181, 1.0E+182, 1.0E+183, 1.0E+184, 1.0E+185, 1.0E+186, 1.0E+187, 1.0E+188, 1.0E+189, 1.0E+190,
1652
28.1k
           1.0E+191, 1.0E+192, 1.0E+193, 1.0E+194, 1.0E+195, 1.0E+196, 1.0E+197, 1.0E+198, 1.0E+199, 1.0E+200,
1653
28.1k
           1.0E+201, 1.0E+202, 1.0E+203, 1.0E+204, 1.0E+205, 1.0E+206, 1.0E+207, 1.0E+208, 1.0E+209, 1.0E+210,
1654
28.1k
           1.0E+211, 1.0E+212, 1.0E+213, 1.0E+214, 1.0E+215, 1.0E+216, 1.0E+217, 1.0E+218, 1.0E+219, 1.0E+220,
1655
28.1k
           1.0E+221, 1.0E+222, 1.0E+223, 1.0E+224, 1.0E+225, 1.0E+226, 1.0E+227, 1.0E+228, 1.0E+229, 1.0E+230,
1656
28.1k
           1.0E+231, 1.0E+232, 1.0E+233, 1.0E+234, 1.0E+235, 1.0E+236, 1.0E+237, 1.0E+238, 1.0E+239, 1.0E+240,
1657
28.1k
           1.0E+241, 1.0E+242, 1.0E+243, 1.0E+244, 1.0E+245, 1.0E+246, 1.0E+247, 1.0E+248, 1.0E+249, 1.0E+250,
1658
28.1k
           1.0E+251, 1.0E+252, 1.0E+253, 1.0E+254, 1.0E+255, 1.0E+256, 1.0E+257, 1.0E+258, 1.0E+259, 1.0E+260,
1659
28.1k
           1.0E+261, 1.0E+262, 1.0E+263, 1.0E+264, 1.0E+265, 1.0E+266, 1.0E+267, 1.0E+268, 1.0E+269, 1.0E+270,
1660
28.1k
           1.0E+271, 1.0E+272, 1.0E+273, 1.0E+274, 1.0E+275, 1.0E+276, 1.0E+277, 1.0E+278, 1.0E+279, 1.0E+280,
1661
28.1k
           1.0E+281, 1.0E+282, 1.0E+283, 1.0E+284, 1.0E+285, 1.0E+286, 1.0E+287, 1.0E+288, 1.0E+289, 1.0E+290,
1662
28.1k
           1.0E+291, 1.0E+292, 1.0E+293, 1.0E+294, 1.0E+295, 1.0E+296, 1.0E+297, 1.0E+298, 1.0E+299, 1.0E+300,
1663
28.1k
           1.0E+301, 1.0E+302, 1.0E+303, 1.0E+304, 1.0E+305, 1.0E+306, 1.0E+307, 1.0E+308
1664
28.1k
         };
1665
1666
28.1k
         static const int fract10_size = static_cast<int>(sizeof(fract10) / sizeof(double));
1667
1668
28.1k
         const int e = std::abs(exponent);
1669
1670
28.1k
         if (exponent >= std::numeric_limits<T>::min_exponent10)
1671
28.1k
         {
1672
28.1k
            if (e < fract10_size)
1673
28.1k
            {
1674
28.1k
               if (exponent > 0)
1675
8.52k
                  return T(d * fract10[e]);
1676
19.6k
               else
1677
19.6k
                  return T(d / fract10[e]);
1678
28.1k
            }
1679
0
            else
1680
0
               return T(d * std::pow(10.0, 10.0 * exponent));
1681
28.1k
         }
1682
5
         else
1683
5
         {
1684
5
                     d /= T(fract10[           -std::numeric_limits<T>::min_exponent10]);
1685
5
            return T(d /    fract10[-exponent + std::numeric_limits<T>::min_exponent10]);
1686
5
         }
1687
28.1k
      }
float exprtk::details::compute_pow10<float>(float, int)
Line
Count
Source
1629
23.2k
      {
1630
23.2k
         static const double fract10[] =
1631
23.2k
         {
1632
23.2k
           0.0,
1633
23.2k
           1.0E+001, 1.0E+002, 1.0E+003, 1.0E+004, 1.0E+005, 1.0E+006, 1.0E+007, 1.0E+008, 1.0E+009, 1.0E+010,
1634
23.2k
           1.0E+011, 1.0E+012, 1.0E+013, 1.0E+014, 1.0E+015, 1.0E+016, 1.0E+017, 1.0E+018, 1.0E+019, 1.0E+020,
1635
23.2k
           1.0E+021, 1.0E+022, 1.0E+023, 1.0E+024, 1.0E+025, 1.0E+026, 1.0E+027, 1.0E+028, 1.0E+029, 1.0E+030,
1636
23.2k
           1.0E+031, 1.0E+032, 1.0E+033, 1.0E+034, 1.0E+035, 1.0E+036, 1.0E+037, 1.0E+038, 1.0E+039, 1.0E+040,
1637
23.2k
           1.0E+041, 1.0E+042, 1.0E+043, 1.0E+044, 1.0E+045, 1.0E+046, 1.0E+047, 1.0E+048, 1.0E+049, 1.0E+050,
1638
23.2k
           1.0E+051, 1.0E+052, 1.0E+053, 1.0E+054, 1.0E+055, 1.0E+056, 1.0E+057, 1.0E+058, 1.0E+059, 1.0E+060,
1639
23.2k
           1.0E+061, 1.0E+062, 1.0E+063, 1.0E+064, 1.0E+065, 1.0E+066, 1.0E+067, 1.0E+068, 1.0E+069, 1.0E+070,
1640
23.2k
           1.0E+071, 1.0E+072, 1.0E+073, 1.0E+074, 1.0E+075, 1.0E+076, 1.0E+077, 1.0E+078, 1.0E+079, 1.0E+080,
1641
23.2k
           1.0E+081, 1.0E+082, 1.0E+083, 1.0E+084, 1.0E+085, 1.0E+086, 1.0E+087, 1.0E+088, 1.0E+089, 1.0E+090,
1642
23.2k
           1.0E+091, 1.0E+092, 1.0E+093, 1.0E+094, 1.0E+095, 1.0E+096, 1.0E+097, 1.0E+098, 1.0E+099, 1.0E+100,
1643
23.2k
           1.0E+101, 1.0E+102, 1.0E+103, 1.0E+104, 1.0E+105, 1.0E+106, 1.0E+107, 1.0E+108, 1.0E+109, 1.0E+110,
1644
23.2k
           1.0E+111, 1.0E+112, 1.0E+113, 1.0E+114, 1.0E+115, 1.0E+116, 1.0E+117, 1.0E+118, 1.0E+119, 1.0E+120,
1645
23.2k
           1.0E+121, 1.0E+122, 1.0E+123, 1.0E+124, 1.0E+125, 1.0E+126, 1.0E+127, 1.0E+128, 1.0E+129, 1.0E+130,
1646
23.2k
           1.0E+131, 1.0E+132, 1.0E+133, 1.0E+134, 1.0E+135, 1.0E+136, 1.0E+137, 1.0E+138, 1.0E+139, 1.0E+140,
1647
23.2k
           1.0E+141, 1.0E+142, 1.0E+143, 1.0E+144, 1.0E+145, 1.0E+146, 1.0E+147, 1.0E+148, 1.0E+149, 1.0E+150,
1648
23.2k
           1.0E+151, 1.0E+152, 1.0E+153, 1.0E+154, 1.0E+155, 1.0E+156, 1.0E+157, 1.0E+158, 1.0E+159, 1.0E+160,
1649
23.2k
           1.0E+161, 1.0E+162, 1.0E+163, 1.0E+164, 1.0E+165, 1.0E+166, 1.0E+167, 1.0E+168, 1.0E+169, 1.0E+170,
1650
23.2k
           1.0E+171, 1.0E+172, 1.0E+173, 1.0E+174, 1.0E+175, 1.0E+176, 1.0E+177, 1.0E+178, 1.0E+179, 1.0E+180,
1651
23.2k
           1.0E+181, 1.0E+182, 1.0E+183, 1.0E+184, 1.0E+185, 1.0E+186, 1.0E+187, 1.0E+188, 1.0E+189, 1.0E+190,
1652
23.2k
           1.0E+191, 1.0E+192, 1.0E+193, 1.0E+194, 1.0E+195, 1.0E+196, 1.0E+197, 1.0E+198, 1.0E+199, 1.0E+200,
1653
23.2k
           1.0E+201, 1.0E+202, 1.0E+203, 1.0E+204, 1.0E+205, 1.0E+206, 1.0E+207, 1.0E+208, 1.0E+209, 1.0E+210,
1654
23.2k
           1.0E+211, 1.0E+212, 1.0E+213, 1.0E+214, 1.0E+215, 1.0E+216, 1.0E+217, 1.0E+218, 1.0E+219, 1.0E+220,
1655
23.2k
           1.0E+221, 1.0E+222, 1.0E+223, 1.0E+224, 1.0E+225, 1.0E+226, 1.0E+227, 1.0E+228, 1.0E+229, 1.0E+230,
1656
23.2k
           1.0E+231, 1.0E+232, 1.0E+233, 1.0E+234, 1.0E+235, 1.0E+236, 1.0E+237, 1.0E+238, 1.0E+239, 1.0E+240,
1657
23.2k
           1.0E+241, 1.0E+242, 1.0E+243, 1.0E+244, 1.0E+245, 1.0E+246, 1.0E+247, 1.0E+248, 1.0E+249, 1.0E+250,
1658
23.2k
           1.0E+251, 1.0E+252, 1.0E+253, 1.0E+254, 1.0E+255, 1.0E+256, 1.0E+257, 1.0E+258, 1.0E+259, 1.0E+260,
1659
23.2k
           1.0E+261, 1.0E+262, 1.0E+263, 1.0E+264, 1.0E+265, 1.0E+266, 1.0E+267, 1.0E+268, 1.0E+269, 1.0E+270,
1660
23.2k
           1.0E+271, 1.0E+272, 1.0E+273, 1.0E+274, 1.0E+275, 1.0E+276, 1.0E+277, 1.0E+278, 1.0E+279, 1.0E+280,
1661
23.2k
           1.0E+281, 1.0E+282, 1.0E+283, 1.0E+284, 1.0E+285, 1.0E+286, 1.0E+287, 1.0E+288, 1.0E+289, 1.0E+290,
1662
23.2k
           1.0E+291, 1.0E+292, 1.0E+293, 1.0E+294, 1.0E+295, 1.0E+296, 1.0E+297, 1.0E+298, 1.0E+299, 1.0E+300,
1663
23.2k
           1.0E+301, 1.0E+302, 1.0E+303, 1.0E+304, 1.0E+305, 1.0E+306, 1.0E+307, 1.0E+308
1664
23.2k
         };
1665
1666
23.2k
         static const int fract10_size = static_cast<int>(sizeof(fract10) / sizeof(double));
1667
1668
23.2k
         const int e = std::abs(exponent);
1669
1670
23.2k
         if (exponent >= std::numeric_limits<T>::min_exponent10)
1671
21.5k
         {
1672
21.5k
            if (e < fract10_size)
1673
21.5k
            {
1674
21.5k
               if (exponent > 0)
1675
4.74k
                  return T(d * fract10[e]);
1676
16.8k
               else
1677
16.8k
                  return T(d / fract10[e]);
1678
21.5k
            }
1679
0
            else
1680
0
               return T(d * std::pow(10.0, 10.0 * exponent));
1681
21.5k
         }
1682
1.74k
         else
1683
1.74k
         {
1684
1.74k
                     d /= T(fract10[           -std::numeric_limits<T>::min_exponent10]);
1685
1.74k
            return T(d /    fract10[-exponent + std::numeric_limits<T>::min_exponent10]);
1686
1.74k
         }
1687
23.2k
      }
1688
1689
      template <typename Iterator, typename T>
1690
      inline bool string_to_type_converter_impl_ref(Iterator& itr, const Iterator end, T& result)
1691
31.0k
      {
1692
31.0k
         if (itr == end)
1693
0
            return false;
1694
1695
31.0k
         const bool negative = ('-' == (*itr));
1696
1697
31.0k
         if (negative || ('+' == (*itr)))
1698
6.61k
         {
1699
6.61k
            if (end == ++itr)
1700
42
               return false;
1701
6.61k
         }
1702
1703
30.9k
         static const uchar_t zero = static_cast<uchar_t>('0');
1704
1705
63.0k
         while ((end != itr) && (zero == (*itr))) ++itr;
1706
1707
30.9k
         bool return_result = true;
1708
30.9k
         unsigned int digit = 0;
1709
30.9k
         const std::size_t length = static_cast<std::size_t>(std::distance(itr,end));
1710
1711
30.9k
         if (length <= 4)
1712
30.9k
         {
1713
30.9k
            exprtk_disable_fallthrough_begin
1714
30.9k
            switch (length)
1715
30.9k
            {
1716
               #ifdef exprtk_use_lut
1717
1718
               #define exprtk_process_digit                          \
1719
               if ((digit = details::digit_table[(int)*itr++]) < 10) \
1720
                  result = result * 10 + (digit);                    \
1721
               else                                                  \
1722
               {                                                     \
1723
                  return_result = false;                             \
1724
                  break;                                             \
1725
               }                                                     \
1726
1727
               #else
1728
1729
0
               #define exprtk_process_digit         \
1730
16.2k
               if ((digit = (*itr++ - zero)) < 10)  \
1731
16.2k
                  result = result * T(10) + digit;  \
1732
16.2k
               else                                 \
1733
16.2k
               {                                    \
1734
18
                  return_result = false;            \
1735
18
                  break;                            \
1736
18
               }                                    \
1737
0
1738
0
               #endif
1739
1740
34
               case 4 : exprtk_process_digit
1741
672
               case 3 : exprtk_process_digit
1742
15.5k
               case 2 : exprtk_process_digit
1743
21.6k
               case 1 : if ((digit = (*itr - zero))>= 10)
1744
82
                        {
1745
82
                           digit = 0;
1746
82
                           return_result = false;
1747
82
                        }
1748
1749
30.9k
               #undef exprtk_process_digit
1750
30.9k
            }
1751
30.9k
            exprtk_disable_fallthrough_end
1752
30.9k
         }
1753
92
         else
1754
92
            return_result = false;
1755
1756
30.9k
         if (length && return_result)
1757
21.5k
         {
1758
21.5k
            result = result * 10 + static_cast<T>(digit);
1759
21.5k
            ++itr;
1760
21.5k
         }
1761
1762
30.9k
         result = negative ? -result : result;
1763
30.9k
         return return_result;
1764
30.9k
      }
1765
1766
      template <typename Iterator, typename T>
1767
      static inline bool parse_nan(Iterator& itr, const Iterator end, T& t)
1768
0
      {
1769
0
         typedef typename std::iterator_traits<Iterator>::value_type type;
1770
1771
0
         static const std::size_t nan_length = 3;
1772
1773
0
         if (std::distance(itr,end) != static_cast<int>(nan_length))
1774
0
            return false;
1775
1776
0
         if (static_cast<type>('n') == (*itr))
1777
0
         {
1778
0
            if (
1779
0
                 (static_cast<type>('a') != *(itr + 1)) ||
1780
0
                 (static_cast<type>('n') != *(itr + 2))
1781
0
               )
1782
0
            {
1783
0
               return false;
1784
0
            }
1785
0
         }
1786
0
         else if (
1787
0
                   (static_cast<type>('A') != *(itr + 1)) ||
1788
0
                   (static_cast<type>('N') != *(itr + 2))
1789
0
                 )
1790
0
         {
1791
0
            return false;
1792
0
         }
1793
1794
0
         t = std::numeric_limits<T>::quiet_NaN();
1795
1796
0
         return true;
1797
0
      }
Unexecuted instantiation: exprtk_fuzzer.cpp:bool exprtk::details::parse_nan<char const*, double>(char const*&, char const*, double&)
Unexecuted instantiation: exprtk_fuzzer.cpp:bool exprtk::details::parse_nan<char const*, float>(char const*&, char const*, float&)
1798
1799
      template <typename Iterator, typename T>
1800
      static inline bool parse_inf(Iterator& itr, const Iterator end, T& t, const bool negative)
1801
0
      {
1802
0
         static const char_t inf_uc[] = "INFINITY";
1803
0
         static const char_t inf_lc[] = "infinity";
1804
0
         static const std::size_t inf_length = 8;
1805
1806
0
         const std::size_t length = static_cast<std::size_t>(std::distance(itr,end));
1807
1808
0
         if ((3 != length) && (inf_length != length))
1809
0
            return false;
1810
1811
0
         char_cptr inf_itr = ('i' == (*itr)) ? inf_lc : inf_uc;
1812
1813
0
         while (end != itr)
1814
0
         {
1815
0
            if (*inf_itr == static_cast<char_t>(*itr))
1816
0
            {
1817
0
               ++itr;
1818
0
               ++inf_itr;
1819
0
               continue;
1820
0
            }
1821
0
            else
1822
0
               return false;
1823
0
         }
1824
1825
0
         if (negative)
1826
0
            t = -std::numeric_limits<T>::infinity();
1827
0
         else
1828
0
            t =  std::numeric_limits<T>::infinity();
1829
1830
0
         return true;
1831
0
      }
Unexecuted instantiation: exprtk_fuzzer.cpp:bool exprtk::details::parse_inf<char const*, double>(char const*&, char const*, double&, bool)
Unexecuted instantiation: exprtk_fuzzer.cpp:bool exprtk::details::parse_inf<char const*, float>(char const*&, char const*, float&, bool)
1832
1833
      template <typename T>
1834
      inline bool valid_exponent(const int exponent, numeric::details::real_type_tag)
1835
7.15M
      {
1836
7.15M
         using namespace details::numeric;
1837
7.15M
         return (numeric_info<T>::min_exp <= exponent) && (exponent <= numeric_info<T>::max_exp);
1838
7.15M
      }
bool exprtk::details::valid_exponent<double>(int, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1835
3.61M
      {
1836
3.61M
         using namespace details::numeric;
1837
3.61M
         return (numeric_info<T>::min_exp <= exponent) && (exponent <= numeric_info<T>::max_exp);
1838
3.61M
      }
bool exprtk::details::valid_exponent<float>(int, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1835
3.53M
      {
1836
3.53M
         using namespace details::numeric;
1837
3.53M
         return (numeric_info<T>::min_exp <= exponent) && (exponent <= numeric_info<T>::max_exp);
1838
3.53M
      }
1839
1840
      template <typename Iterator, typename T>
1841
      inline bool string_to_real(Iterator& itr_external, const Iterator end, T& t, numeric::details::real_type_tag)
1842
7.12M
      {
1843
7.12M
         if (end == itr_external) return false;
1844
1845
7.12M
         Iterator itr = itr_external;
1846
1847
7.12M
         T d = T(0);
1848
1849
7.12M
         const bool negative = ('-' == (*itr));
1850
1851
7.12M
         if (negative || '+' == (*itr))
1852
0
         {
1853
0
            if (end == ++itr)
1854
0
               return false;
1855
0
         }
1856
1857
7.12M
         bool instate = false;
1858
1859
7.12M
         static const char_t zero = static_cast<uchar_t>('0');
1860
1861
7.12M
         #define parse_digit_1(d)          \
1862
9.22M
         if ((digit = (*itr - zero)) < 10) \
1863
9.22M
            { d = d * T(10) + digit; }     \
1864
9.22M
         else                              \
1865
9.22M
            { break; }                     \
1866
9.22M
         if (end == ++itr) break;          \
1867
7.12M
1868
7.12M
         #define parse_digit_2(d)          \
1869
7.12M
         if ((digit = (*itr - zero)) < 10) \
1870
1.35M
            { d = d * T(10) + digit; }     \
1871
1.35M
         else                              \
1872
1.35M
            { break; }                     \
1873
1.35M
            ++itr;                         \
1874
7.12M
1875
7.12M
         if ('.' != (*itr))
1876
7.10M
         {
1877
7.10M
            const Iterator curr = itr;
1878
1879
9.30M
            while ((end != itr) && (zero == (*itr))) ++itr;
1880
1881
8.41M
            while (end != itr)
1882
6.64M
            {
1883
6.64M
               unsigned int digit;
1884
6.64M
               parse_digit_1(d)
1885
4.93M
               parse_digit_1(d)
1886
2.62M
               parse_digit_2(d)
1887
2.62M
            }
1888
1889
7.10M
            if (curr != itr) instate = true;
1890
7.10M
         }
1891
1892
7.12M
         int exponent = 0;
1893
1894
7.12M
         if (end != itr)
1895
113k
         {
1896
113k
            if ('.' == (*itr))
1897
83.4k
            {
1898
83.4k
               const Iterator curr = ++itr;
1899
83.4k
               T tmp_d = T(0);
1900
1901
117k
               while (end != itr)
1902
51.0k
               {
1903
51.0k
                  unsigned int digit;
1904
51.0k
                  parse_digit_1(tmp_d)
1905
78.0k
                  parse_digit_1(tmp_d)
1906
69.0k
                  parse_digit_2(tmp_d)
1907
69.0k
               }
1908
1909
83.4k
               if (curr != itr)
1910
32.3k
               {
1911
32.3k
                  instate = true;
1912
1913
32.3k
                  const int frac_exponent = static_cast<int>(-std::distance(curr, itr));
1914
1915
32.3k
                  if (!valid_exponent<T>(frac_exponent, numeric::details::real_type_tag()))
1916
24
                     return false;
1917
1918
32.2k
                  d += compute_pow10(tmp_d, frac_exponent);
1919
32.2k
               }
1920
1921
83.4k
               #undef parse_digit_1
1922
83.4k
               #undef parse_digit_2
1923
83.4k
            }
1924
1925
113k
            if (end != itr)
1926
31.0k
            {
1927
31.0k
               typename std::iterator_traits<Iterator>::value_type c = (*itr);
1928
1929
31.0k
               if (('e' == c) || ('E' == c))
1930
31.0k
               {
1931
31.0k
                  int exp = 0;
1932
1933
31.0k
                  if (!details::string_to_type_converter_impl_ref(++itr, end, exp))
1934
234
                  {
1935
234
                     if (end == itr)
1936
42
                        return false;
1937
192
                     else
1938
192
                        c = (*itr);
1939
234
                  }
1940
1941
30.9k
                  exponent += exp;
1942
30.9k
               }
1943
1944
30.9k
               if (end != itr)
1945
192
               {
1946
192
                  if (('f' == c) || ('F' == c) || ('l' == c) || ('L' == c))
1947
0
                     ++itr;
1948
192
                  else if ('#' == c)
1949
0
                  {
1950
0
                     if (end == ++itr)
1951
0
                        return false;
1952
0
                     else if (('I' <= (*itr)) && ((*itr) <= 'n'))
1953
0
                     {
1954
0
                        if (('i' == (*itr)) || ('I' == (*itr)))
1955
0
                        {
1956
0
                           return parse_inf(itr, end, t, negative);
1957
0
                        }
1958
0
                        else if (('n' == (*itr)) || ('N' == (*itr)))
1959
0
                        {
1960
0
                           return parse_nan(itr, end, t);
1961
0
                        }
1962
0
                        else
1963
0
                           return false;
1964
0
                     }
1965
0
                     else
1966
0
                        return false;
1967
0
                  }
1968
192
                  else if (('I' <= (*itr)) && ((*itr) <= 'n'))
1969
78
                  {
1970
78
                     if (('i' == (*itr)) || ('I' == (*itr)))
1971
0
                     {
1972
0
                        return parse_inf(itr, end, t, negative);
1973
0
                     }
1974
78
                     else if (('n' == (*itr)) || ('N' == (*itr)))
1975
0
                     {
1976
0
                        return parse_nan(itr, end, t);
1977
0
                     }
1978
78
                     else
1979
78
                        return false;
1980
78
                  }
1981
114
                  else
1982
114
                     return false;
1983
192
               }
1984
30.9k
            }
1985
113k
         }
1986
1987
7.12M
         if ((end != itr) || (!instate))
1988
418
            return false;
1989
7.12M
         else if (!valid_exponent<T>(exponent, numeric::details::real_type_tag()))
1990
2.33k
            return false;
1991
7.12M
         else if (exponent)
1992
19.1k
            d = compute_pow10(d,exponent);
1993
1994
7.12M
         t = static_cast<T>((negative) ? -d : d);
1995
7.12M
         return true;
1996
7.12M
      }
bool exprtk::details::string_to_real<char const*, double>(char const*&, char const*, double&, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1842
3.60M
      {
1843
3.60M
         if (end == itr_external) return false;
1844
1845
3.60M
         Iterator itr = itr_external;
1846
1847
3.60M
         T d = T(0);
1848
1849
3.60M
         const bool negative = ('-' == (*itr));
1850
1851
3.60M
         if (negative || '+' == (*itr))
1852
0
         {
1853
0
            if (end == ++itr)
1854
0
               return false;
1855
0
         }
1856
1857
3.60M
         bool instate = false;
1858
1859
3.60M
         static const char_t zero = static_cast<uchar_t>('0');
1860
1861
3.60M
         #define parse_digit_1(d)          \
1862
3.60M
         if ((digit = (*itr - zero)) < 10) \
1863
3.60M
            { d = d * T(10) + digit; }     \
1864
3.60M
         else                              \
1865
3.60M
            { break; }                     \
1866
3.60M
         if (end == ++itr) break;          \
1867
3.60M
1868
3.60M
         #define parse_digit_2(d)          \
1869
3.60M
         if ((digit = (*itr - zero)) < 10) \
1870
3.60M
            { d = d * T(10) + digit; }     \
1871
3.60M
         else                              \
1872
3.60M
            { break; }                     \
1873
3.60M
            ++itr;                         \
1874
3.60M
1875
3.60M
         if ('.' != (*itr))
1876
3.59M
         {
1877
3.59M
            const Iterator curr = itr;
1878
1879
4.70M
            while ((end != itr) && (zero == (*itr))) ++itr;
1880
1881
4.25M
            while (end != itr)
1882
3.35M
            {
1883
3.35M
               unsigned int digit;
1884
3.35M
               parse_digit_1(d)
1885
2.49M
               parse_digit_1(d)
1886
1.32M
               parse_digit_2(d)
1887
1.32M
            }
1888
1889
3.59M
            if (curr != itr) instate = true;
1890
3.59M
         }
1891
1892
3.60M
         int exponent = 0;
1893
1894
3.60M
         if (end != itr)
1895
58.2k
         {
1896
58.2k
            if ('.' == (*itr))
1897
42.0k
            {
1898
42.0k
               const Iterator curr = ++itr;
1899
42.0k
               T tmp_d = T(0);
1900
1901
59.6k
               while (end != itr)
1902
25.9k
               {
1903
25.9k
                  unsigned int digit;
1904
25.9k
                  parse_digit_1(tmp_d)
1905
39.7k
                  parse_digit_1(tmp_d)
1906
35.2k
                  parse_digit_2(tmp_d)
1907
35.2k
               }
1908
1909
42.0k
               if (curr != itr)
1910
16.4k
               {
1911
16.4k
                  instate = true;
1912
1913
16.4k
                  const int frac_exponent = static_cast<int>(-std::distance(curr, itr));
1914
1915
16.4k
                  if (!valid_exponent<T>(frac_exponent, numeric::details::real_type_tag()))
1916
2
                     return false;
1917
1918
16.4k
                  d += compute_pow10(tmp_d, frac_exponent);
1919
16.4k
               }
1920
1921
42.0k
               #undef parse_digit_1
1922
42.0k
               #undef parse_digit_2
1923
42.0k
            }
1924
1925
58.2k
            if (end != itr)
1926
16.6k
            {
1927
16.6k
               typename std::iterator_traits<Iterator>::value_type c = (*itr);
1928
1929
16.6k
               if (('e' == c) || ('E' == c))
1930
16.6k
               {
1931
16.6k
                  int exp = 0;
1932
1933
16.6k
                  if (!details::string_to_type_converter_impl_ref(++itr, end, exp))
1934
117
                  {
1935
117
                     if (end == itr)
1936
21
                        return false;
1937
96
                     else
1938
96
                        c = (*itr);
1939
117
                  }
1940
1941
16.6k
                  exponent += exp;
1942
16.6k
               }
1943
1944
16.6k
               if (end != itr)
1945
96
               {
1946
96
                  if (('f' == c) || ('F' == c) || ('l' == c) || ('L' == c))
1947
0
                     ++itr;
1948
96
                  else if ('#' == c)
1949
0
                  {
1950
0
                     if (end == ++itr)
1951
0
                        return false;
1952
0
                     else if (('I' <= (*itr)) && ((*itr) <= 'n'))
1953
0
                     {
1954
0
                        if (('i' == (*itr)) || ('I' == (*itr)))
1955
0
                        {
1956
0
                           return parse_inf(itr, end, t, negative);
1957
0
                        }
1958
0
                        else if (('n' == (*itr)) || ('N' == (*itr)))
1959
0
                        {
1960
0
                           return parse_nan(itr, end, t);
1961
0
                        }
1962
0
                        else
1963
0
                           return false;
1964
0
                     }
1965
0
                     else
1966
0
                        return false;
1967
0
                  }
1968
96
                  else if (('I' <= (*itr)) && ((*itr) <= 'n'))
1969
39
                  {
1970
39
                     if (('i' == (*itr)) || ('I' == (*itr)))
1971
0
                     {
1972
0
                        return parse_inf(itr, end, t, negative);
1973
0
                     }
1974
39
                     else if (('n' == (*itr)) || ('N' == (*itr)))
1975
0
                     {
1976
0
                        return parse_nan(itr, end, t);
1977
0
                     }
1978
39
                     else
1979
39
                        return false;
1980
39
                  }
1981
57
                  else
1982
57
                     return false;
1983
96
               }
1984
16.6k
            }
1985
58.2k
         }
1986
1987
3.60M
         if ((end != itr) || (!instate))
1988
209
            return false;
1989
3.60M
         else if (!valid_exponent<T>(exponent, numeric::details::real_type_tag()))
1990
115
            return false;
1991
3.60M
         else if (exponent)
1992
11.7k
            d = compute_pow10(d,exponent);
1993
1994
3.60M
         t = static_cast<T>((negative) ? -d : d);
1995
3.60M
         return true;
1996
3.60M
      }
bool exprtk::details::string_to_real<char const*, float>(char const*&, char const*, float&, exprtk::details::numeric::details::real_type_tag)
Line
Count
Source
1842
3.52M
      {
1843
3.52M
         if (end == itr_external) return false;
1844
1845
3.52M
         Iterator itr = itr_external;
1846
1847
3.52M
         T d = T(0);
1848
1849
3.52M
         const bool negative = ('-' == (*itr));
1850
1851
3.52M
         if (negative || '+' == (*itr))
1852
0
         {
1853
0
            if (end == ++itr)
1854
0
               return false;
1855
0
         }
1856
1857
3.52M
         bool instate = false;
1858
1859
3.52M
         static const char_t zero = static_cast<uchar_t>('0');
1860
1861
3.52M
         #define parse_digit_1(d)          \
1862
3.52M
         if ((digit = (*itr - zero)) < 10) \
1863
3.52M
            { d = d * T(10) + digit; }     \
1864
3.52M
         else                              \
1865
3.52M
            { break; }                     \
1866
3.52M
         if (end == ++itr) break;          \
1867
3.52M
1868
3.52M
         #define parse_digit_2(d)          \
1869
3.52M
         if ((digit = (*itr - zero)) < 10) \
1870
3.52M
            { d = d * T(10) + digit; }     \
1871
3.52M
         else                              \
1872
3.52M
            { break; }                     \
1873
3.52M
            ++itr;                         \
1874
3.52M
1875
3.52M
         if ('.' != (*itr))
1876
3.51M
         {
1877
3.51M
            const Iterator curr = itr;
1878
1879
4.59M
            while ((end != itr) && (zero == (*itr))) ++itr;
1880
1881
4.15M
            while (end != itr)
1882
3.28M
            {
1883
3.28M
               unsigned int digit;
1884
3.28M
               parse_digit_1(d)
1885
2.44M
               parse_digit_1(d)
1886
1.29M
               parse_digit_2(d)
1887
1.29M
            }
1888
1889
3.51M
            if (curr != itr) instate = true;
1890
3.51M
         }
1891
1892
3.52M
         int exponent = 0;
1893
1894
3.52M
         if (end != itr)
1895
55.4k
         {
1896
55.4k
            if ('.' == (*itr))
1897
41.4k
            {
1898
41.4k
               const Iterator curr = ++itr;
1899
41.4k
               T tmp_d = T(0);
1900
1901
58.3k
               while (end != itr)
1902
25.1k
               {
1903
25.1k
                  unsigned int digit;
1904
25.1k
                  parse_digit_1(tmp_d)
1905
38.2k
                  parse_digit_1(tmp_d)
1906
33.7k
                  parse_digit_2(tmp_d)
1907
33.7k
               }
1908
1909
41.4k
               if (curr != itr)
1910
15.8k
               {
1911
15.8k
                  instate = true;
1912
1913
15.8k
                  const int frac_exponent = static_cast<int>(-std::distance(curr, itr));
1914
1915
15.8k
                  if (!valid_exponent<T>(frac_exponent, numeric::details::real_type_tag()))
1916
22
                     return false;
1917
1918
15.8k
                  d += compute_pow10(tmp_d, frac_exponent);
1919
15.8k
               }
1920
1921
41.4k
               #undef parse_digit_1
1922
41.4k
               #undef parse_digit_2
1923
41.4k
            }
1924
1925
55.3k
            if (end != itr)
1926
14.4k
            {
1927
14.4k
               typename std::iterator_traits<Iterator>::value_type c = (*itr);
1928
1929
14.4k
               if (('e' == c) || ('E' == c))
1930
14.4k
               {
1931
14.4k
                  int exp = 0;
1932
1933
14.4k
                  if (!details::string_to_type_converter_impl_ref(++itr, end, exp))
1934
117
                  {
1935
117
                     if (end == itr)
1936
21
                        return false;
1937
96
                     else
1938
<