aboutsummaryrefslogtreecommitdiff
path: root/math/test-math.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-03-05 19:06:19 +0000
committerRoland McGrath <roland@gnu.org>1996-03-05 19:06:19 +0000
commit1521668f2afae1dc2ef5d7ffaeb84353b36874dd (patch)
tree435275b1928a583451dfdbed6901e2a655606f26 /math/test-math.c
parent5d8a006d2c506ca9efc483a35b5f73016695266e (diff)
downloadglibc-1521668f2afae1dc2ef5d7ffaeb84353b36874dd.zip
glibc-1521668f2afae1dc2ef5d7ffaeb84353b36874dd.tar.gz
glibc-1521668f2afae1dc2ef5d7ffaeb84353b36874dd.tar.bz2
Sun Mar 3 08:43:44 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* math/test-math.c: Include errno.h and string.h.
Diffstat (limited to 'math/test-math.c')
-rw-r--r--math/test-math.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/math/test-math.c b/math/test-math.c
index a82daed..eece4b2 100644
--- a/math/test-math.c
+++ b/math/test-math.c
@@ -2,6 +2,8 @@
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
void print_trig_stuff __P ((void));
@@ -12,45 +14,45 @@ DEFUN_VOID(main)
double x,h,li,lr,a,lrr;
x = atof (str);
-
+
printf ("%g %g\n", x, pow (10.0, 3.0));
-
+
x = sinh(2.0);
-
+
printf("sinh(2.0) = %g\n", x);
-
+
x = sinh(3.0);
-
+
printf("sinh(3.0) = %g\n", x);
-
+
h = hypot(2.0,3.0);
-
+
printf("h=%g\n", h);
-
+
a = atan2(3.0, 2.0);
-
+
printf("atan2(3,2) = %g\n", a);
-
+
lr = pow(h,4.0);
-
+
printf("pow(%g,4.0) = %g\n", h, lr);
-
+
lrr = lr;
-
+
li = 4.0 * a;
-
+
lr = lr / exp(a*5.0);
-
+
printf("%g / exp(%g * 5) = %g\n", lrr, a, lr);
-
+
lrr = li;
-
+
li += 5.0 * log(h);
-
+
printf("%g + 5*log(%g) = %g\n", lrr, h, li);
-
+
printf("cos(%g) = %g, sin(%g) = %g\n", li, cos(li), li, sin(li));
-
+
x = drem(10.3435,6.2831852);
printf("drem(10.3435,6.2831852) = %g\n", x);
@@ -60,7 +62,7 @@ DEFUN_VOID(main)
printf("drem(-10.3435,6.2831852) = %g\n", x);
x = drem(-10.3435,-6.2831852);
-
+
printf("drem(-10.3435,-6.2831852) = %g\n", x);
x = drem(10.3435,-6.2831852);