C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
exprtk::details::numeric::fast_exp< T, N > Struct Template Reference

#include <exprtk.hpp>

Static Public Member Functions

static T result (T v)
 

Detailed Description

template<typename T, unsigned int N>
struct exprtk::details::numeric::fast_exp< T, N >

Definition at line 1632 of file exprtk.hpp.

Member Function Documentation

◆ result()

template<typename T , unsigned int N>
static T exprtk::details::numeric::fast_exp< T, N >::result ( T  v)
inlinestatic

Definition at line 1634 of file exprtk.hpp.

1635 {
1636 unsigned int k = N;
1637 T l = T(1);
1638
1639 while (k)
1640 {
1641 if (1 == (k % 2))
1642 {
1643 l *= v;
1644 --k;
1645 }
1646
1647 v *= v;
1648 k /= 2;
1649 }
1650
1651 return l;
1652 }
bool match_impl(const Iterator pattern_begin, const Iterator pattern_end, const Iterator data_begin, const Iterator data_end, const typename std::iterator_traits< Iterator >::value_type &zero_or_more, const typename std::iterator_traits< Iterator >::value_type &exactly_one)
Definition exprtk.hpp:598

References exprtk::details::match_impl().

Referenced by exprtk::details::axn(), exprtk::details::axnb(), norm< T >::norm_impl(), exprtk::details::numeric::fast_exp< T, 10 >::result(), exprtk::details::numeric::fast_exp< T, 9 >::result(), exprtk::details::numeric::fast_exp< T, 8 >::result(), exprtk::details::numeric::fast_exp< T, 7 >::result(), exprtk::details::numeric::fast_exp< T, 6 >::result(), and exprtk::details::numeric::fast_exp< T, 5 >::result().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this struct was generated from the following file: