Leonardus
Loading...
Searching...
No Matches
Typedefs | Enumerations | Variables
helper.h File Reference

Miscellaneous definitions and functions. More...

#include <cstdint>
#include <limits>
#include <climits>
+ Include dependency graph for helper.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using core_t = void(Context &)
 A shortcut for the core code function type.
 

Enumerations

enum class  AngularUnit : std::uint8_t { DEG , RAD }
 Angular Unit for trigonometric functions. More...
 

Variables

constexpr __float128 SOR_PI_180 = 0.017453292519943295769236907684886127134Q
 pi/180.
 
constexpr __float128 SOR_180_PI = 57.295779513082320876798154814105170332405Q
 180/pi.
 
constexpr __float128 SOR_2PI = 6.283185307179586476925286766559005768394Q
 2pi.
 
constexpr __float128 SOR_MAX_SQR = 1.797693134862315708145274237317043567981e+1936Q
 __float128 maximum that can be squared.
 
constexpr unsigned __int128 UINT128_MAX = std::numeric_limits<unsigned __int128>::max()
 Maximum unsigned int128.
 
constexpr __int128 SOI_MIN = std::numeric_limits<__int128>::min()
 Minimum int128.
 
constexpr __int128 SOI_MAX = std::numeric_limits<__int128>::max()
 Maximum int128.
 
constexpr size_t ULBITS = sizeof( unsigned long ) * CHAR_BIT
 Number of bits in an unsigned long.
 
constexpr size_t ULCHUNKS = 128 / ULBITS
 Number of unsigned longs fitting into an UINT128.
 
constexpr size_t MAX_SOR_PRECISION = 34
 Valid decimal digits of a 113 bit mantissa of a 128 bit floating point number.
 
constexpr int BASE10 = 10
 We use base 10.
 

Detailed Description

Miscellaneous definitions and functions.

Typedef Documentation

◆ core_t

using core_t = void( Context & )

A shortcut for the core code function type.

The core code functions are the C++ implementations of the operators.

Enumeration Type Documentation

◆ AngularUnit

enum class AngularUnit : std::uint8_t
strong

Angular Unit for trigonometric functions.

Enumerator
DEG 

degree.

RAD 

radian.

Variable Documentation

◆ MAX_SOR_PRECISION

constexpr size_t MAX_SOR_PRECISION = 34
constexpr

Valid decimal digits of a 113 bit mantissa of a 128 bit floating point number.

It's the $ \lfloor log_{10}(2^{113})\rfloor $.