// =====================================================================================================================
//  fennec, a free and open source game engine
//  Copyright © 2025 - 2026  Medusa Slockbower
//
//  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/>.
// =====================================================================================================================

///
/// \file fennec/math/ext/constants.h
/// \brief \ref fennec_math_ext_constants
///
///
/// \details
/// \author Medusa Slockbower
///
/// \copyright Copyright © 2025 - 2026 Medusa Slockbower ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html))
///
///

#ifndef FENNEC_MATH_EXT_CONSTANTS_H
#define FENNEC_MATH_EXT_CONSTANTS_H


///
///
///
/// \page fennec_math_ext_constants Constants
///
/// \brief Common constants used in mathematics
///
/// \code #include <fennec/math/ext/constants.h> \endcode
///
///
///
/// \section section_rational_constants Rational Constants
///
/// <table width="100%" class="fieldtable" id="table_fennec_math_ext_constants_rational">
/// <tr><th style="vertical-align: top">Syntax
///     <th style="vertical-align: top">Description
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::zero "genType zero<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::zero
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one "genType one<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_half "genType one_half<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_half
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::three_over_two "genType three_over_two<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::three_over_two
///
/// </table>
///
///
///
/// \section section_irrational_constants Irrational Constants
///
/// <table width="100%" class="fieldtable" id="table_fennec_math_ext_constants_irrational">
/// <tr><th style="vertical-align: top">Syntax
///     <th style="vertical-align: top">Description
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::two_thirds "genType two_thirds<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::two_thirds
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::sqrt_two "genType sqrt_two<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::sqrt_two
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::sqrt_three "genType sqrt_three<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::sqrt_three
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::sqrt_five "genType sqrt_five<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::sqrt_five
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::sqrt_seven "genType sqrt_seven<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::sqrt_seven
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::sqrt_ten "genType sqrt_ten<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::sqrt_ten
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_sqrt_two "genType one_over_sqrt_two<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_sqrt_two
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_sqrt_three "genType one_over_sqrt_three<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_sqrt_three
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_sqrt_five "genType one_over_sqrt_five<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_sqrt_five
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::cbrt_two "genType cbrt_two<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::cbrt_two
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::qdrt_two "genType qdrt_two<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::qdrt_two
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::two_raised_sqrt_two "genType two_raised_sqrt_two<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::two_raised_sqrt_two
/// </table>
///
///
///
/// \section section_pi_constants π
///
/// <table width="100%" class="fieldtable" id="table_fennec_math_ext_constants_pi">
/// <tr><th style="vertical-align: top">Syntax
///     <th style="vertical-align: top">Description
/// <tr><th colspan=2 style="text-align: center;">π & τ
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::pi "genType pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::tau "genType tau<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::tau
///
/// <tr><th colspan=2 style="text-align: center;">Multiples of π
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::two_pi "genType two_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::two_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::three_pi "genType three_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::three_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::four_pi "genType four_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::four_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::half_pi "genType half_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::half_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::three_halves_pi "genType three_halves_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::three_halves_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::third_pi "genType third_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::third_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::two_thirds_pi "genType two_thirds_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::two_thirds_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::four_thirds_pi "genType four_thirds_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::four_thirds_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::five_thirds_pi "genType five_thirds_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::five_thirds_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::quarter_pi "genType quarter_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::quarter_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::three_quarters_pi "genType three_quarters_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::three_quarters_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::five_quarters_pi "genType five_quarters_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::five_quarters_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::seven_quarters_pi "genType seven_quarters_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::seven_quarters_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::fifth_pi "genType fifth_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::fifth_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::two_fifths_pi "genType two_fifths_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::two_fifths_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::three_fifths_pi "genType three_fifths_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::three_fifths_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::four_fifths_pi "genType four_fifths_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::four_fifths_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::six_fifths_pi "genType six_fifths_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::six_fifths_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::seven_fifths_pi "genType seven_fifths_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::seven_fifths_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::eight_fifths_pi "genType eight_fifths_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::eight_fifths_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::eight_fifths_pi "genType eight_fifths_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::nine_fifths_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::sixth_pi "genType sixth_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::sixth_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::five_sixths_pi "genType five_sixths_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::five_sixths_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::seven_sixths_pi "genType seven_sixths_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::seven_sixths_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::eleven_sixths_pi "genType eleven_sixths_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::eleven_sixths_pi
///
/// <tr><th colspan=2 style="text-align: center;">Reciprocals of π
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_pi "genType one_over_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::two_over_pi "genType two_over_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::two_over_pi
///
/// <tr><th colspan=2 style="text-align: center;">Exponentiations of π
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::pi_sq "genType pi_sq<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::pi_sq
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::pi_cb "genType pi_cb<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::pi_cb
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::sqrt_pi "genType sqrt_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::sqrt_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_sqrt_pi "genType one_over_sqrt_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_sqrt_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::sqrt_two_pi "genType sqrt_two_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::sqrt_two_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_sqrt_two_pi "genType one_over_sqrt_two_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_sqrt_two_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::cbrt_pi "genType cbrt_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::cbrt_pi
///
/// </table>
///
///
///
/// \section section_e_constants e
///
/// <table width="100%" class="fieldtable" id="table_fennec_math_ext_constants_e">
/// <tr><th style="vertical-align: top">Syntax
///     <th style="vertical-align: top">Description
/// <tr><th colspan=2 style="text-align: center;">Multiples of e
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e "genType e<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::half_e "genType half_e<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::half_e
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::two_e "genType two_e<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::two_e
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_e "genType one_over_e<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_e
///
/// <tr><th colspan=2 style="text-align: center;">Exponentiations
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e_sq "genType e_sq<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e_sq
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e_cb "genType e_cb<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e_cb
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::sqrt_e "genType sqrt_e<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::sqrt_e
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_sqrt_e "genType one_over_sqrt_e<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_sqrt_e
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e_raised_e "genType e_raised_e<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e_raised_e
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e_raised_neg_e "genType e_raised_neg_e<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e_raised_neg_e
///
/// <tr><th colspan=2 style="text-align: center;">Exponentiations by π
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e_raised_pi "genType e_raised_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e_raised_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e_raised_neg_pi "genType e_raised_neg_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e_raised_neg_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e_raised_half_pi "genType e_raised_half_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e_raised_half_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e_raised_neg_half_pi "genType e_raised_neg_half_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e_raised_neg_half_pi
///
/// <tr><th colspan=2 style="text-align: center;">Exponentiations by γ
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e_raised_gamma "genType e_raised_gamma<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e_raised_gamma
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::e_raised_neg_gamma "genType e_raised_neg_gamma<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::e_raised_neg_gamma
///
/// </table>
///
///
///
/// \section section_catalans_constants Catalan's Constant
///
/// <table width="100%" class="fieldtable" id="table_fennec_math_ext_constants_catalan">
/// <tr><th style="vertical-align: top">Syntax
///     <th style="vertical-align: top">Description
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::G "genType G<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::G
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_G "genType one_over_G<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_G
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::G_over_pi "genType G_over_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::G_over_pi
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::pi_over_G "genType pi_over_G<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::pi_over_G
///	</table>
///
///
///
/// \section section_gamma_constants γ
///
/// <table width="100%" class="fieldtable" id="table_fennec_math_common_sign_functions">
/// <tr><th style="vertical-align: top">Syntax
///     <th style="vertical-align: top">Description
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::y "genType y<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::y
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_y "genType one_over_y<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_y
/// </table>
///
///
///
/// \section section_log_constants Logarithms
///
/// <table width="100%" class="fieldtable" id="table_fennec_math_common_sign_functions">
/// <tr><th style="vertical-align: top">Syntax
///     <th style="vertical-align: top">Description
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_two "genType log_two<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_two
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_three "genType log_three<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_three
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_five "genType log_five<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_five
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_seven "genType log_seven<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_seven
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_ten "genType log_ten<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_ten
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::one_over_log_ten "genType one_over_log_ten<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::one_over_log_ten
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_two_over_log_three "genType log_two_over_log_three<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_two_over_log_three
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_log_two "genType log_log_two<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_log_two
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_pi "genType log_pi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_pi
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_sqrt_two "genType log_sqrt_two<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_sqrt_two
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_gamma "genType log_gamma<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_gamma
/// <tr><td width="50%" style="vertical-align: top"> <br>
///			\ref fennec::log_phi "genType log_phi<genType>()"
///     <td width="50%" style="vertical-align: top">
///			\copydetails fennec::log_phi
///
///
///	</table>
///
///

#if FENNEC_COMPILER_MSVC
#pragma warning(push)
#pragma warning(disable:4305)
#endif

namespace fennec
{

// http://numbers.computation.free.fr/Constants/Miscellaneous/digits.html
// 50 digits is sufficient for 128-bit floats

// Break from 1TBS style for legibility

// Rational Constants ==================================================================================================

template<typename genType> constexpr genType zero()           { return genType(0);   } //!< \returns The value of \math{0}
template<typename genType> constexpr genType one()            { return genType(1);   } //!< \returns The value of \math{1}
template<typename genType> constexpr genType one_half()       { return genType(0.5); } //!< \returns The value of \math{\frac{1}{2}}
template<typename genType> constexpr genType three_over_two() { return genType(1.5); } //!< \returns The value of \math{\frac{3}{2}}



// Irrational Constants ================================================================================================

template<typename genType> constexpr genType one_third()           { return 0.33333333333333333333333333333333333333333333333333; } //!< \returns The value of \math{\frac{1}{3}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType two_thirds()          { return 0.66666666666666666666666666666666666666666666666666; } //!< \returns The value of \math{\frac{2}{3}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType sqrt_two()            { return 1.41421356237309504880168872420969807856967187537694; } //!< \returns The value of \math{\sqrt{2}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType sqrt_three()          { return 1.73205080756887729352744634150587236694280525381038; } //!< \returns The value of \math{\sqrt{3}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType sqrt_five()           { return 2.23606797749978969640917366873127623544061835961152; } //!< \returns The value of \math{\sqrt{5}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType sqrt_seven()          { return 2.64575131106459059050161575363926042571025918308245; } //!< \returns The value of \math{\sqrt{7}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType sqrt_ten()            { return 3.16227766016837933199889354443271853371955513932521; } //!< \returns The value of \math{\sqrt{10}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType one_over_sqrt_two()   { return 0.70710678118654752440084436210484903928483593768847; } //!< \returns The value of \math{\frac{1}{\sqrt{2}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType one_over_sqrt_three() { return 0.57735026918962576450914878050195745564760175127012; } //!< \returns The value of \math{\frac{1}{\sqrt{3}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType one_over_sqrt_five()  { return 0.44721359549995793928183473374625524708812367192230; } //!< \returns The value of \math{\frac{1}{\sqrt{5}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType cbrt_two()            { return 1.25992104989487316476721060727822835057025146470150; } //!< \returns The value of \math{\sqrt[3]{2}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType qdrt_two()            { return 1.18920711500272106671749997056047591529297209246381; } //!< \returns The value of \math{\sqrt[4]{2}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType two_raised_sqrt_two() { return 2.66514414269022518865029724987313984827421131371465; } //!< \returns The value of \math{{2}^{\sqrt{2}}} with the highest precision for \emph{genType}



// Pi ==================================================================================================================

// Pi & Tau
template<typename genType> constexpr genType pi()           { return 3.14159265358979323846264338327950288419716939937510; } //!< \returns The value of \math{\pi} with the highest precision for \emph{genType}
template<typename genType> constexpr genType tau()          { return 6.28318530717958647692528676655900576839433879875021; } //!< \returns The value of \math{\tau} with the highest precision for \emph{genType}

// Multiples of Pi
template<typename genType> constexpr genType two_pi()   { return  6.28318530717958647692528676655900576839433879875021; } //!< \returns The value of \math{2\pi} with the highest precision for \emph{genType}
template<typename genType> constexpr genType three_pi() { return  9.42477796076937971538793014983850865259150819812531; } //!< \returns The value of \math{3\pi} with the highest precision for \emph{genType}
template<typename genType> constexpr genType four_pi()  { return 12.56637061435917295385057353311801153678867759750042; } //!< \returns The value of \math{4\pi} with the highest precision for \emph{genType}

// Fractions of Pi

template<typename genType> constexpr genType half_pi()           { return 1.57079632679489661923132169163975144209858469968755; } //!< \returns The value of \math{\frac{\pi}{2}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType three_halves_pi()   { return 4.71238898038468985769396507491925432629575409906265; } //!< \returns The value of \math{\frac{3\pi}{2}} with the highest precision for \emph{genType}

template<typename genType> constexpr genType third_pi()       { return 1.04719755119659774615421446109316762806572313312503; } //!< \returns The value of \math{\frac{\pi}{3}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType two_thirds_pi()  { return 2.09439510239319549230842892218633525613144626625007; } //!< \returns The value of \math{\frac{2\pi}{3}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType four_thirds_pi() { return 4.18879020478639098461685784437267051226289253250014; } //!< \returns The value of \math{\frac{4\pi}{3}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType five_thirds_pi() { return 5.23598775598298873077107230546583814032861566562517; } //!< \returns The value of \math{\frac{5\pi}{3}} with the highest precision for \emph{genType}

template<typename genType> constexpr genType quarter_pi()        { return 0.78539816339744830961566084581987572104929234984377; } //!< \returns The value of \math{\frac{\pi}{4}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType three_quarters_pi() { return 2.35619449019234492884698253745962716314787704953132; } //!< \returns The value of \math{\frac{3\pi}{4}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType five_quarters_pi()  { return 3.92699081698724154807830422909937860524646174921888; } //!< \returns The value of \math{\frac{5\pi}{4}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType seven_quarters_pi() { return 5.49778714378213816730962592073913004734504644890643; } //!< \returns The value of \math{\frac{7\pi}{4}} with the highest precision for \emph{genType}

template<typename genType> constexpr genType fifth_pi()        { return 0.62831853071795864769252867665590057683943387987502; } //!< \returns The value of \math{\frac{\pi}{5}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType two_fifths_pi()   { return 1.25663706143591729538505735331180115367886775975004; } //!< \returns The value of \math{\frac{2\pi}{5}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType three_fifths_pi() { return 1.88495559215387594307758602996770173051830163962506; } //!< \returns The value of \math{\frac{3\pi}{5}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType four_fifths_pi()  { return 2.51327412287183459077011470662360230735773551950008; } //!< \returns The value of \math{\frac{4\pi}{5}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType six_fifths_pi()   { return 3.76991118430775188615517205993540346103660327925012; } //!< \returns The value of \math{\frac{6\pi}{5}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType seven_fifths_pi() { return 4.39822971502571053384770073659130403787603715912514; } //!< \returns The value of \math{\frac{7\pi}{5}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType eight_fifths_pi() { return 5.02654824574366918154022941324720461471547103900016; } //!< \returns The value of \math{\frac{8\pi}{5}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType nine_fifths_pi()  { return 5.65486677646162782923275808990310519155490491887519; } //!< \returns The value of \math{\frac{9\pi}{5}} with the highest precision for \emph{genType}

template<typename genType> constexpr genType sixth_pi()         { return 0.52359877559829887307710723054658381403286156656251; } //!< \returns The value of \math{\frac{\pi}{6}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType five_sixths_pi()   { return 2.61799387799149436538553615273291907016430783281258; } //!< \returns The value of \math{\frac{5\pi}{6}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType seven_sixths_pi()  { return 3.66519142918809211153975061382608669823003096593762; } //!< \returns The value of \math{\frac{7\pi}{6}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType eleven_sixths_pi() { return 5.75958653158128760384817953601242195436147723218769; } //!< \returns The value of \math{\frac{11\pi}{6}} with the highest precision for \emph{genType}




// Reciprocals of Pi
template<typename genType> constexpr genType one_over_pi() { return 0.31830988618379067153776752674502872406891929148091; } //!< \returns The value of \math{\frac{1}{\pi}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType two_over_pi() { return 0.63661977236758134307553505349005744813783858296182; } //!< \returns The value of \math{\frac{2}{\pi}} with the highest precision for \emph{genType}

// Exponentiations Pi
template<typename genType> constexpr genType pi_sq()                { return  9.86960440108935861883449099987615113531369940724079; } //!< \returns The value of \math{{\pi}^{2}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType pi_cb()                { return 31.00627668029982017547631506710139520222528856588510; } //!< \returns The value of \math{{\pi}^{2}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType sqrt_pi()              { return  1.77245385090551602729816748334114518279754945612238; } ///< \returns The value of \math{\sqrt{\pi}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType one_over_sqrt_pi()     { return  0.56418958354775628694807945156077258584405062932899; } ///< \returns The value of \math{\frac{1}{\sqrt{\pi}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType sqrt_two_pi()          { return  1.77245385090551602729816748334114518279754945612238; } ///< \returns The value of \math{\sqrt{2\pi}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType one_over_sqrt_two_pi() { return  0.39894228040143267793994605993438186847585863116493; } ///< \returns The value of \math{\frac{1}{\sqrt{2\pi}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType cbrt_pi()              { return  1.46459188756152326302014252726379039173859685562793; } ///< \returns The value of \math{\sqrt[3]{\pi}} with the highest precision for \emph{genType}



// e ===================================================================================================================

// Multiples and Reciprocal
template<typename genType> constexpr genType e()          { return 2.71828182845904523536028747135266249775724709369995; } ///< \returns The value of \math{e} with the highest precision for \emph{genType}
template<typename genType> constexpr genType half_e()     { return 1.35914091422952261768014373567633124887862354684997; } ///< \returns The value of \math{\frac{e}{2}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType two_e()      { return 5.43656365691809047072057494270532499551449418739991; } ///< \returns The value of \math{2e} with the highest precision for \emph{genType}
template<typename genType> constexpr genType one_over_e() { return 0.36787944117144232159552377016146086744581113103176; } ///< \returns The value of \math{\frac{1}{e}} with the highest precision for \emph{genType}

// Exponentiations of e
template<typename genType> constexpr genType e_sq()            { return  7.38905609893065022723042746057500781318031557055184; }  ///< \returns The value of \math{e^2} with the highest precision for \emph{genType}
template<typename genType> constexpr genType e_cb()            { return 20.08553692318766774092852965458171789698790783855415; }  ///< \returns The value of \math{e^3} with the highest precision for \emph{genType}
template<typename genType> constexpr genType sqrt_e()          { return  1.64872127070012814684865078781416357165377610071014; }  ///< \returns The value of \math{\sqrt{e}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType one_over_sqrt_e() { return  0.60653065971263342360379953499118045344191813548718; }  ///< \returns The value of \math{\frac{1}{\sqrt{e}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType e_raised_two()    { return  7.38905609893065022723042746057500781318031557055184; }  ///< \returns The value of \math{e^e} with the highest precision for \emph{genType}
template<typename genType> constexpr genType e_raised_e()      { return 15.15426224147926418976043027262991190552854853685613; }  ///< \returns The value of \math{e^e} with the highest precision for \emph{genType}
template<typename genType> constexpr genType e_raised_neg_e()  { return  0.065988035845312537076790187596846424938577048252796; } ///< \returns The value of \math{e^-e} with the highest precision for \emph{genType}

// Exponentiations of e by Pi
template<typename genType> constexpr genType e_raised_pi()          { return 23.14069263277926900572908636794854738026610624260021; } ///< \returns The value of \math{{e}^{ \pi}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType e_raised_neg_pi()      { return  0.04321391826377224977441773717172801127572810981063; } ///< \returns The value of \math{{e}^{-\pi}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType e_raised_half_pi()     { return  4.81047738096535165547303566670383312639017087466453; } ///< \returns The value of \math{{e}^{\frac{ \pi}{2}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType e_raised_neg_half_pi() { return  0.20787957635076190854695561983497877003387784163176; } ///< \returns The value of \math{{e}^{\frac{-\pi}{2}}} with the highest precision for \emph{genType}

// Exponentiations of e by Gamma
template<typename genType> constexpr genType e_raised_gamma()     { return 1.78107241799019798523650410310717954916964521430343; } ///< \returns The value of \math{{e}^{ \gamma}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType e_raised_neg_gamma() { return 0.56145948356688516982414321479088078676571038692515; } ///< \returns The value of \math{{e}^{-\gamma}} with the highest precision for \emph{genType}



// Catalan's Constant ==================================================================================================

template<typename genType> constexpr genType G()          { return 0.91596559417721901505460351493238411077414937428167; } ///< \returns The value of \math{G} with the highest precision for \emph{genType}
template<typename genType> constexpr genType one_over_G() { return 1.09174406370390610145415947333389232498605012140824; } ///< \returns The value of \math{\frac{1}{G}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType G_over_pi()  { return 0.29156090403081878013838445646839491886406615398583; } ///< \returns The value of \math{\frac{G}{\pi}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType pi_over_G()  { return 3.42981513013245864263455323784799901211670795530093; } ///< \returns The value of \math{\frac{\pi}{G}} with the highest precision for \emph{genType}



// Gamma ===============================================================================================================

template<typename genType> constexpr genType y()          { return 0.57721566490153286060651209008240243104215933593992; } ///< \returns The value of \math{\gamma} with the highest precision for \emph{genType}
template<typename genType> constexpr genType one_over_y() { return 1.73245471460063347358302531586082968115577655226680; } ///< \returns The value of \math{\frac{1}{\gamma}} with the highest precision for \emph{genType}



// Logarithms ==========================================================================================================

template<typename genType> constexpr genType log_two()                { return  0.69314718055994530941723212145817656807550013436025; } ///< \returns The value of \math{\log{2}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType log_three()              { return  1.09861228866810969139524523692252570464749055782274; } ///< \returns The value of \math{\log{3}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType log_five()               { return  1.60943791243410037460075933322618763952560135426851; } ///< \returns The value of \math{\log{5}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType log_seven()              { return  1.94591014905531330510535274344317972963708472958186; } ///< \returns The value of \math{\log{7}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType log_ten()                { return  2.30258509299404568401799145468436420760110148862877; } ///< \returns The value of \math{\log{10}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType one_over_log_ten()       { return  0.43429448190325182765112891891660508229439700580366; } ///< \returns The value of \math{\frac{1}{\log{10}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType log_two_over_log_three() { return  0.63092975357145743709952711434276085429958564013188; } ///< \returns The value of \math{\frac{\log{2}}{\log{3}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType log_log_two()            { return -0.36651292058166432701243915823266946945426344783711; } ///< \returns The value of \math{\log{\log{2}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType log_pi()                 { return  1.14472988584940017414342735135305871164729481291531; } ///< \returns The value of \math{\log{\pi}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType log_sqrt_two()           { return  0.91893853320467274178032973640561763986139747363778; } ///< \returns The value of \math{\log{\sqrt{2}}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType log_gamma()              { return -0.54953931298164482233766176880290778833069898126306; } ///< \returns The value of \math{\log{\gamma}} with the highest precision for \emph{genType}
template<typename genType> constexpr genType log_phi()                { return  0.48121182505960344749775891342436842313518433438566; } ///< \returns The value of \math{\log{\phi}} with the highest precision for \emph{genType}

}

#endif // FENNEC_MATH_EXT_CONSTANTS_H
