Use numext:: math in library headers
.agents/conventions.md asks library implementation headers to call numext:: rather than std::, because the numext:: overloads are device-callable and correct for Eigen's own scalar types. check_style.py reports this on added lines; converting the existing calls removes the reason that check is scoped to added lines.
60 lines across 16 files. Every std:: math site in the library trees was classified individually, and each proposed conversion was then re-checked by an independent reviewer asked to refute it — because "std:: → numext::" is not uniformly safe. Of 107 sites: 57 conversions confirmed, 14 rejected on review, 25 correct as std::, 11 left as maintainer decisions.
Two cases needed more than a token swap
std::frexphas nonumext::equivalent. The four sites take the prescribed form instead —EIGEN_USING_STD(frexp)followed by an unqualified call, aspfrexpdoes inGenericPacketMath.h.- The NEON
pabs<Packet2l>site spells the call(std::abs)(x), parenthesised to guard the name against a macro.numext::needs no such guard, so the parentheses go. (This site is invisible to thestd::name(grep, which is why it had not been noticed.)
Deliberately not converted
std::real/std::imagin the SIMD complex backends (36 occurrences). There the scalar type isstd::complex<float|double>and the code is host-only, sostd::is correct rather than an oversight.- The integer-argument calls in
TensorDeviceSyclandPolynomialSolver.numext::log2andnumext::powhave integer overloads that dispatch to exact integer algorithms, so converting an integer call site would change the algorithm, not the spelling. Same fornumext::signbitinBFloat16(different return type) andstd::polarinCirculant(nonumext::counterpart). These want a decision about semantics, not a sweep — happy to follow up separately.
On the fma sites in SSE/PacketMath.h: converted. numext::fma forwards to std::fma on the host and to the device intrinsic under GPU compilation, so the host result is unchanged and the device path gains the intrinsic.
Depends on !2800 (merged), which fixes a dead std::ceil in ArpackSupport that this sweep would otherwise have preserved.