aboutsummaryrefslogtreecommitdiff
path: root/ic-reals-6.3/tests/sinh_R.c
diff options
context:
space:
mode:
Diffstat (limited to 'ic-reals-6.3/tests/sinh_R.c')
-rw-r--r--ic-reals-6.3/tests/sinh_R.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/ic-reals-6.3/tests/sinh_R.c b/ic-reals-6.3/tests/sinh_R.c
new file mode 100644
index 0000000..36f0a42
--- /dev/null
+++ b/ic-reals-6.3/tests/sinh_R.c
@@ -0,0 +1,46 @@
+#include <stdio.h>
+#include "real.h"
+#include <math.h>
+
+/*
+ * Tests the sinh_R when applied to a real expressed
+ * by a sign, a characteristic pair and a vector.
+ */
+main(int argc, char *argv[])
+{
+ Real x, y;
+ double f;
+ Real makeRealSignCNQInt(Sign, char *, int, int, int);
+
+ MyName = argv[0];
+
+ if (argc != 7) {
+ fprintf(stderr, "%s <sign> <c> <n> <a> <b> <ndigits>\n", MyName);
+ exit(1);
+ }
+
+ initReals();
+
+#ifdef LATER
+ y = makeRealSignCNQInt(
+ atoi(argv[1]), /* sign */
+ argv[2], /* c */
+ atoi(argv[3]), /* n */
+ atoi(argv[4]), /* a */
+ atoi(argv[5])); /* b */
+#endif
+
+ y = vector_Int(atoi(argv[4]), atoi(argv[5]));
+
+ print_R_Dec(y, atoi(argv[6]));
+
+ printf("\n");
+ f = realToDouble(y);
+ printf("x=%f\n",f);
+
+ x = sinh_R(y);
+
+ print_R_Dec(x, atoi(argv[6]));
+ printf("\n");
+ printf("sinh(x)=%f\n", sinh(f));
+}