- log2_ln.hpp/cpp: Plugin's exact ln(float) polynomial from 535a70 (0x1802a24c0). IEEE 754 bit extraction + Horner evaluation. Coefficients extracted from binary at 0x181f81f80..0x181f821c0. Max error ~3e-6 for typical inputs. - spectral.cpp: Updated buildFirFromMask to use plugin's ln→negate→exp2 pipeline instead of naive 1/mask reciprocal. - exp2_tables.hpp/cpp: Already contains plugin's exp2 tables (0x26b820). Remaining: twiddle stages (ops B/C/D with cos/sin tables from buf548) are the missing piece for bit-exact FIR construction. These are FFT butterflies already implemented in fft.hpp but need integration into the FIR pipeline.
17 lines
505 B
C++
17 lines
505 B
C++
#pragma once
|
|
#include <cstdint>
|
|
#include <cmath>
|
|
#include <cstring>
|
|
|
|
namespace soothe2 {
|
|
|
|
// Plugin's exact ln(float) from 0x1802a24c0 (535a70 FFT-conv engine)
|
|
// Computes natural logarithm via mantissa polynomial + exponent scaling
|
|
// Coefficients extracted from binary at 0x181f81f80..0x181f821c0
|
|
// Max error ~3e-6 for typical inputs (x in [1, 1.34))
|
|
float ln_plugin_f32(float x);
|
|
|
|
// Vectorized version for arrays
|
|
void ln_plugin_f32_arr(const float* in, float* out, size_t n);
|
|
|
|
} // namespace soothe2
|