Leonardus
Loading...
Searching...
No Matches
helper.h
Go to the documentation of this file.
1
17#pragma once
18
19// Inc Library
20#include <cstdint>
21#include <limits>
22#include <climits>
23
24
26constexpr __float128 SOR_PI_180 = 0.017453292519943295769236907684886127134Q;
27
28
30constexpr __float128 SOR_180_PI = 57.295779513082320876798154814105170332405Q;
31
32
34constexpr __float128 SOR_2PI = 6.283185307179586476925286766559005768394Q;
35
36
38constexpr __float128 SOR_MAX_SQR = 1.797693134862315708145274237317043567981e+1936Q;
39
40
42constexpr unsigned __int128 UINT128_MAX = std::numeric_limits<unsigned __int128>::max();
43
44
46constexpr __int128 SOI_MIN = std::numeric_limits<__int128>::min();
47
48
50constexpr __int128 SOI_MAX = std::numeric_limits<__int128>::max();
51
52
54constexpr size_t ULBITS = sizeof( unsigned long ) * CHAR_BIT;
55
56
58constexpr size_t ULCHUNKS = 128 / ULBITS;
59
60
63constexpr size_t MAX_SOR_PRECISION = 34;
64
65
67constexpr int BASE10 = 10;
68
69
71enum class AngularUnit : std::uint8_t {
72 DEG,
73 RAD
74};
75
76
77class Context;
78
79
82using core_t = void( Context & );
The context of execution.
Definition context.h:46
constexpr unsigned __int128 UINT128_MAX
Maximum unsigned int128.
Definition helper.h:42
AngularUnit
Angular Unit for trigonometric functions.
Definition helper.h:71
@ RAD
radian.
@ DEG
degree.
constexpr size_t ULCHUNKS
Number of unsigned longs fitting into an UINT128.
Definition helper.h:58
void(Context &) core_t
A shortcut for the core code function type.
Definition helper.h:82
constexpr size_t ULBITS
Number of bits in an unsigned long.
Definition helper.h:54
constexpr int BASE10
We use base 10.
Definition helper.h:67
constexpr __float128 SOR_2PI
2pi.
Definition helper.h:34
constexpr __int128 SOI_MIN
Minimum int128.
Definition helper.h:46
constexpr size_t MAX_SOR_PRECISION
Valid decimal digits of a 113 bit mantissa of a 128 bit floating point number.
Definition helper.h:63
constexpr __float128 SOR_180_PI
180/pi.
Definition helper.h:30
constexpr __float128 SOR_MAX_SQR
__float128 maximum that can be squared.
Definition helper.h:38
constexpr __int128 SOI_MAX
Maximum int128.
Definition helper.h:50
constexpr __float128 SOR_PI_180
pi/180.
Definition helper.h:26
@ Q
SOQ.