From 170334ed9128da4a2f916d88ba52db0988e1d119 Mon Sep 17 00:00:00 2001
From: jofret
Date: Mon, 29 Jan 2007 17:02:35 +0000
Subject: Need to have a clear answer about STDC99 for complex implementation !

Add som tests.

---
 src/test/testSinh.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 src/test/testSinh.c

(limited to 'src/test/testSinh.c')

diff --git a/src/test/testSinh.c b/src/test/testSinh.c
new file mode 100644
index 00000000..22ac851c
--- /dev/null
+++ b/src/test/testSinh.c
@@ -0,0 +1,55 @@
+/*
+**  -*- C -*-
+**
+** testSinh.c
+** Made by  Bruno JOFRET <bruno.jofret@inria.fr>
+**
+** Started on  Fri Dec  8 15:06:16 2006 jofret
+** Last update Mon Jan 29 16:16:59 2007 jofret
+**
+** Copyright INRIA 2006
+*/
+
+#include <stdio.h>
+
+#define PI 3.1415826535
+
+float ssinhs(float);
+double dsinhs(double);
+
+void ssinhsTest() {
+  printf(">> Float scalar\n");
+  printf("ssinhs(0) = %f\n", ssinhs((float) 0));
+  printf("ssinhs(PI) = %f\n", ssinhs(PI));
+  printf("ssinhs(PI/2) = %f\n", ssinhs(PI/2));
+  printf("ssinhs(PI/3) = %f\n", ssinhs(PI/3));
+  printf("ssinhs(PI/4) = %f\n", ssinhs(PI/4));
+  printf("ssinhs(PI/6) = %f\n", ssinhs(PI/6));
+  printf("ssinhs(-PI) = %f\n", ssinhs(-PI));
+  printf("ssinhs(-PI/2) = %f\n", ssinhs(-PI/2));
+  printf("ssinhs(-PI/3) = %f\n", ssinhs(-PI/3));
+  printf("ssinhs(-PI/4) = %f\n", ssinhs(-PI/4));
+  printf("ssinhs(-PI/6) = %f\n", ssinhs(-PI/6));
+}
+
+void dsinhsTest() {
+  printf(">> Double scalar\n");
+  printf("dsinhs(0) = %e\n", dsinhs((double) 0));
+  printf("dsinhs(PI) = %e\n", dsinhs(PI));
+  printf("dsinhs(PI/2) = %e\n", dsinhs(PI/2));
+  printf("dsinhs(PI/3) = %e\n", dsinhs(PI/3));
+  printf("dsinhs(PI/4) = %e\n", dsinhs(PI/4));
+  printf("dsinhs(PI/6) = %e\n", dsinhs(PI/6));
+  printf("dsinhs(-PI) = %e\n", dsinhs(-PI));
+  printf("dsinhs(-PI/2) = %e\n", dsinhs(-PI/2));
+  printf("dsinhs(-PI/3) = %e\n", dsinhs(-PI/3));
+  printf("dsinhs(-PI/4) = %e\n", dsinhs(-PI/4));
+  printf("dsinhs(-PI/6) = %e\n", dsinhs(-PI/6));
+}
+
+int testSinh() {
+  printf(">>>> Hyperbolic Sine Tests\n");
+  ssinhsTest();
+  dsinhsTest();
+  return 0;
+}
-- 
cgit