Leonardus
|
Miscellaneous definitions and functions. More...
#include <cstdint>
#include <limits>
#include <climits>
#include <gmp.h>
Go to the source code of this file.
Typedefs | |
using | core_t = void(Context &) |
A shortcut for the core code functions, the C++ implementations of the operators. | |
Enumerations | |
enum class | AngularUnit : std::uint8_t { DEG , RAD } |
Angular Unit for trigonometric functions. | |
Functions | |
void | helper_init () |
Initializes MPZ_ global pseudo-constants. More... | |
void | helper_clear () |
Clears MPZ_ global pseudo-constants. | |
Variables | |
constexpr __float128 | M_PI_180q = 0.017453292519943295769236907684886127134Q |
pi/180. | |
constexpr __float128 | M_180_PIq = 57.295779513082320876798154814105170332405Q |
180/pi. | |
constexpr __float128 | M_2PIq = 6.283185307179586476925286766559005768394Q |
2pi. | |
constexpr unsigned __int128 | UINT128_MAX = std::numeric_limits<unsigned __int128>::max() |
Maximum unsigned int128. | |
constexpr __int128 | INT128_MIN = std::numeric_limits<__int128>::min() |
Minimum int128. | |
constexpr __int128 | INT128_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. | |
mpz_t | MPZ_ZERO |
mpz_t 0 initialized by helper_init(). | |
mpz_t | MPZ_ONE |
mpz_t 1 initialized by helper_init(). | |
mpz_t | MPZ_INT128_MIN |
mpz_t -2^127 initialized by helper_init(). | |
mpz_t | MPZ_INT128_MAX |
mpz_t 2^127-1 initialized by helper_init(). | |
constexpr size_t | maxrealprecision = 34 |
Valid decimal digits of a 113 bit mantissa of a 128 bit floating point number. More... | |
constexpr size_t | maxarraynesting = 1000 |
The maximum number of nesting levels of procedures accepted by the bind operator. | |
constexpr size_t | maxtreeheight = 1999 |
The maximum number of nesting levels of composite semantic objects. | |
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/.
void helper_init | ( | ) |
Initializes MPZ_ global pseudo-constants.
Since GMP has no static initialization, we use this style of initialization.
|
constexpr |
Valid decimal digits of a 113 bit mantissa of a 128 bit floating point number.
It's the .