Replace runtime unit access (q.unit) with compile-time type extraction
(get_unit(R)) in the inverse function implementation. This prevents the
function from becoming an immediate function when consteval unit operators
are used, allowing inverse to work with runtime variables.
Key changes:
- math.h: Use get_unit(R) instead of q.unit in both code paths
- test: Add comprehensive runtime inverse tests
This surgical fix preserves maximum compile-time optimization while
enabling DSP applications that need runtime inverse calculations.
Fixes compilation error with Clang:
"call to immediate function 'inverse' is not a constant expression"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>