|
Leonardus
|
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. | |
Miscellaneous definitions and functions.
Leonardus, a minimalist stack-based programming system. Copyright (C) 2025 Andreas Muckenschnabel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
A shortcut for the core code function type.
The core code functions are the C++ implementations of the operators.
|
strong |
|
constexpr |
Valid decimal digits of a 113 bit mantissa of a 128 bit floating point number.
It's the 