The ISO C 23 annex F also specifies functions for ordering numbers according to their absolute value: totalordermag totalordermagf totalordermagl So far, only glibc has these functions. This patch series implements them in Gnulib. 2024-04-18 Bruno Haible totalordermagl: Add tests. * tests/test-totalordermagl.c: New file, based on tests/test-totalorderl.c. * modules/totalordermagl-tests: New file, based on modules/totalorderl-tests. totalordermagl: New module. * lib/math.in.h (totalordermagl): New declaration. * lib/totalordermagl.c: New file, based on lib/totalorderl.c. * m4/math_h.m4 (gl_MATH_H): Test whether totalordermagl is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAGL. (gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAGL, REPLACE_TOTALORDERMAGL. * modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAGL, HAVE_TOTALORDERMAGL, REPLACE_TOTALORDERMAGL. * modules/totalordermagl: New file, based on modules/totalorderl. * doc/posix-functions/totalordermagl.texi: Mention the new module. 2024-04-18 Bruno Haible totalordermagf: Add tests. * tests/test-totalordermagf.c: New file, based on tests/test-totalorderf.c. * modules/totalordermagf-tests: New file, based on modules/totalorderf-tests. totalordermagf: New module. * lib/math.in.h (totalordermagf): New declaration. * lib/totalordermagf.c: New file, based on lib/totalorderf.c. * m4/math_h.m4 (gl_MATH_H): Test whether totalordermagf is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAGF. (gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAGF, REPLACE_TOTALORDERMAGF. * modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAGF, HAVE_TOTALORDERMAGF, REPLACE_TOTALORDERMAGF. * modules/totalordermagf: New file, based on modules/totalorderf. * doc/posix-functions/totalordermagf.texi: Mention the new module. 2024-04-18 Bruno Haible totalordermag: Add tests. * tests/test-totalordermag.c: New file, based on tests/test-totalorder.c. * tests/test-totalordermag.h: New file, based on tests/test-totalorder.h. * modules/totalordermag-tests: New file, based on modules/totalorder-tests. totalordermag: New module. * lib/math.in.h (totalordermag): New declaration. * lib/totalordermag.c: New file, based on lib/totalorder.c. * m4/totalordermag.m4: New file, based on m4/totalorder.m4. * m4/math_h.m4 (gl_MATH_H): Test whether totalordermag is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAG. (gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAG, REPLACE_TOTALORDERMAG. * modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAG, HAVE_TOTALORDERMAG, REPLACE_TOTALORDERMAG. * modules/totalordermag: New file, based on modules/totalorder. * doc/posix-functions/totalordermag.texi: Mention the new module.