Module Name: src Committed By: riastradh Date: Sat May 4 19:21:51 UTC 2024
Modified Files: src/lib/libm/src: s_rintl.c Log Message: s_rintl.c: Reduce FreeBSD diff and fix on ld128 platforms. EXT_FRACBITS, the number of bits in the _binary encoding_ that stores the trailing significand field, is never 113. In IEEE 754 binary128, it is 112, even though there are 113 bits of precision in the set of floating-point numbers -- the leading 1 bit is implicit in binary128. So ld128 platforms like aarch64 and sparc64 were skipping the real definition and just defining rintl as an alias for rint, which is wrong. In contrast, LDBL_MANT_DIG, the number of bits of precision in the set of floating-point numbers (p, in IEEE 754 parlance), is 113 in IEEE 754 binary128. This is also the constant used in FreeBSD libm anyway. So let's just use that instead of trying to translate it to our private EXT_FRACBITS (not defined in FreeBSD) with a fencepos terror. And delete the buggy rintl=rint alias. PR lib/58054 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libm/src/s_rintl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.