Document the new DPF surfaces in one command set, and test the field, half-tree, and multipoint edges.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 23:18:10 -06:00
parent 0d8a5a8131
commit 0dff6df8ed
250 changed files with 12199 additions and 1981 deletions

View file

@ -1,6 +1,7 @@
/// @file grotto/gadgets/logarithm/ilog10.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `ilog10`.
/// @details The previous body of this header defined a second `ilog256`.
/// Integer log10 is `exact_constant::ilog10`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,29 +21,34 @@ namespace grotto
namespace gadgets
{
struct ilog256
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) ilog10
{
template <typename T>
T operator()(T x)
{
if (x <= 0) return 0; // TODO
return std::ceil(std::log2(static_cast(x))/8);
if (x <= 0) return 0;
return std::floor(std::log10(static_cast<double>(x)));
}
};
template <>
struct gadget_hints<ilog256>
struct gadget_hints<ilog10>
{
static constexpr double min = std::exp2(-63);
static constexpr double max = std::numeric_limits<double>::max();
static constexpr double hint_poles[] = { };
static constexpr double hint_interesting_points[] = { 0 };
static constexpr double poles[] = { 0 };
static constexpr double interesting_points[] = { 0 };
static constexpr unsigned degree = 0;
static constexpr bool has_canonical_representation = false;
static constexpr double canonical_bounds[] = { };
static constexpr std::array<double, degree+1> hint_canonical_polys[] = { };
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto