|
Leonardus
|
Algorithms. More...
#include <utility>#include <tuple>#include <string>#include <cstdint>#include <gmp.h>
Include dependency graph for algo.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | algo |
| Collection of numeric algorithms. | |
Functions | |
| std::tuple< __int128, __int128, __int128 > | algo::xgcd (__int128 p_a, __int128 p_b) |
| Extended Euclidean algorithm. | |
| bool | algo::isint128 (const std::string &p_str) |
| Is the string a 128 bit integer. | |
| bool | algo::isint128 (const mpz_t p_x) |
| Is the multiple precision integer a 128 bit integer. | |
| bool | algo::hasFloatSyntax (const std::string &p_str) |
| Checks, if the string has the syntax of a float. | |
| bool | algo::hasRationalSyntax (const std::string &p_str) |
| Checks, if the string has the syntax of a rational number. | |
| bool | algo::isSquareFree (__int128 p_n) |
| Checks if an integer is square free. | |
| std::pair< int32_t, uint32_t > | algo::rand (uint32_t p_seed) |
| ISO C rand_r() for 32 bit. | |
| __int128 | algo::mmod (__int128 p_d, __int128 p_m) |
| Mathematical modulus. | |
Algorithms.
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/.