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
26
constexpr
__float128
SOR_PI_180
= 0.017453292519943295769236907684886127134
Q
;
27
28
30
constexpr
__float128
SOR_180_PI
= 57.295779513082320876798154814105170332405
Q
;
31
32
34
constexpr
__float128
SOR_2PI
= 6.283185307179586476925286766559005768394
Q
;
35
36
38
constexpr
__float128
SOR_MAX_SQR
= 1.797693134862315708145274237317043567981e+1936
Q
;
39
40
42
constexpr
unsigned
__int128
UINT128_MAX
= std::numeric_limits<unsigned __int128>::max();
43
44
46
constexpr
__int128
SOI_MIN
= std::numeric_limits<__int128>::min();
47
48
50
constexpr
__int128
SOI_MAX
= std::numeric_limits<__int128>::max();
51
52
54
constexpr
size_t
ULBITS
=
sizeof
(
unsigned
long ) * CHAR_BIT;
55
56
58
constexpr
size_t
ULCHUNKS
= 128 /
ULBITS
;
59
60
63
constexpr
size_t
MAX_SOR_PRECISION
= 34;
64
65
67
constexpr
int
BASE10
= 10;
68
69
71
enum class
AngularUnit
: std::uint8_t {
72
DEG
,
73
RAD
74
};
75
76
77
class
Context
;
78
79
82
using
core_t
= void(
Context
& );
Context
The context of execution.
Definition
context.h:46
UINT128_MAX
constexpr unsigned __int128 UINT128_MAX
Maximum unsigned int128.
Definition
helper.h:42
AngularUnit
AngularUnit
Angular Unit for trigonometric functions.
Definition
helper.h:71
AngularUnit::RAD
@ RAD
radian.
AngularUnit::DEG
@ DEG
degree.
ULCHUNKS
constexpr size_t ULCHUNKS
Number of unsigned longs fitting into an UINT128.
Definition
helper.h:58
core_t
void(Context &) core_t
A shortcut for the core code function type.
Definition
helper.h:82
ULBITS
constexpr size_t ULBITS
Number of bits in an unsigned long.
Definition
helper.h:54
BASE10
constexpr int BASE10
We use base 10.
Definition
helper.h:67
SOR_2PI
constexpr __float128 SOR_2PI
2pi.
Definition
helper.h:34
SOI_MIN
constexpr __int128 SOI_MIN
Minimum int128.
Definition
helper.h:46
MAX_SOR_PRECISION
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
SOR_180_PI
constexpr __float128 SOR_180_PI
180/pi.
Definition
helper.h:30
SOR_MAX_SQR
constexpr __float128 SOR_MAX_SQR
__float128 maximum that can be squared.
Definition
helper.h:38
SOI_MAX
constexpr __int128 SOI_MAX
Maximum int128.
Definition
helper.h:50
SOR_PI_180
constexpr __float128 SOR_PI_180
pi/180.
Definition
helper.h:26
OTCode::Q
@ Q
SOQ.
Generated on Sat Nov 7 2026 22:30:21 for Leonardus by
1.9.8