put in include for <math.h> so they will return doubles
authorKirk McKusick <mckusic@ucbvax.Berkeley.EDU>
Thu, 20 Nov 1980 19:02:13 +0000 (11:02 -0800)
committerKirk McKusick <mckusic@ucbvax.Berkeley.EDU>
Thu, 20 Nov 1980 19:02:13 +0000 (11:02 -0800)
SCCS-vsn: usr.bin/pascal/libpc/SQRT.c 1.2
SCCS-vsn: usr.bin/pascal/libpc/SEED.c 1.2
SCCS-vsn: usr.bin/pascal/libpc/LN.c 1.2

usr/src/usr.bin/pascal/libpc/LN.c
usr/src/usr.bin/pascal/libpc/SEED.c
usr/src/usr.bin/pascal/libpc/SQRT.c

index d5042a2..e512a34 100644 (file)
@@ -1,6 +1,6 @@
 /* Copyright (c) 1979 Regents of the University of California */
 
 /* Copyright (c) 1979 Regents of the University of California */
 
-static char sccsid[] = "@(#)LN.c 1.1 %G%";
+static char sccsid[] = "@(#)LN.c 1.2 %G%";
 
 #include "h01errs.h"
 
 
 #include "h01errs.h"
 
index ce65893..aa672b2 100644 (file)
@@ -1,6 +1,9 @@
 /* Copyright (c) 1979 Regents of the University of California */
 
 /* Copyright (c) 1979 Regents of the University of California */
 
-static char sccsid[] = "@(#)SEED.c 1.1 %G%";
+static char sccsid[] = "@(#)SEED.c 1.2 %G%";
+
+#include <math.h>
+#include <math.h>
 
 SEED(value)
 
 
 SEED(value)
 
index aebeedb..be9819e 100644 (file)
@@ -1,15 +1,16 @@
 /* Copyright (c) 1979 Regents of the University of California */
 
 /* Copyright (c) 1979 Regents of the University of California */
 
-static char sccsid[] = "@(#)SQRT.c 1.1 %G%";
+static char sccsid[] = "@(#)SQRT.c 1.2 %G%";
 
 #include "h01errs.h"
 
 #include "h01errs.h"
+#include <math.h>
 
 double
 SQRT(value)
 
        double  value;
 {
 
 double
 SQRT(value)
 
        double  value;
 {
-       if (value <= 0) {
+       if (value < 0) {
                ERROR(ESQRT, value);
                return;
        }
                ERROR(ESQRT, value);
                return;
        }