3 ms·
The hypot() function avoids many overflow and underflow cases: return hypot(hypot(q.w, q.x), hypot(q.y, q.z));
by xscott 5y ago
The hypot() function avoids many overflow and underflow cases:
return hypot(hypot(q.w, q.x), hypot(q.y, q.z));
- tbabb 5y agoInterestingly, with clang and -O3 I get identical assembly for hypot() and the "naive" implementation.