math: fix aliasing violation in long double wrappers