25#include "types/result.hpp"
40 std::vector<std::string>
getFactors(
const std::string& _number);
58 std::string
getGreatestRootNum(
const std::string& _number,
const std::string& base =
"2");
66 bool isPrime(
const std::string& _number);
Utilities to operate numbers.
Definition factors.cpp:35
bool isPrime(const std::string &_number)
Check if a number is prime.
Definition factors.cpp:81
std::vector< std::string > getFactors(const std::string &_number)
Get the factors of a number.
Definition factors.cpp:36
ResultBool< std::string > isRoot(const std::string &_number, const std::string &base)
Check if a number is a root number.
Definition factors.cpp:87
ResultBool< std::string > getRootFactor(const std::string &_number, const std::string &base)
Get the largest factor of a number, that is a root number.
Definition factors.cpp:57
std::string getGreatestRootNum(const std::string &_number, const std::string &base)
Get the greatest root number less than or equal to the given number.
Definition factors.cpp:75
The namespace containing types used in the steppable calculator.
ResultBase< StatusBool, ResultT, StringLiteral{ "bool" }> ResultBool
An alias for a result of a boolean calculation.
Definition result.hpp:130