E.V.E  0.1-beta
Constants

This module provides all the function and function objects for generating constants. More...

Detailed Description

This module provides all the function and function objects for generating constants.

EVE provides callable objects able to generate the value of various constants used in various settings from a type specifier passed as argument. The constant name is available by using the following directive:

#include <eve/constant/name.hpp>

Example

See it live on Compiler Explorer

//==================================================================================================
/*
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
*/
//==================================================================================================
#include <eve/wide.hpp>
#include <eve/constant/pi.hpp>
#include <eve/constant/signmask.hpp>
#include <iostream>
int main()
{
using eve::wide;
// Generates the constant Pi of the same type than 4.
std::cout << eve::pi( eve::as(4.) ) << "\n";
// Generates a wide<int> filled with the appropriate sign mask
std::cout << std::hex << eve::signmask( eve::as<wide<int>>{} ) << "\n";
}
constexpr callable_signmask_ signmask
Callable object computing the sign mask value.
Definition: signmask.hpp:55
constexpr callable_pi_ pi
Callable object computing the value.
Definition: pi.hpp:54
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65


Variables

constexpr callable_as_value_ eve::as_value = {}
 Callable object that converts eve constant or just a value to a type. Useful in a generic context. More...
 
constexpr callable_allbits_ eve::allbits = {}
 Callable object computing the allbits value. More...
 
constexpr callable_bitincrement_ eve::bitincrement = {}
 Callable object computing the bit increment. More...
 
constexpr callable_eps_ eve::eps = {}
 Callable object computing the machine epsilon. More...
 
constexpr callable_exponentmask_ eve::exponentmask = {}
 Callable object computing the exponent bit mask. More...
 
constexpr callable_false__ eve::false_ = {}
 Callable object computing the logical false_ value. More...
 
constexpr callable_half_ eve::half = {}
 Callable object computing the greatest positive value. More...
 
constexpr callable_halfeps_ eve::halfeps = {}
 Callable object computing the the half of the machine epsilon. More...
 
constexpr callable_inf_ eve::inf = {}
 Callable object computing the infinity ieee value. More...
 
constexpr callable_invlog10_2_ eve::invlog10_2 = {}
 Callable object computing 1/log10(2). More...
 
constexpr callable_invlog_10_ eve::invlog_10 = {}
 Callable object computing 1/log(10). More...
 
constexpr callable_invlog_2_ eve::invlog_2 = {}
 Callable object computing 1/log(2). More...
 
constexpr callable_invpi_ eve::invpi = {}
 Callable object computing \(\pi^{-1}\). More...
 
constexpr callable_invsqrt_2_ eve::invsqrt_2 = {}
 Callable object computing \(2^{-1/2}\). More...
 
constexpr callable_limitexponent_ eve::limitexponent = {}
 Callable object computing the greatest exponent value plus one. More...
 
constexpr callable_log_2_ eve::log_2 = {}
 Callable object computing \(\\log 2\). More...
 
constexpr callable_logeps_ eve::logeps = {}
 Callable object computing the logaritm of the machine epsilon. More...
 
constexpr callable_mantissamask_ eve::mantissamask = {}
 Callable object computing the mantissa bit mask. More...
 
constexpr callable_maxexponent_ eve::maxexponent = {}
 Callable object computing the greatest exponent value. More...
 
constexpr callable_maxexponentm1_ eve::maxexponentm1 = {}
 Callable object computing the greatest exponent value minus one. More...
 
constexpr callable_maxflint_ eve::maxflint = {}
 Callable object computing the greatest real n representing an integer and such that n != n+1. More...
 
constexpr callable_maxlog_ eve::maxlog = {}
 Callable object computing the greatest positive value for which eve::exp returns a finite result. More...
 
constexpr callable_maxlog10_ eve::maxlog10 = {}
 Callable object computing the greatest positive value for which eve::exp10 returns a finite result. More...
 
constexpr callable_maxlog2_ eve::maxlog2 = {}
 Callable object computing the greatest positive value for which eve::exp2 returns a finite result. More...
 
constexpr callable_mhalf_ eve::mhalf = {}
 Callable object computing the value negated half value. More...
 
constexpr callable_mindenormal_ eve::mindenormal = {}
 Callable object computing the least denormal positive value. More...
 
constexpr callable_minexponent_ eve::minexponent = {}
 Callable object computing the least exponent value. More...
 
constexpr callable_minf_ eve::minf = {}
 Callable object computing the negative infinity value. More...
 
constexpr callable_minlog_ eve::minlog = {}
 Callable object computing the least value for which eve::exp returns a non denormal result. More...
 
constexpr callable_minlog10_ eve::minlog10 = {}
 Callable object computing the least value for which eve::exp10 returns a non zero result. More...
 
constexpr callable_minlog10denormal_ eve::minlog10denormal = {}
 Callable object computing the least value for which eve::exp returns a non denormal result. More...
 
constexpr callable_minlog2_ eve::minlog2 = {}
 Callable object computing the least value for which eve::exp2 returns a non denormal result. More...
 
constexpr callable_minlog2denormal_ eve::minlog2denormal = {}
 Callable object computing the least value for which eve::exp2 returns a non zero result. More...
 
constexpr callable_minlogdenormal_ eve::minlogdenormal = {}
 Callable object computing the least value for which eve::exp returns a non zero result. More...
 
constexpr callable_mone_ eve::mone = {}
 Callable object computing -1 value. More...
 
constexpr callable_mzero_ eve::mzero = {}
 Callable object computing the negative zero value. More...
 
constexpr callable_nan_ eve::nan = {}
 Callable object computing the nan value. More...
 
constexpr callable_nbmantissabits_ eve::nbmantissabits = {}
 Callable object computing the number of mantissa bits. More...
 
constexpr callable_one_ eve::one = {}
 Callable object computing the 1 value. More...
 
constexpr callable_oneosqrteps_ eve::oneosqrteps = {}
 Callable object computing the inverse of the square root of the machine epsilon. More...
 
constexpr callable_oneotwoeps_ eve::oneotwoeps = {}
 Callable object computing half the inverse of the machine epsilon. More...
 
constexpr callable_pi_ eve::pi = {}
 Callable object computing the \(\pi\) value. More...
 
constexpr callable_pio_2_ eve::pio_2 = {}
 Callable object computing the \(\pi/2\) value. More...
 
constexpr callable_pio_4_ eve::pio_4 = {}
 Callable object computing the \(\pi/4\) value. More...
 
constexpr callable_signmask_ eve::signmask = {}
 Callable object computing the sign mask value. More...
 
constexpr callable_smallestposval_ eve::smallestposval = {}
 Callable object computing the smallest normal positive value. More...
 
constexpr callable_sqrt_2_ eve::sqrt_2 = {}
 Callable object computing the square root of 2 value. More...
 
constexpr callable_sqrt_2o_2_ eve::sqrt_2o_2 = {}
 Callable object computing the halfed square root of 2 value. More...
 
constexpr callable_sqrteps_ eve::sqrteps = {}
 Callable object computing the square root of the machine epsilon value. More...
 
constexpr callable_sqrtvalmax_ eve::sqrtvalmax = {}
 Callable object computing the greatest value less than the square root of the greatest value. More...
 
constexpr callable_true__ eve::true_ = {}
 Callable object computing the logical true_ value. More...
 
constexpr callable_twoopi_ eve::twoopi = {}
 Callable object computing the \(2/\pi\) value. More...
 
constexpr callable_twopi_ eve::twopi = {}
 Callable object computing the \(2\pi\) value. More...
 
constexpr callable_twotonmb_ eve::twotonmb = {}
 Callable object computing the 2 power of the number of mantissa bits. More...
 
constexpr callable_valmax_ eve::valmax = {}
 Callable object computing the greatest representable value. More...
 
constexpr callable_valmin_ eve::valmin = {}
 Callable object computing the lowest representable value. More...
 
constexpr callable_zero_ eve::zero = {}
 Callable object computing the O value. More...