P5: F5b — exp2 0x26b820 assets extracted bit-exact + numeric fallback exp2_dsp

Extracted the 8x16 irrational tables + lead-in -708.4xx series from soothe_mem.bin
into exp2_tables.{hpp,cpp} (P3 bit-exact inputs). exp2_dsp = numerically-correct
double exp2 matching std::exp2 (wiring fallback; NOT bit-exact yet — the plugin
body has special subnormal/overflow branches and a vfmadd213sd poly not yet 1:1).
exp2_check: 2e6-grid PASS (0 cells >1e-13).
This commit is contained in:
2026-08-20 21:07:30 +03:00
parent 4e9c1b1ed7
commit d802ee7aed
7 changed files with 201 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
// exp2.cpp — numerical double exp2 (wiring fallback) + P3 asset note.
// The plugin's table-driven path (0x18026b820: kExp2_* irr tables + vfmadd213sd +
// Cody-Waite hi/lo) is bit-exact-remaining; this module provides the correct
// function value for structural wiring until the 1:1 transcription lands.
#include "exp2.hpp"
#include <cmath>
#include <cstdint>
#include <cstring>
#include <limits>
namespace exp2d {
double exp2_dsp(double x) {
if (std::isnan(x)) return x;
if (x == 0.0) return 1.0;
if (x == -std::numeric_limits<double>::infinity()) return 0.0;
if (x == std::numeric_limits<double>::infinity()) return x;
return std::exp2(x);
}
} // namespace exp2d