A C++ template library for embedded applications
Designed and maintained by
Aster Consulting Ltd
Join the ETL community

Constants

A set of compile time constants.

____________________________________________________________________________________________________
log.h

log

template <const size_t N, const size_t BASE>
struct log;
Defines the member value as the log of N to base BASE.
Set to the integer below the ideal floating point value.

____________________________________________________________________________________________________

log2

template <const size_t N>
struct log2;
Defines the member value as the log of N to base 2
Set to the integer below the ideal floating point value.

____________________________________________________________________________________________________

log10

template <const size_t N>
struct log10;
Defines the member value as the log of N to base 10
Set to the integer below the ideal floating point value.

____________________________________________________________________________________________________
power.h

power

template <const size_t N, const size_t POWER>
struct power;
Defines the member value as N raised to the power POWER.

____________________________________________________________________________________________________
sqrt.h

sqrt

template <const size_t N, const size_t I = 1>
struct sqrt;
Defines the member value as the largest integer that, when squared, is at less than or equal to N.

____________________________________________________________________________________________________
factorial.h

factorial

template <const size_t N>
struct factorial;
Defines the member value as the Nth factorial.

____________________________________________________________________________________________________
fibbonacci.h

fibbonacci

template <const size_t N>
struct fibbonacci;
Defines the member value as the Nth in the Fibbonacci sequence

____________________________________________________________________________________________________
math_constants.h

Namespace : etl::math

const double pi               = 3.14159265358979;
const double pi_reciprocal    = 0.31830988618379;
const double pi_squared       = 9.86960440108936;
const double e                = 2.71828182845905;
const double e_reciprocal     = 0.36787944117144;
const double e_squared        = 7.38905609893065;
const double root2            = 1.41421356237310;
const double root2_reciprocal = 0.70710678118655;
const double euler            = 0.57721566490153;
const double golden_ratio     = 1.61803398874989;
log.h / power.h / sqrt.h / factorial.h / fibbonacci.h /
math_constants.h