]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
sinh: Add more tests.
authorBruno Haible <bruno@clisp.org>
Sat, 17 May 2025 12:18:45 +0000 (14:18 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 17 May 2025 12:18:45 +0000 (14:18 +0200)
* tests/test-sinh.c: Include <stdio.h>, <string.h>.
(main): Add another test case.

ChangeLog
tests/test-sinh.c

index 5c1e3f2b6e657b5e4b4924280c6bc4601352421c..f3a175cfba86593f3ff7a48aab0cbc9f282aebd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-05-17  Bruno Haible  <bruno@clisp.org>
+
+       sinh: Add more tests.
+       * tests/test-sinh.c: Include <stdio.h>, <string.h>.
+       (main): Add another test case.
+
 2025-05-17  Bruno Haible  <bruno@clisp.org>
 
        crypto/sha512-buffer: Add some tests.
index 4ee11bc433f3cd1bf4e69d32e76cde39bb5c5361..24c91c7f697e8edd2a6bdc32ec583c65a3eb91ec 100644 (file)
@@ -23,6 +23,9 @@
 #include "signature.h"
 SIGNATURE_CHECK (sinh, double, (double));
 
+#include <stdio.h>
+#include <string.h>
+
 #include "macros.h"
 
 volatile double x;
@@ -36,5 +39,14 @@ main ()
   y = sinh (x);
   ASSERT (y >= 0.6366535821 && y <= 0.6366535822);
 
+  /* Another particular value.  */
+  {
+    char buf[80];
+    x = 5.152978147453169098;
+    y = sinh (x);
+    sprintf (buf, "%.2f", y);
+    ASSERT (strcmp (buf, "86.47") == 0);
+  }
+
   return test_exit_status;
 }