// Copyright (C) 2026 Kiyotsugu Arai // SPDX-License-Identifier: LGPL-3.0-or-later // IntSpecialStates.hpp // Handling of special states for multi-precision integers #ifndef SANGI_INT_SPECIAL_STATES_HPP #define SANGI_INT_SPECIAL_STATES_HPP #include #include namespace sangi { /** * @brief Utility class for handling special states of multi-precision integers * * This class provides static methods for handling * special-state multi-precision integers such as NaN and infinity. */ class SANGI_API IntSpecialStates { public: // Special-state string conversion static std::string handleToString(const Int& value, int base = 10); // Special-state arithmetic handling static Int handleAddition(const Int& lhs, const Int& rhs); static Int handleSubtraction(const Int& lhs, const Int& rhs); static Int handleMultiplication(const Int& lhs, const Int& rhs); static Int handleDivision(const Int& lhs, const Int& rhs); static Int handleModulo(const Int& lhs, const Int& rhs); // Special-state comparison static bool compareLessThan(const Int& lhs, const Int& rhs); static bool compareEqual(const Int& lhs, const Int& rhs); }; } // namespace sangi #endif // SANGI_INT_SPECIAL_STATES_HPP