]> Savannah Git Hosting - gnulib.git/commitdiff
fenv-exceptions-trapping tests: Comments.
authorBruno Haible <bruno@clisp.org>
Tue, 7 Nov 2023 20:32:50 +0000 (21:32 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 7 Nov 2023 20:34:25 +0000 (21:34 +0100)
* tests/test-fenv-except-trapping-1.c (main): Add a comment.

ChangeLog
tests/test-fenv-except-trapping-1.c

index b93b28f3266b7d599164041484d69fc10d834376..0f665556d47d94d7e43ea5fae4f9b860f115cd44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-11-07  Bruno Haible  <bruno@clisp.org>
+
+       fenv-exceptions-trapping tests: Comments.
+       * tests/test-fenv-except-trapping-1.c (main): Add a comment.
+
 2023-11-07  Paul Eggert  <eggert@cs.ucla.edu>
 
        malloca: pacify -Wcheri-provenance
index 7c67a06ec91979d272db7a858c85dd86abac1464..e717bb1739ec93a2874ca926cdc7d18404983456 100644 (file)
@@ -44,7 +44,11 @@ main ()
   unsigned int a, b;
 
   /* Run through all possible valid arguments to feenableexcept and
-     fedisableexcept.  */
+     fedisableexcept.
+     An alternative way of coding this iteration, without the uint_to_exceptions
+     function, would be using the trick from
+     Jörg Arndt: Matters Computational <https://www.jjj.de/fxt/fxtbook.pdf>
+     § 1.25.1 Generating bit subsets of a given word  */
   for (a = 0; a < 0x20; a++)
     for (b = 0; b < 0x20; b++)
       {