The code presents a new completely rational quaternion normalizer together with some comparisons with representatives. It can give accurate results with very computationally efficient and completely rational operations. Try it using any C compilers!
Sample compilation:
gcc -o quat_norm quat_norm.c
./quat_norm
Wu, J., Sarabandi, S., Zhu, Y., Huang, H., Geng, R., Thomas, F., Liu, M. (2023) Completely Rational SO(n) Orthonormalization. 2023 IEEE International Conference on Robotics and Automation (ICRA).