- More Documentation
This commit is contained in:
@@ -26,165 +26,268 @@ inline void float_h()
|
||||
{
|
||||
std::ofstream out("fennec/lang/float.h");
|
||||
|
||||
out << "// =====================================================================================================================" << std::endl;
|
||||
out << "// fennec, a free and open source game engine" << std::endl;
|
||||
out << "// Copyright © 2025 - 2026 Medusa Slockbower" << std::endl;
|
||||
out << "//" << std::endl;
|
||||
out << "// This program is free software: you can redistribute it and/or modify" << std::endl;
|
||||
out << "// it under the terms of the GNU General Public License as published by" << std::endl;
|
||||
out << "// the Free Software Foundation, either version 3 of the License, or" << std::endl;
|
||||
out << "// (at your option) any later version." << std::endl;
|
||||
out << "//" << std::endl;
|
||||
out << "// This program is distributed in the hope that it will be useful," << std::endl;
|
||||
out << "// but WITHOUT ANY WARRANTY; without even the implied warranty of" << std::endl;
|
||||
out << "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" << std::endl;
|
||||
out << "// GNU General Public License for more details." << std::endl;
|
||||
out << "//" << std::endl;
|
||||
out << "// You should have received a copy of the GNU General Public License" << std::endl;
|
||||
out << "// along with this program. If not, see <https://www.gnu.org/licenses/>." << std::endl;
|
||||
out << "// =====================================================================================================================" << std::endl;
|
||||
out << "// =====================================================================================================================" << '\n';
|
||||
out << "// fennec, a free and open source game engine" << '\n';
|
||||
out << "// Copyright © 2025 - 2026 Medusa Slockbower" << '\n';
|
||||
out << "//" << '\n';
|
||||
out << "// This program is free software: you can redistribute it and/or modify" << '\n';
|
||||
out << "// it under the terms of the GNU General Public License as published by" << '\n';
|
||||
out << "// the Free Software Foundation, either version 3 of the License, or" << '\n';
|
||||
out << "// (at your option) any later version." << '\n';
|
||||
out << "//" << '\n';
|
||||
out << "// This program is distributed in the hope that it will be useful," << '\n';
|
||||
out << "// but WITHOUT ANY WARRANTY; without even the implied warranty of" << '\n';
|
||||
out << "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" << '\n';
|
||||
out << "// GNU General Public License for more details." << '\n';
|
||||
out << "//" << '\n';
|
||||
out << "// You should have received a copy of the GNU General Public License" << '\n';
|
||||
out << "// along with this program. If not, see <https://www.gnu.org/licenses/>." << '\n';
|
||||
out << "// =====================================================================================================================" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
out << "///" << std::endl;
|
||||
out << "/// \\file fennec/lang/float.h" << std::endl;
|
||||
out << "/// \\brief metaprogramming floating point type info" << std::endl;
|
||||
out << "///" << std::endl;
|
||||
out << "///" << std::endl;
|
||||
out << "/// \\details this file is automatically generated for the current build environment" << std::endl;
|
||||
out << "///" << std::endl;
|
||||
out << "/// \\copyright Copyright © 2025 - 2026 Medusa Slockbower ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html))" << std::endl;
|
||||
out << "///" << std::endl;
|
||||
out << "///" << std::endl;
|
||||
out << "///" << '\n';
|
||||
out << "/// \\file fennec/lang/float.h" << '\n';
|
||||
out << "/// \\brief metaprogramming floating point type info" << '\n';
|
||||
out << "///" << '\n';
|
||||
out << "///" << '\n';
|
||||
out << "/// \\details This file is automatically generated for the current build environment." << '\n';
|
||||
out << "///" << '\n';
|
||||
out << "/// Environment for this build: " FENNEC_LONG_COMPILER_NAME << '\n';
|
||||
out << "///" << '\n';
|
||||
out << "/// \\copyright Copyright © 2025 - 2026 Medusa Slockbower ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html))" << '\n';
|
||||
out << "///" << '\n';
|
||||
out << "///" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
out << "#ifndef FENNEC_LANG_FLOAT_H" << std::endl;
|
||||
out << "#define FENNEC_LANG_FLOAT_H" << std::endl;
|
||||
out << "#ifndef FENNEC_LANG_FLOAT_H" << '\n';
|
||||
out << "#define FENNEC_LANG_FLOAT_H" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
out << "#include <fennec/lang/bits.h>" << std::endl;
|
||||
out << "#include <fennec/lang/bits.h>" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
// MAYBE TODO: Generate info without C++ STDLIB to compile natively on platforms without support
|
||||
|
||||
out << "#undef FLT_HAS_INFINITY" << std::endl;
|
||||
out << "#undef FLT_HAS_QUIET_NAN" << std::endl;
|
||||
out << "#undef FLT_HAS_SIGNALING_NAN" << std::endl;
|
||||
out << "#undef FLT_HAS_DENORM" << std::endl;
|
||||
out << "#undef FLT_HAS_DENORM_LOSS" << std::endl;
|
||||
out << "#undef FLT_ROUNDS" << std::endl;
|
||||
out << "#undef FLT_IS_IEC559" << std::endl;
|
||||
out << "#undef FLT_MANT_DIG" << std::endl;
|
||||
out << "#undef FLT_DIG" << std::endl;
|
||||
out << "#undef FLT_DECIMAL_DIG" << std::endl;
|
||||
out << "#undef FLT_RADIX" << std::endl;
|
||||
out << "#undef FLT_MIN_EXP" << std::endl;
|
||||
out << "#undef FLT_MAX_EXP" << std::endl;
|
||||
out << "#undef FLT_MIN_10_EXP" << std::endl;
|
||||
out << "#undef FLT_MAX_10_EXP" << std::endl;
|
||||
out << "#undef FLT_TRAPS" << std::endl;
|
||||
out << "#undef FLT_TINYNESS_BEFORE" << std::endl;
|
||||
out << "#undef FLT_MIN" << std::endl;
|
||||
out << "#undef FLT_MAX" << std::endl;
|
||||
out << "#undef FLT_EPSILON" << std::endl;
|
||||
out << "#undef FLT_INF" << std::endl;
|
||||
out << "#undef FLT_QUIET_NAN" << std::endl;
|
||||
out << "#undef FLT_SIGNALING_NAN" << std::endl;
|
||||
out << "#undef FLT_DENORM_MIN" << std::endl;
|
||||
out << "#undef FLT_ROUND_ERR" << std::endl;
|
||||
out << "#undef FLT_HAS_INFINITY" << '\n';
|
||||
out << "#undef FLT_HAS_QUIET_NAN" << '\n';
|
||||
out << "#undef FLT_HAS_SIGNALING_NAN" << '\n';
|
||||
out << "#undef FLT_HAS_DENORM" << '\n';
|
||||
out << "#undef FLT_HAS_DENORM_LOSS" << '\n';
|
||||
out << "#undef FLT_ROUNDS" << '\n';
|
||||
out << "#undef FLT_IS_IEC559" << '\n';
|
||||
out << "#undef FLT_MANT_DIG" << '\n';
|
||||
out << "#undef FLT_DIG" << '\n';
|
||||
out << "#undef FLT_DECIMAL_DIG" << '\n';
|
||||
out << "#undef FLT_RADIX" << '\n';
|
||||
out << "#undef FLT_MIN_EXP" << '\n';
|
||||
out << "#undef FLT_MAX_EXP" << '\n';
|
||||
out << "#undef FLT_MIN_10_EXP" << '\n';
|
||||
out << "#undef FLT_MAX_10_EXP" << '\n';
|
||||
out << "#undef FLT_TRAPS" << '\n';
|
||||
out << "#undef FLT_TINYNESS_BEFORE" << '\n';
|
||||
out << "#undef FLT_MIN" << '\n';
|
||||
out << "#undef FLT_MAX" << '\n';
|
||||
out << "#undef FLT_EPSILON" << '\n';
|
||||
out << "#undef FLT_INF" << '\n';
|
||||
out << "#undef FLT_QUIET_NAN" << '\n';
|
||||
out << "#undef FLT_SIGNALING_NAN" << '\n';
|
||||
out << "#undef FLT_DENORM_MIN" << '\n';
|
||||
out << "#undef FLT_ROUND_ERR" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
|
||||
out << "#define FLT_HAS_INFINITY " << std::dec << std::numeric_limits<float>::has_infinity << std::endl;
|
||||
out << "#define FLT_HAS_QUIET_NAN " << std::dec << std::numeric_limits<float>::has_quiet_NaN << std::endl;
|
||||
out << "#define FLT_HAS_SIGNALING_NAN " << std::dec << std::numeric_limits<float>::has_signaling_NaN << std::endl;
|
||||
out << "#define FLT_HAS_DENORM " << std::dec << std::numeric_limits<float>::has_denorm << std::endl;
|
||||
out << "#define FLT_HAS_DENORM_LOSS " << std::dec << std::numeric_limits<float>::has_denorm_loss << std::endl;
|
||||
out << "#define FLT_ROUNDS " << std::dec << std::numeric_limits<float>::round_style << std::endl;
|
||||
out << "#define FLT_IS_IEC559 " << std::dec << std::numeric_limits<float>::is_iec559 << std::endl;
|
||||
out << "#define FLT_MANT_DIG " << std::dec << std::numeric_limits<float>::digits << std::endl;
|
||||
out << "#define FLT_DIG " << std::dec << std::numeric_limits<float>::digits10 << std::endl;
|
||||
out << "#define FLT_DECIMAL_DIG " << std::dec << std::numeric_limits<float>::max_digits10 << std::endl;
|
||||
out << "#define FLT_RADIX " << std::dec << std::numeric_limits<float>::radix << std::endl;
|
||||
out << "#define FLT_MIN_EXP " << std::dec << std::numeric_limits<float>::min_exponent << std::endl;
|
||||
out << "#define FLT_MAX_EXP " << std::dec << std::numeric_limits<float>::max_exponent << std::endl;
|
||||
out << "#define FLT_MIN_10_EXP " << std::dec << std::numeric_limits<float>::min_exponent10 << std::endl;
|
||||
out << "#define FLT_MAX_10_EXP " << std::dec << std::numeric_limits<float>::max_exponent10 << std::endl;
|
||||
out << "#define FLT_TRAPS " << std::dec << std::numeric_limits<float>::traps << std::endl;
|
||||
out << "#define FLT_TINYNESS_BEFORE " << std::dec << std::numeric_limits<float>::tinyness_before << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
out << "#define FLT_MIN " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::min() ) << ")" << std::endl;
|
||||
out << "#define FLT_MAX " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::max() ) << ")" << std::endl;
|
||||
out << "#define FLT_EPSILON " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::epsilon() ) << ")" << std::endl;
|
||||
out << "#define FLT_INF " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::infinity() ) << ")" << std::endl;
|
||||
out << "#define FLT_QUIET_NAN " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::quiet_NaN() ) << ")" << std::endl;
|
||||
out << "#define FLT_SIGNALING_NAN " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::signaling_NaN()) << ")" << std::endl;
|
||||
out << "#define FLT_DENORM_MIN " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::denorm_min() ) << ")" << std::endl;
|
||||
out << "#define FLT_ROUND_ERR " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::round_error() ) << ")" << std::endl;
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief Does \f$float\f$ have an infinity?)" << '\n';
|
||||
out << "#define FLT_HAS_INFINITY " << std::dec << std::numeric_limits<float>::has_infinity << '\n';
|
||||
|
||||
out << "#undef DBL_HAS_INFINITY" << std::endl;
|
||||
out << "#undef DBL_HAS_QUIET_NAN" << std::endl;
|
||||
out << "#undef DBL_HAS_SIGNALING_NAN" << std::endl;
|
||||
out << "#undef DBL_HAS_DENORM" << std::endl;
|
||||
out << "#undef DBL_HAS_DENORM_LOSS" << std::endl;
|
||||
out << "#undef DBL_ROUNDS" << std::endl;
|
||||
out << "#undef DBL_IS_IEC559" << std::endl;
|
||||
out << "#undef DBL_MANT_DIG" << std::endl;
|
||||
out << "#undef DBL_DIG" << std::endl;
|
||||
out << "#undef DBL_DECIMAL_DIG" << std::endl;
|
||||
out << "#undef DBL_RADIX" << std::endl;
|
||||
out << "#undef DBL_MIN_EXP" << std::endl;
|
||||
out << "#undef DBL_MAX_EXP" << std::endl;
|
||||
out << "#undef DBL_MIN_10_EXP" << std::endl;
|
||||
out << "#undef DBL_MAX_10_EXP" << std::endl;
|
||||
out << "#undef DBL_TRAPS" << std::endl;
|
||||
out << "#undef DBL_TINYNESS_BEFORE" << std::endl;
|
||||
out << "#undef DBL_MIN" << std::endl;
|
||||
out << "#undef DBL_MAX" << std::endl;
|
||||
out << "#undef DBL_EPSILON" << std::endl;
|
||||
out << "#undef DBL_INF" << std::endl;
|
||||
out << "#undef DBL_QUIET_NAN" << std::endl;
|
||||
out << "#undef DBL_SIGNALING_NAN" << std::endl;
|
||||
out << "#undef DBL_DENORM_MIN" << std::endl;
|
||||
out << "#undef DBL_ROUND_ERR" << std::endl;
|
||||
out << R"(/// \brief Does \f$float\f$ have a quiet NaN?)" << '\n';
|
||||
out << "#define FLT_HAS_QUIET_NAN " << std::dec << std::numeric_limits<float>::has_quiet_NaN << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief Does \f$float\f$ have a signaling NaN?)" << '\n';
|
||||
out << "#define FLT_HAS_SIGNALING_NAN " << std::dec << std::numeric_limits<float>::has_signaling_NaN << '\n';
|
||||
|
||||
out << "#define DBL_HAS_INFINITY " << std::dec << std::numeric_limits<double>::has_infinity << std::endl;
|
||||
out << "#define DBL_HAS_QUIET_NAN " << std::dec << std::numeric_limits<double>::has_quiet_NaN << std::endl;
|
||||
out << "#define DBL_HAS_SIGNALING_NAN " << std::dec << std::numeric_limits<double>::has_signaling_NaN << std::endl;
|
||||
out << "#define DBL_HAS_DENORM " << std::dec << std::numeric_limits<double>::has_denorm << std::endl;
|
||||
out << "#define DBL_HAS_DENORM_LOSS " << std::dec << std::numeric_limits<double>::has_denorm_loss << std::endl;
|
||||
out << "#define DBL_ROUNDS " << std::dec << std::numeric_limits<double>::round_style << std::endl;
|
||||
out << "#define DBL_IS_IEC559 " << std::dec << std::numeric_limits<double>::is_iec559 << std::endl;
|
||||
out << "#define DBL_MANT_DIG " << std::dec << std::numeric_limits<double>::digits << std::endl;
|
||||
out << "#define DBL_DIG " << std::dec << std::numeric_limits<double>::digits10 << std::endl;
|
||||
out << "#define DBL_DECIMAL_DIG " << std::dec << std::numeric_limits<double>::max_digits10 << std::endl;
|
||||
out << "#define DBL_RADIX " << std::dec << std::numeric_limits<double>::radix << std::endl;
|
||||
out << "#define DBL_MIN_EXP " << std::dec << std::numeric_limits<double>::min_exponent << std::endl;
|
||||
out << "#define DBL_MAX_EXP " << std::dec << std::numeric_limits<double>::max_exponent << std::endl;
|
||||
out << "#define DBL_MIN_10_EXP " << std::dec << std::numeric_limits<double>::min_exponent10 << std::endl;
|
||||
out << "#define DBL_MAX_10_EXP " << std::dec << std::numeric_limits<double>::max_exponent10 << std::endl;
|
||||
out << "#define DBL_TRAPS " << std::dec << std::numeric_limits<double>::traps << std::endl;
|
||||
out << "#define DBL_TINYNESS_BEFORE " << std::dec << std::numeric_limits<double>::tinyness_before << std::endl;
|
||||
out << R"(/// \brief Does \f$float\f$ use denormalization?)" << '\n';
|
||||
out << "#define FLT_HAS_DENORM " << std::dec << std::numeric_limits<float>::has_denorm << '\n';
|
||||
|
||||
out << "#define DBL_MIN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::min() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_MAX " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::max() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_EPSILON " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::epsilon() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_INF " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::infinity() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_QUIET_NAN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::quiet_NaN() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_SIGNALING_NAN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::signaling_NaN()) << "ll)" << std::endl;
|
||||
out << "#define DBL_DENORM_MIN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::denorm_min() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_ROUND_ERR " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::round_error() ) << "ll)" << std::endl;
|
||||
out << R"(/// \brief Does \f$float\f$ have loss with denormalization?)" << '\n';
|
||||
out << "#define FLT_HAS_DENORM_LOSS " << std::dec << std::numeric_limits<float>::has_denorm_loss << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief What rounding style does \f$float\f$ use?)" << '\n';
|
||||
out << "#define FLT_ROUNDS " << std::dec << std::numeric_limits<float>::round_style << '\n';
|
||||
|
||||
out << "#endif // FENNEC_LANG_FLOAT_H" << std::endl;
|
||||
out << R"(/// \brief Does \f$float\f$ use the IEEE floating point specification?)" << '\n';
|
||||
out << "#define FLT_IS_IEC559 " << std::dec << std::numeric_limits<float>::is_iec559 << '\n';
|
||||
|
||||
out << R"(/// \brief The number of mantissa bits in \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_MANT_DIG " << std::dec << std::numeric_limits<float>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief The number of decimal digits guaranteed to be preserved in a \f$float\f$ → \f$text\f$ → \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_DIG " << std::dec << std::numeric_limits<float>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The decimal precision required to serialize and deserialize a \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_DECIMAL_DIG " << std::dec << std::numeric_limits<float>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The radix, or integer base, used to represent a \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_RADIX " << std::dec << std::numeric_limits<float>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief The minimum negative integer such that \f${FLT_RADIX}^{FLT_MIN_EXP}\f$ results in a normalized \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_MIN_EXP " << std::dec << std::numeric_limits<float>::min_exponent << '\n';
|
||||
|
||||
out << R"(/// \brief The maximum positive integer such that \f${FLT_RADIX}^{FLT_MAX_EXP}\f$ results in a non-infinite \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_MAX_EXP " << std::dec << std::numeric_limits<float>::max_exponent << '\n';
|
||||
|
||||
out << R"(/// \brief The minimum negative integer such that \f${10}^{FLT_MIN_EXP}\f$ results in a normalized \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_MIN_10_EXP " << std::dec << std::numeric_limits<float>::min_exponent10 << '\n';
|
||||
|
||||
out << R"(/// \brief The maximum positive integer such that \f${10}^{FLT_MAX_EXP}\f$ results in a non-infinite \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_MAX_10_EXP " << std::dec << std::numeric_limits<float>::max_exponent10 << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$float\f$ trap?)" << '\n';
|
||||
out << "#define FLT_TRAPS " << std::dec << std::numeric_limits<float>::traps << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$float\f$ check for underflow?)" << '\n';
|
||||
out << "#define FLT_TINYNESS_BEFORE " << std::dec << std::numeric_limits<float>::tinyness_before << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest positive, finite, normal value of \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_MIN " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::min() ) << ")" << '\n';
|
||||
|
||||
out << R"(/// \brief Largest positive, finite value of \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_MAX " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::max() ) << ")" << '\n';
|
||||
|
||||
out << R"(/// \brief The difference between \f$1.0\f$ and the next representable value of \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_EPSILON " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::epsilon() ) << ")" << '\n';
|
||||
|
||||
out << R"(/// \brief A value representing \f$\inf\f$ of type \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_INF " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::infinity() ) << ")" << '\n';
|
||||
|
||||
out << R"(/// \brief A value representing \f$NaN\f$ of type \f$float\f$ that does not trap.)" << '\n';
|
||||
out << "#define FLT_QUIET_NAN " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::quiet_NaN() ) << ")" << '\n';
|
||||
|
||||
out << R"(/// \brief A value representing \f$NaN\f$ of type \f$float\f$ that traps.)" << '\n';
|
||||
out << "#define FLT_SIGNALING_NAN " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::signaling_NaN()) << ")" << '\n';
|
||||
|
||||
out << R"(/// \brief Smallest positive, finite, subnormal value of \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_DENORM_MIN " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::denorm_min() ) << ")" << '\n';
|
||||
|
||||
out << R"(/// \brief Maximum rounding error of type \f$float\f$.)" << '\n';
|
||||
out << "#define FLT_ROUND_ERR " << "fennec::bit_cast<float>(0x" << std::hex << std::bit_cast<int>(std::numeric_limits<float>::round_error() ) << ")" << '\n';
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
out << "#undef DBL_HAS_INFINITY" << '\n';
|
||||
out << "#undef DBL_HAS_QUIET_NAN" << '\n';
|
||||
out << "#undef DBL_HAS_SIGNALING_NAN" << '\n';
|
||||
out << "#undef DBL_HAS_DENORM" << '\n';
|
||||
out << "#undef DBL_HAS_DENORM_LOSS" << '\n';
|
||||
out << "#undef DBL_ROUNDS" << '\n';
|
||||
out << "#undef DBL_IS_IEC559" << '\n';
|
||||
out << "#undef DBL_MANT_DIG" << '\n';
|
||||
out << "#undef DBL_DIG" << '\n';
|
||||
out << "#undef DBL_DECIMAL_DIG" << '\n';
|
||||
out << "#undef DBL_RADIX" << '\n';
|
||||
out << "#undef DBL_MIN_EXP" << '\n';
|
||||
out << "#undef DBL_MAX_EXP" << '\n';
|
||||
out << "#undef DBL_MIN_10_EXP" << '\n';
|
||||
out << "#undef DBL_MAX_10_EXP" << '\n';
|
||||
out << "#undef DBL_TRAPS" << '\n';
|
||||
out << "#undef DBL_TINYNESS_BEFORE" << '\n';
|
||||
out << "#undef DBL_MIN" << '\n';
|
||||
out << "#undef DBL_MAX" << '\n';
|
||||
out << "#undef DBL_EPSILON" << '\n';
|
||||
out << "#undef DBL_INF" << '\n';
|
||||
out << "#undef DBL_QUIET_NAN" << '\n';
|
||||
out << "#undef DBL_SIGNALING_NAN" << '\n';
|
||||
out << "#undef DBL_DENORM_MIN" << '\n';
|
||||
out << "#undef DBL_ROUND_ERR" << '\n';
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Does \f$double\f$ have an infinity?)" << '\n';
|
||||
out << "#define DBL_HAS_INFINITY " << std::dec << std::numeric_limits<double>::has_infinity << '\n';
|
||||
|
||||
out << R"(/// \brief Does \f$double\f$ have a quiet NaN?)" << '\n';
|
||||
out << "#define DBL_HAS_QUIET_NAN " << std::dec << std::numeric_limits<double>::has_quiet_NaN << '\n';
|
||||
|
||||
out << R"(/// \brief Does \f$double\f$ have a signaling NaN?)" << '\n';
|
||||
out << "#define DBL_HAS_SIGNALING_NAN " << std::dec << std::numeric_limits<double>::has_signaling_NaN << '\n';
|
||||
|
||||
out << R"(/// \brief Does \f$double\f$ use denormalization?)" << '\n';
|
||||
out << "#define DBL_HAS_DENORM " << std::dec << std::numeric_limits<double>::has_denorm << '\n';
|
||||
|
||||
out << R"(/// \brief Does \f$double\f$ have loss with denormalization?)" << '\n';
|
||||
out << "#define DBL_HAS_DENORM_LOSS " << std::dec << std::numeric_limits<double>::has_denorm_loss << '\n';
|
||||
|
||||
out << R"(/// \brief What rounding style does \f$double\f$ use?)" << '\n';
|
||||
out << "#define DBL_ROUNDS " << std::dec << std::numeric_limits<double>::round_style << '\n';
|
||||
|
||||
out << R"(/// \brief Does \f$double\f$ use the IEEE doubleing point specification?)" << '\n';
|
||||
out << "#define DBL_IS_IEC559 " << std::dec << std::numeric_limits<double>::is_iec559 << '\n';
|
||||
|
||||
out << R"(/// \brief The number of mantissa bits in \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_MANT_DIG " << std::dec << std::numeric_limits<double>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief The number of decimal digits guaranteed to be preserved in a \f$double\f$ → \f$text\f$ → \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_DIG " << std::dec << std::numeric_limits<double>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The decimal precision required to serialize and deserialize a \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_DECIMAL_DIG " << std::dec << std::numeric_limits<double>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The radix, or integer base, used to represent a \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_RADIX " << std::dec << std::numeric_limits<double>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief The minimum negative integer such that \f${DBL_RADIX}^{DBL_MIN_EXP}\f$ results in a normalized \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_MIN_EXP " << std::dec << std::numeric_limits<double>::min_exponent << '\n';
|
||||
|
||||
out << R"(/// \brief The maximum positive integer such that \f${DBL_RADIX}^{DBL_MAX_EXP}\f$ results in a non-infinite \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_MAX_EXP " << std::dec << std::numeric_limits<double>::max_exponent << '\n';
|
||||
|
||||
out << R"(/// \brief The minimum negative integer such that \f${10}^{DBL_MIN_EXP}\f$ results in a normalized \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_MIN_10_EXP " << std::dec << std::numeric_limits<double>::min_exponent10 << '\n';
|
||||
|
||||
out << R"(/// \brief The maximum positive integer such that \f${10}^{DBL_MAX_EXP}\f$ results in a non-infinite \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_MAX_10_EXP " << std::dec << std::numeric_limits<double>::max_exponent10 << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$double\f$ trap?)" << '\n';
|
||||
out << "#define DBL_TRAPS " << std::dec << std::numeric_limits<double>::traps << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$double\f$ check for underflow?)" << '\n';
|
||||
out << "#define DBL_TINYNESS_BEFORE " << std::dec << std::numeric_limits<double>::tinyness_before << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest positive, finite, normal value of \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_MIN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::min() ) << "ll)" << '\n';
|
||||
|
||||
out << R"(/// \brief Largest positive, finite value of \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_MAX " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::max() ) << "ll)" << '\n';
|
||||
|
||||
out << R"(/// \brief The difference between \f$1.0\f$ and the next representable value of \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_EPSILON " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::epsilon() ) << "ll)" << '\n';
|
||||
|
||||
out << R"(/// \brief A value representing \f$\inf\f$ of type \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_INF " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::infinity() ) << "ll)" << '\n';
|
||||
|
||||
out << R"(/// \brief A value representing \f$NaN\f$ of type \f$double\f$ that does not trap.)" << '\n';
|
||||
out << "#define DBL_QUIET_NAN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::quiet_NaN() ) << "ll)" << '\n';
|
||||
|
||||
out << R"(/// \brief A value representing \f$NaN\f$ of type \f$double\f$ that traps.)" << '\n';
|
||||
out << "#define DBL_SIGNALING_NAN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::signaling_NaN()) << "ll)" << '\n';
|
||||
|
||||
out << R"(/// \brief Smallest positive, finite, subnormal value of \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_DENORM_MIN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::denorm_min() ) << "ll)" << '\n';
|
||||
|
||||
out << R"(/// \brief Maximum rounding error of type \f$double\f$.)" << '\n';
|
||||
out << "#define DBL_ROUND_ERR " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::round_error() ) << "ll)" << '\n';
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
out << "#endif // FENNEC_LANG_FLOAT_H" << '\n';
|
||||
|
||||
out.close();
|
||||
|
||||
|
||||
@@ -26,218 +26,425 @@ inline void integer_h()
|
||||
|
||||
std::ofstream out("fennec/lang/integer.h");
|
||||
|
||||
out << "// =====================================================================================================================" << std::endl;
|
||||
out << "// fennec, a free and open source game engine" << std::endl;
|
||||
out << "// Copyright © 2025 - 2026 Medusa Slockbower" << std::endl;
|
||||
out << "//" << std::endl;
|
||||
out << "// This program is free software: you can redistribute it and/or modify" << std::endl;
|
||||
out << "// it under the terms of the GNU General Public License as published by" << std::endl;
|
||||
out << "// the Free Software Foundation, either version 3 of the License, or" << std::endl;
|
||||
out << "// (at your option) any later version." << std::endl;
|
||||
out << "//" << std::endl;
|
||||
out << "// This program is distributed in the hope that it will be useful," << std::endl;
|
||||
out << "// but WITHOUT ANY WARRANTY; without even the implied warranty of" << std::endl;
|
||||
out << "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" << std::endl;
|
||||
out << "// GNU General Public License for more details." << std::endl;
|
||||
out << "//" << std::endl;
|
||||
out << "// You should have received a copy of the GNU General Public License" << std::endl;
|
||||
out << "// along with this program. If not, see <https://www.gnu.org/licenses/>." << std::endl;
|
||||
out << "// =====================================================================================================================" << std::endl;
|
||||
out << "// =====================================================================================================================" << '\n';
|
||||
out << "// fennec, a free and open source game engine" << '\n';
|
||||
out << "// Copyright © 2025 - 2026 Medusa Slockbower" << '\n';
|
||||
out << "//" << '\n';
|
||||
out << "// This program is free software: you can redistribute it and/or modify" << '\n';
|
||||
out << "// it under the terms of the GNU General Public License as published by" << '\n';
|
||||
out << "// the Free Software Foundation, either version 3 of the License, or" << '\n';
|
||||
out << "// (at your option) any later version." << '\n';
|
||||
out << "//" << '\n';
|
||||
out << "// This program is distributed in the hope that it will be useful," << '\n';
|
||||
out << "// but WITHOUT ANY WARRANTY; without even the implied warranty of" << '\n';
|
||||
out << "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" << '\n';
|
||||
out << "// GNU General Public License for more details." << '\n';
|
||||
out << "//" << '\n';
|
||||
out << "// You should have received a copy of the GNU General Public License" << '\n';
|
||||
out << "// along with this program. If not, see <https://www.gnu.org/licenses/>." << '\n';
|
||||
out << "// =====================================================================================================================" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
out << "///" << std::endl;
|
||||
out << "/// \\file fennec/lang/integer.h" << std::endl;
|
||||
out << "/// \\brief metaprogramming integer type info" << std::endl;
|
||||
out << "///" << std::endl;
|
||||
out << "///" << std::endl;
|
||||
out << "/// \\details this file is automatically generated for the current build environment" << std::endl;
|
||||
out << "///" << std::endl;
|
||||
out << "/// \\copyright Copyright © 2025 - 2026 Medusa Slockbower ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html))" << std::endl;
|
||||
out << "///" << std::endl;
|
||||
out << "///" << std::endl;
|
||||
out << "///" << '\n';
|
||||
out << "/// \\file fennec/lang/integer.h" << '\n';
|
||||
out << "/// \\brief metaprogramming integer type info" << '\n';
|
||||
out << "///" << '\n';
|
||||
out << "///" << '\n';
|
||||
out << "/// \\details This file is automatically generated for the current build environment." << '\n';
|
||||
out << "///" << '\n';
|
||||
out << "/// Environment for this build: " FENNEC_LONG_COMPILER_NAME << '\n';
|
||||
out << "///" << '\n';
|
||||
out << "/// \\copyright Copyright © 2025 - 2026 Medusa Slockbower ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html))" << '\n';
|
||||
out << "///" << '\n';
|
||||
out << "///" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
out << "#ifndef FENNEC_LANG_INTEGER_H" << std::endl;
|
||||
out << "#define FENNEC_LANG_INTEGER_H" << std::endl;
|
||||
out << "#ifndef FENNEC_LANG_INTEGER_H" << '\n';
|
||||
out << "#define FENNEC_LANG_INTEGER_H" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
out << "#undef CHAR_MIN" << std::endl;
|
||||
out << "#undef CHAR_MAX" << std::endl;
|
||||
out << "#undef WCHAR_MIN" << std::endl;
|
||||
out << "#undef WCHAR_MAX" << std::endl;
|
||||
out << "#undef SCHAR_MIN" << std::endl;
|
||||
out << "#undef SCHAR_MAX" << std::endl;
|
||||
out << "#undef UCHAR_MIN" << std::endl;
|
||||
out << "#undef UCHAR_MAX" << std::endl;
|
||||
out << "#undef INT_MIN" << std::endl;
|
||||
out << "#undef INT_MAX" << std::endl;
|
||||
out << "#undef UINT_MIN" << std::endl;
|
||||
out << "#undef UINT_MAX" << std::endl;
|
||||
out << "#undef LONG_MIN" << std::endl;
|
||||
out << "#undef LONG_MAX" << std::endl;
|
||||
out << "#undef ULONG_MIN" << std::endl;
|
||||
out << "#undef ULONG_MAX" << std::endl;
|
||||
out << "#undef LLONG_MIN" << std::endl;
|
||||
out << "#undef LLONG_MAX" << std::endl;
|
||||
out << "#undef ULLONG_MIN" << std::endl;
|
||||
out << "#undef ULLONG_MAX" << std::endl;
|
||||
out << "#undef CHAR_MIN" << '\n';
|
||||
out << "#undef CHAR_MAX" << '\n';
|
||||
out << "#undef WCHAR_MIN" << '\n';
|
||||
out << "#undef WCHAR_MAX" << '\n';
|
||||
out << "#undef SCHAR_MIN" << '\n';
|
||||
out << "#undef SCHAR_MAX" << '\n';
|
||||
out << "#undef UCHAR_MIN" << '\n';
|
||||
out << "#undef UCHAR_MAX" << '\n';
|
||||
out << "#undef INT_MIN" << '\n';
|
||||
out << "#undef INT_MAX" << '\n';
|
||||
out << "#undef UINT_MIN" << '\n';
|
||||
out << "#undef UINT_MAX" << '\n';
|
||||
out << "#undef LONG_MIN" << '\n';
|
||||
out << "#undef LONG_MAX" << '\n';
|
||||
out << "#undef ULONG_MIN" << '\n';
|
||||
out << "#undef ULONG_MAX" << '\n';
|
||||
out << "#undef LLONG_MIN" << '\n';
|
||||
out << "#undef LLONG_MAX" << '\n';
|
||||
out << "#undef ULLONG_MIN" << '\n';
|
||||
out << "#undef ULLONG_MAX" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
// TODO: Fix this to generate info without using the c++stdlib for platforms without this available.
|
||||
|
||||
out << "#define CHAR_IS_SIGNED " << std::boolalpha << std::numeric_limits<char>::is_signed << std::endl;
|
||||
out << R"(/// \brief Is \f$char\f$ signed?)" << '\n';
|
||||
out << "#define CHAR_IS_SIGNED " << std::boolalpha << std::numeric_limits<char>::is_signed << '\n';
|
||||
|
||||
out << "#define CHAR_ROUNDS " << "0x" << std::hex << (int)std::numeric_limits<char>::round_style << std::endl;
|
||||
out << "#define CHAR_RADIX_DIG " << "0x" << std::hex << (int)std::numeric_limits<char>::digits << std::endl;
|
||||
out << "#define CHAR_DIG " << "0x" << std::hex << (int)std::numeric_limits<char>::digits10 << std::endl;
|
||||
out << "#define CHAR_DECIMAL_DIG " << "0x" << std::hex << (int)std::numeric_limits<char>::max_digits10 << std::endl;
|
||||
out << "#define CHAR_RADIX " << "0x" << std::hex << (int)std::numeric_limits<char>::radix << std::endl;
|
||||
out << "#define CHAR_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<char>::traps << std::endl;
|
||||
out << R"(/// \brief Rounding style of type \f$char\f$.)" << '\n';
|
||||
out << "#define CHAR_ROUNDS " << "0x" << std::hex << (int)std::numeric_limits<char>::round_style << '\n';
|
||||
|
||||
out << "#define CHAR_MIN " << "0x" << std::hex << (0xFF & +std::numeric_limits<char>::min()) << std::endl;
|
||||
out << "#define CHAR_MAX " << "0x" << std::hex << (0xFF & +std::numeric_limits<char>::max()) << std::endl;
|
||||
out << R"(/// \brief Number of radix digits represented by \f$char\f$.)" << '\n';
|
||||
out << "#define CHAR_RADIX_DIG " << "0x" << std::hex << (int)std::numeric_limits<char>::digits << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$char\f$.)" << '\n';
|
||||
out << "#define CHAR_DIG " << "0x" << std::hex << (int)std::numeric_limits<char>::digits10 << '\n';
|
||||
|
||||
out << "#define WCHAR_IS_SIGNED " << std::boolalpha << std::numeric_limits<wchar_t>::is_signed << std::endl;
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$char\f$.)" << '\n';
|
||||
out << "#define CHAR_DECIMAL_DIG " << "0x" << std::hex << (int)std::numeric_limits<char>::max_digits10 << '\n';
|
||||
|
||||
out << "#define WCHAR_ROUNDS " << "0x" << std::hex << std::numeric_limits<wchar_t>::round_style << std::endl;
|
||||
out << "#define WCHAR_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<wchar_t>::digits << std::endl;
|
||||
out << "#define WCHAR_DIG " << "0x" << std::hex << std::numeric_limits<wchar_t>::digits10 << std::endl;
|
||||
out << "#define WCHAR_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<wchar_t>::max_digits10 << std::endl;
|
||||
out << "#define WCHAR_RADIX " << "0x" << std::hex << std::numeric_limits<wchar_t>::radix << std::endl;
|
||||
out << "#define WCHAR_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<wchar_t>::traps << std::endl;
|
||||
out << R"(/// \brief The radix, or integer base, used to represent a \f$char\f$.)" << '\n';
|
||||
out << "#define CHAR_RADIX " << "0x" << std::hex << (int)std::numeric_limits<char>::radix << '\n';
|
||||
|
||||
out << "#define WCHAR_MIN " << "0x" << std::hex << +std::numeric_limits<wchar_t>::min() << std::endl;
|
||||
out << "#define WCHAR_MAX " << "0x" << std::hex << +std::numeric_limits<wchar_t>::max() << std::endl;
|
||||
out << R"(/// \brief Do arithmetics operations with \f$char\f$ trap?)" << '\n';
|
||||
out << "#define CHAR_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<char>::traps << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
|
||||
out << "#define SCHAR_ROUNDS " << "0x" << std::hex << (int)std::numeric_limits<signed char>::round_style << std::endl;
|
||||
out << "#define SCHAR_RADIX_DIG " << "0x" << std::hex << (int)std::numeric_limits<signed char>::digits << std::endl;
|
||||
out << "#define SCHAR_DIG " << "0x" << std::hex << (int)std::numeric_limits<signed char>::digits10 << std::endl;
|
||||
out << "#define SCHAR_DECIMAL_DIG " << "0x" << std::hex << (int)std::numeric_limits<signed char>::max_digits10 << std::endl;
|
||||
out << "#define SCHAR_RADIX " << "0x" << std::hex << (int)std::numeric_limits<signed char>::radix << std::endl;
|
||||
out << "#define SCHAR_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<signed char>::traps << std::endl;
|
||||
out << R"(/// \brief Smallest finite value of \f$char\f$.)" << '\n';
|
||||
out << "#define CHAR_MIN " << "0x" << std::hex << (0xFF & +std::numeric_limits<char>::min()) << '\n';
|
||||
|
||||
out << "#define SCHAR_MIN " << "0x" << std::hex << (0xFF & +std::numeric_limits<signed char>::min()) << std::endl;
|
||||
out << "#define SCHAR_MAX " << "0x" << std::hex << (0xFF & +std::numeric_limits<signed char>::max()) << std::endl;
|
||||
out << R"(/// \brief Largest finite value of \f$char\f$.)" << '\n';
|
||||
out << "#define CHAR_MAX " << "0x" << std::hex << (0xFF & +std::numeric_limits<char>::max()) << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
|
||||
out << "#define UCHAR_ROUNDS " << "0x" << std::hex << std::numeric_limits<unsigned char>::round_style << std::endl;
|
||||
out << "#define UCHAR_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<unsigned char>::digits << std::endl;
|
||||
out << "#define UCHAR_DIG " << "0x" << std::hex << std::numeric_limits<unsigned char>::digits10 << std::endl;
|
||||
out << "#define UCHAR_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<unsigned char>::max_digits10 << std::endl;
|
||||
out << "#define UCHAR_RADIX " << "0x" << std::hex << std::numeric_limits<unsigned char>::radix << std::endl;
|
||||
out << "#define UCHAR_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned char>::traps << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
out << "#define UCHAR_MIN " << "0x" << std::hex << (0xFF & +std::numeric_limits<unsigned char>::min()) << std::endl;
|
||||
out << "#define UCHAR_MAX " << "0x" << std::hex << (0xFF & +std::numeric_limits<unsigned char>::max()) << std::endl;
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief Is \f$wchar_t\f$ signed?)" << '\n';
|
||||
out << "#define WCHAR_IS_SIGNED " << std::boolalpha << std::numeric_limits<wchar_t>::is_signed << '\n';
|
||||
|
||||
out << "#define SHORT_ROUNDS " << "0x" << std::hex << std::numeric_limits<short>::round_style << std::endl;
|
||||
out << "#define SHORT_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<short>::digits << std::endl;
|
||||
out << "#define SHORT_DIG " << "0x" << std::hex << std::numeric_limits<short>::digits10 << std::endl;
|
||||
out << "#define SHORT_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<short>::max_digits10 << std::endl;
|
||||
out << "#define SHORT_RADIX " << "0x" << std::hex << std::numeric_limits<short>::radix << std::endl;
|
||||
out << "#define SHORT_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<short>::traps << std::endl;
|
||||
out << R"(/// \brief Rounding style of type \f$wchar_t\f$.)" << '\n';
|
||||
out << "#define WCHAR_ROUNDS " << "0x" << std::hex << std::numeric_limits<wchar_t>::round_style << '\n';
|
||||
|
||||
out << "#define SHORT_MIN " << "0x" << std::hex << std::numeric_limits<short>::min() << std::endl;
|
||||
out << "#define SHORT_MAX " << "0x" << std::hex << std::numeric_limits<short>::max() << std::endl;
|
||||
out << R"(/// \brief Number of radix digits represented by \f$wchar_t\f$.)" << '\n';
|
||||
out << "#define WCHAR_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<wchar_t>::digits << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$wchar_t\f$.)" << '\n';
|
||||
out << "#define WCHAR_DIG " << "0x" << std::hex << std::numeric_limits<wchar_t>::digits10 << '\n';
|
||||
|
||||
out << "#define USHORT_ROUNDS " << "0x" << std::hex << std::numeric_limits<unsigned short>::round_style << std::endl;
|
||||
out << "#define USHORT_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<unsigned short>::digits << std::endl;
|
||||
out << "#define USHORT_DIG " << "0x" << std::hex << std::numeric_limits<unsigned short>::digits10 << std::endl;
|
||||
out << "#define USHORT_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<unsigned short>::max_digits10 << std::endl;
|
||||
out << "#define USHORT_RADIX " << "0x" << std::hex << std::numeric_limits<unsigned short>::radix << std::endl;
|
||||
out << "#define USHORT_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned short>::traps << std::endl;
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$wchar_t\f$.)" << '\n';
|
||||
out << "#define WCHAR_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<wchar_t>::max_digits10 << '\n';
|
||||
|
||||
out << "#define USHORT_MIN " << "0x" << std::hex << std::numeric_limits<unsigned short>::min() << std::endl;
|
||||
out << "#define USHORT_MAX " << "0x" << std::hex << std::numeric_limits<unsigned short>::max() << std::endl;
|
||||
out << R"(/// \brief The radix, or integer base, used to represent a \f$wchar_t\f$.)" << '\n';
|
||||
out << "#define WCHAR_RADIX " << "0x" << std::hex << std::numeric_limits<wchar_t>::radix << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief Do arithmetics operations with \f$wchar_t\f$ trap?)" << '\n';
|
||||
out << "#define WCHAR_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<wchar_t>::traps << '\n';
|
||||
|
||||
out << "#define INT_ROUNDS " << "0x" << std::hex << std::numeric_limits<int>::round_style << std::endl;
|
||||
out << "#define INT_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<int>::digits << std::endl;
|
||||
out << "#define INT_DIG " << "0x" << std::hex << std::numeric_limits<int>::digits10 << std::endl;
|
||||
out << "#define INT_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<int>::max_digits10 << std::endl;
|
||||
out << "#define INT_RADIX " << "0x" << std::hex << std::numeric_limits<int>::radix << std::endl;
|
||||
out << "#define INT_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<int>::traps << std::endl;
|
||||
|
||||
out << "#define INT_MIN " << "0x" << std::hex << std::numeric_limits<int>::min() << std::endl;
|
||||
out << "#define INT_MAX " << "0x" << std::hex << std::numeric_limits<int>::max() << std::endl;
|
||||
out << R"(/// \brief Smallest finite value of \f$wchar_t\f$.)" << '\n';
|
||||
out << "#define WCHAR_MIN " << "0x" << std::hex << +std::numeric_limits<wchar_t>::min() << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief Largest finite value of \f$wchar_t\f$.)" << '\n';
|
||||
out << "#define WCHAR_MAX " << "0x" << std::hex << +std::numeric_limits<wchar_t>::max() << '\n';
|
||||
|
||||
out << "#define UINT_ROUNDS " << "0x" << std::hex << std::numeric_limits<unsigned int>::round_style << std::endl;
|
||||
out << "#define UINT_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<unsigned int>::digits << std::endl;
|
||||
out << "#define UINT_DIG " << "0x" << std::hex << std::numeric_limits<unsigned int>::digits10 << std::endl;
|
||||
out << "#define UINT_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<unsigned int>::max_digits10 << std::endl;
|
||||
out << "#define UINT_RADIX " << "0x" << std::hex << std::numeric_limits<unsigned int>::radix << std::endl;
|
||||
out << "#define UINT_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned int>::traps << std::endl;
|
||||
|
||||
out << "#define UINT_MIN " << "0x" << std::hex << std::numeric_limits<unsigned int>::min() << std::endl;
|
||||
out << "#define UINT_MAX " << "0x" << std::hex << std::numeric_limits<unsigned int>::max() << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
|
||||
out << "#define LONG_ROUNDS " << "0x" << std::hex << std::numeric_limits<long int>::round_style << std::endl;
|
||||
out << "#define LONG_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<long int>::digits << std::endl;
|
||||
out << "#define LONG_DIG " << "0x" << std::hex << std::numeric_limits<long int>::digits10 << std::endl;
|
||||
out << "#define LONG_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<long int>::max_digits10 << std::endl;
|
||||
out << "#define LONG_RADIX " << "0x" << std::hex << std::numeric_limits<long int>::radix << std::endl;
|
||||
out << "#define LONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<long int>::traps << std::endl;
|
||||
out << R"(/// \brief Is \f$signed char\f$ signed?)" << '\n';
|
||||
out << "#define SCHAR_ROUNDS " << "0x" << std::hex << (int)std::numeric_limits<signed char>::round_style << '\n';
|
||||
|
||||
out << "#define LONG_MIN " << "0x" << std::hex << std::numeric_limits<long int>::min() << std::endl;
|
||||
out << "#define LONG_MAX " << "0x" << std::hex << std::numeric_limits<long int>::max() << std::endl;
|
||||
out << R"(/// \brief Rounding style of type \f$signed char\f$.)" << '\n';
|
||||
out << "#define SCHAR_RADIX_DIG " << "0x" << std::hex << (int)std::numeric_limits<signed char>::digits << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief Number of radix digits represented by \f$signed char\f$.)" << '\n';
|
||||
out << "#define SCHAR_DIG " << "0x" << std::hex << (int)std::numeric_limits<signed char>::digits10 << '\n';
|
||||
|
||||
out << "#define ULONG_ROUNDS " << "0x" << std::hex << std::numeric_limits<unsigned long int>::round_style << std::endl;
|
||||
out << "#define ULONG_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long int>::digits << std::endl;
|
||||
out << "#define ULONG_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long int>::digits10 << std::endl;
|
||||
out << "#define ULONG_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long int>::max_digits10 << std::endl;
|
||||
out << "#define ULONG_RADIX " << "0x" << std::hex << std::numeric_limits<unsigned long int>::radix << std::endl;
|
||||
out << "#define ULONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned long int>::traps << std::endl;
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$signed char\f$.)" << '\n';
|
||||
out << "#define SCHAR_DECIMAL_DIG " << "0x" << std::hex << (int)std::numeric_limits<signed char>::max_digits10 << '\n';
|
||||
|
||||
out << "#define ULONG_MIN " << "0x" << std::hex << std::numeric_limits<unsigned long int>::min() << std::endl;
|
||||
out << "#define ULONG_MAX " << "0x" << std::hex << std::numeric_limits<unsigned long int>::max() << std::endl;
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$signed char\f$.)" << '\n';
|
||||
out << "#define SCHAR_RADIX " << "0x" << std::hex << (int)std::numeric_limits<signed char>::radix << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief Do arithmetics operations with \f$signed char\f$ trap?)" << '\n';
|
||||
out << "#define SCHAR_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<signed char>::traps << '\n';
|
||||
|
||||
out << "#define LLONG_ROUNDS " << "0x" << std::hex << std::numeric_limits<long long>::round_style << std::endl;
|
||||
out << "#define LLONG_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<long long>::digits << std::endl;
|
||||
out << "#define LLONG_DIG " << "0x" << std::hex << std::numeric_limits<long long>::digits10 << std::endl;
|
||||
out << "#define LLONG_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<long long>::max_digits10 << std::endl;
|
||||
out << "#define LLONG_RADIX " << "0x" << std::hex << std::numeric_limits<long long>::radix << std::endl;
|
||||
out << "#define LLONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<long long>::traps << std::endl;
|
||||
|
||||
out << "#define LLONG_MIN " << "0x" << std::hex << std::numeric_limits<long long>::min() << std::endl;
|
||||
out << "#define LLONG_MAX " << "0x" << std::hex << std::numeric_limits<long long>::max() << std::endl;
|
||||
out << R"(/// \brief Smallest finite value of \f$signed char\f$.)" << '\n';
|
||||
out << "#define SCHAR_MIN " << "0x" << std::hex << (0xFF & +std::numeric_limits<signed char>::min()) << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
out << R"(/// \brief Largest finite value of \f$signed char\f$.)" << '\n';
|
||||
out << "#define SCHAR_MAX " << "0x" << std::hex << (0xFF & +std::numeric_limits<signed char>::max()) << '\n';
|
||||
|
||||
out << "#define ULLONG_ROUNDS " << "0x" << std::hex << std::numeric_limits<unsigned long long>::round_style << std::endl;
|
||||
out << "#define ULLONG_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long long>::digits << std::endl;
|
||||
out << "#define ULLONG_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long long>::digits10 << std::endl;
|
||||
out << "#define ULLONG_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long long>::max_digits10 << std::endl;
|
||||
out << "#define ULLONG_RADIX " << "0x" << std::hex << std::numeric_limits<unsigned long long>::radix << std::endl;
|
||||
out << "#define ULLONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned long long>::traps << std::endl;
|
||||
|
||||
out << "#define ULLONG_MIN " << "0x" << std::hex << std::numeric_limits<unsigned long long>::min() << std::endl;
|
||||
out << "#define ULLONG_MAX " << "0x" << std::hex << std::numeric_limits<unsigned long long>::max() << std::endl;
|
||||
out << "" << '\n';
|
||||
|
||||
out << "" << std::endl;
|
||||
|
||||
out << "#endif // FENNEC_LANG_INTEGER_H" << std::endl;
|
||||
out << R"(/// \brief Is \f$unsigned char\f$ unsigned?)" << '\n';
|
||||
out << "#define UCHAR_ROUNDS " << "0x" << std::hex << (int)std::numeric_limits<unsigned char>::round_style << '\n';
|
||||
|
||||
out << R"(/// \brief Rounding style of type \f$unsigned char\f$.)" << '\n';
|
||||
out << "#define UCHAR_RADIX_DIG " << "0x" << std::hex << (int)std::numeric_limits<unsigned char>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief Number of radix digits represented by \f$unsigned char\f$.)" << '\n';
|
||||
out << "#define UCHAR_DIG " << "0x" << std::hex << (int)std::numeric_limits<unsigned char>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$unsigned char\f$.)" << '\n';
|
||||
out << "#define UCHAR_DECIMAL_DIG " << "0x" << std::hex << (int)std::numeric_limits<unsigned char>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$unsigned char\f$.)" << '\n';
|
||||
out << "#define UCHAR_RADIX " << "0x" << std::hex << (int)std::numeric_limits<unsigned char>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$unsigned char\f$ trap?)" << '\n';
|
||||
out << "#define UCHAR_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned char>::traps << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest finite value of \f$unsigned char\f$.)" << '\n';
|
||||
out << "#define UCHAR_MIN " << "0x" << std::hex << (0xFF & +std::numeric_limits<unsigned char>::min()) << '\n';
|
||||
|
||||
out << R"(/// \brief Largest finite value of \f$unsigned char\f$.)" << '\n';
|
||||
out << "#define UCHAR_MAX " << "0x" << std::hex << (0xFF & +std::numeric_limits<unsigned char>::max()) << '\n';
|
||||
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Rounding style of type \f$short\f$.)" << '\n';
|
||||
out << "#define SHORT_ROUNDS " << "0x" << std::hex << std::numeric_limits<short>::round_style << '\n';
|
||||
|
||||
out << R"(/// \brief Number of radix digits represented by \f$short\f$.)" << '\n';
|
||||
out << "#define SHORT_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<short>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$short\f$.)" << '\n';
|
||||
out << "#define SHORT_DIG " << "0x" << std::hex << std::numeric_limits<short>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$short\f$.)" << '\n';
|
||||
out << "#define SHORT_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<short>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The radix, or integer base, used to represent a \f$short\f$.)" << '\n';
|
||||
out << "#define SHORT_RADIX " << "0x" << std::hex << std::numeric_limits<short>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$short\f$ trap?)" << '\n';
|
||||
out << "#define SHORT_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<short>::traps << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest finite value of \f$short\f$.)" << '\n';
|
||||
out << "#define SHORT_MIN " << "0x" << std::hex << +std::numeric_limits<short>::min() << '\n';
|
||||
|
||||
out << R"(/// \brief Largest finite value of \f$short\f$.)" << '\n';
|
||||
out << "#define SHORT_MAX " << "0x" << std::hex << +std::numeric_limits<short>::max() << '\n';
|
||||
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Rounding style of type \f$unsigned short\f$.)" << '\n';
|
||||
out << "#define USHORT_ROUNDS " << "0x" << std::hex << std::numeric_limits<unsigned short>::round_style << '\n';
|
||||
|
||||
out << R"(/// \brief Number of radix digits represented by \f$unsigned short\f$.)" << '\n';
|
||||
out << "#define USHORT_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<unsigned short>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$unsigned short\f$.)" << '\n';
|
||||
out << "#define USHORT_DIG " << "0x" << std::hex << std::numeric_limits<unsigned short>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$unsigned short\f$.)" << '\n';
|
||||
out << "#define USHORT_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<unsigned short>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The radix, or integer base, used to represent a \f$unsigned short\f$.)" << '\n';
|
||||
out << "#define USHORT_RADIX " << "0x" << std::hex << std::numeric_limits<unsigned short>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$unsigned short\f$ trap?)" << '\n';
|
||||
out << "#define USHORT_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned short>::traps << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest finite value of \f$unsigned short\f$.)" << '\n';
|
||||
out << "#define USHORT_MIN " << "0x" << std::hex << +std::numeric_limits<unsigned short>::min() << '\n';
|
||||
|
||||
out << R"(/// \brief Largest finite value of \f$unsigned short\f$.)" << '\n';
|
||||
out << "#define USHORT_MAX " << "0x" << std::hex << +std::numeric_limits<unsigned short>::max() << '\n';
|
||||
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Rounding style of type \f$int\f$.)" << '\n';
|
||||
out << "#define INT_ROUNDS " << "0x" << std::hex << std::numeric_limits<int>::round_style << '\n';
|
||||
|
||||
out << R"(/// \brief Number of radix digits represented by \f$int\f$.)" << '\n';
|
||||
out << "#define INT_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<int>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$int\f$.)" << '\n';
|
||||
out << "#define INT_DIG " << "0x" << std::hex << std::numeric_limits<int>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$int\f$.)" << '\n';
|
||||
out << "#define INT_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<int>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The radix, or integer base, used to represent a \f$int\f$.)" << '\n';
|
||||
out << "#define INT_RADIX " << "0x" << std::hex << std::numeric_limits<int>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$int\f$ trap?)" << '\n';
|
||||
out << "#define INT_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<int>::traps << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest finite value of \f$int\f$.)" << '\n';
|
||||
out << "#define INT_MIN " << "0x" << std::hex << +std::numeric_limits<int>::min() << '\n';
|
||||
|
||||
out << R"(/// \brief Largest finite value of \f$int\f$.)" << '\n';
|
||||
out << "#define INT_MAX " << "0x" << std::hex << +std::numeric_limits<int>::max() << '\n';
|
||||
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Rounding style of type \f$unsigned int\f$.)" << '\n';
|
||||
out << "#define UINT_ROUNDS " << "0x" << std::hex << std::numeric_limits<unsigned int>::round_style << '\n';
|
||||
|
||||
out << R"(/// \brief Number of radix digits represented by \f$unsigned int\f$.)" << '\n';
|
||||
out << "#define UINT_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<unsigned int>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$unsigned int\f$.)" << '\n';
|
||||
out << "#define UINT_DIG " << "0x" << std::hex << std::numeric_limits<unsigned int>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$unsigned int\f$.)" << '\n';
|
||||
out << "#define UINT_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<unsigned int>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The radix, or unsigned integer base, used to represent a \f$unsigned int\f$.)" << '\n';
|
||||
out << "#define UINT_RADIX " << "0x" << std::hex << std::numeric_limits<unsigned int>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$unsigned int\f$ trap?)" << '\n';
|
||||
out << "#define UINT_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned int>::traps << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest finite value of \f$unsigned int\f$.)" << '\n';
|
||||
out << "#define UINT_MIN " << "0x" << std::hex << +std::numeric_limits<unsigned int>::min() << '\n';
|
||||
|
||||
out << R"(/// \brief Largest finite value of \f$unsigned int\f$.)" << '\n';
|
||||
out << "#define UINT_MAX " << "0x" << std::hex << +std::numeric_limits<unsigned int>::max() << '\n';
|
||||
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Rounding style of type \f$long int\f$.)" << '\n';
|
||||
out << "#define LONG_ROUNDS " << "0x" << std::hex << std::numeric_limits<long int>::round_style << '\n';
|
||||
|
||||
out << R"(/// \brief Number of radix digits represented by \f$long int\f$.)" << '\n';
|
||||
out << "#define LONG_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<long int>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$long int\f$.)" << '\n';
|
||||
out << "#define LONG_DIG " << "0x" << std::hex << std::numeric_limits<long int>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$long int\f$.)" << '\n';
|
||||
out << "#define LONG_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<long int>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The radix, or long integer base, used to represent a \f$long int\f$.)" << '\n';
|
||||
out << "#define LONG_RADIX " << "0x" << std::hex << std::numeric_limits<long int>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$long int\f$ trap?)" << '\n';
|
||||
out << "#define LONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<long int>::traps << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest finite value of \f$long int\f$.)" << '\n';
|
||||
out << "#define LONG_MIN " << "0x" << std::hex << +std::numeric_limits<long int>::min() << '\n';
|
||||
|
||||
out << R"(/// \brief Largest finite value of \f$long int\f$.)" << '\n';
|
||||
out << "#define LONG_MAX " << "0x" << std::hex << +std::numeric_limits<long int>::max() << '\n';
|
||||
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Rounding style of type \f$unsigned long int\f$.)" << '\n';
|
||||
out << "#define ULONG_ROUNDS " << "0x" << std::hex << std::numeric_limits<unsigned long int>::round_style << '\n';
|
||||
|
||||
out << R"(/// \brief Number of radix digits represented by \f$unsigned long int\f$.)" << '\n';
|
||||
out << "#define ULONG_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long int>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$unsigned long int\f$.)" << '\n';
|
||||
out << "#define ULONG_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long int>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$unsigned long int\f$.)" << '\n';
|
||||
out << "#define ULONG_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long int>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The radix, or unsigned long integer base, used to represent a \f$unsigned long int\f$.)" << '\n';
|
||||
out << "#define ULONG_RADIX " << "0x" << std::hex << std::numeric_limits<unsigned long int>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$unsigned long int\f$ trap?)" << '\n';
|
||||
out << "#define ULONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned long int>::traps << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest finite value of \f$unsigned long int\f$.)" << '\n';
|
||||
out << "#define ULONG_MIN " << "0x" << std::hex << +std::numeric_limits<unsigned long int>::min() << '\n';
|
||||
|
||||
out << R"(/// \brief Largest finite value of \f$unsigned long int\f$.)" << '\n';
|
||||
out << "#define ULONG_MAX " << "0x" << std::hex << +std::numeric_limits<unsigned long int>::max() << '\n';
|
||||
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Rounding style of type \f$long long\f$.)" << '\n';
|
||||
out << "#define LLONG_ROUNDS " << "0x" << std::hex << std::numeric_limits<long long>::round_style << '\n';
|
||||
|
||||
out << R"(/// \brief Number of radix digits represented by \f$long long\f$.)" << '\n';
|
||||
out << "#define LLONG_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<long long>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$long long\f$.)" << '\n';
|
||||
out << "#define LLONG_DIG " << "0x" << std::hex << std::numeric_limits<long long>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$long long\f$.)" << '\n';
|
||||
out << "#define LLONG_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<long long>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The radix, or long longeger base, used to represent a \f$long long\f$.)" << '\n';
|
||||
out << "#define LLONG_RADIX " << "0x" << std::hex << std::numeric_limits<long long>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$long long\f$ trap?)" << '\n';
|
||||
out << "#define LLONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<long long>::traps << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest finite value of \f$long long\f$.)" << '\n';
|
||||
out << "#define LLONG_MIN " << "0x" << std::hex << +std::numeric_limits<long long>::min() << '\n';
|
||||
|
||||
out << R"(/// \brief Largest finite value of \f$long long\f$.)" << '\n';
|
||||
out << "#define LLONG_MAX " << "0x" << std::hex << +std::numeric_limits<long long>::max() << '\n';
|
||||
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Rounding style of type \f$unsigned long long\f$.)" << '\n';
|
||||
out << "#define ULLONG_ROUNDS " << "0x" << std::hex << std::numeric_limits<unsigned long long>::round_style << '\n';
|
||||
|
||||
out << R"(/// \brief Number of radix digits represented by \f$unsigned long long\f$.)" << '\n';
|
||||
out << "#define ULLONG_RADIX_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long long>::digits << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits represented by \f$unsigned long long\f$.)" << '\n';
|
||||
out << "#define ULLONG_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long long>::digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief Number of decimal digits necessary to differentiate all values of type \f$unsigned long long\f$.)" << '\n';
|
||||
out << "#define ULLONG_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long long>::max_digits10 << '\n';
|
||||
|
||||
out << R"(/// \brief The radix, or unsigned long longeger base, used to represent a \f$unsigned long long\f$.)" << '\n';
|
||||
out << "#define ULLONG_RADIX " << "0x" << std::hex << std::numeric_limits<unsigned long long>::radix << '\n';
|
||||
|
||||
out << R"(/// \brief Do arithmetics operations with \f$unsigned long long\f$ trap?)" << '\n';
|
||||
out << "#define ULLONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned long long>::traps << '\n';
|
||||
|
||||
|
||||
out << R"(/// \brief Smallest finite value of \f$unsigned long long\f$.)" << '\n';
|
||||
out << "#define ULLONG_MIN " << "0x" << std::hex << +std::numeric_limits<unsigned long long>::min() << '\n';
|
||||
|
||||
out << R"(/// \brief Largest finite value of \f$unsigned long long\f$.)" << '\n';
|
||||
out << "#define ULLONG_MAX " << "0x" << std::hex << +std::numeric_limits<unsigned long long>::max() << '\n';
|
||||
|
||||
|
||||
out << "" << '\n';
|
||||
|
||||
out << "#endif // FENNEC_LANG_INTEGER_H" << '\n';
|
||||
|
||||
out.close();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user