added {,d}ffrac(); changed VAX -> vax in #if's. DLW
authorDavid Wasley <dlw@ucbvax.Berkeley.EDU>
Sun, 31 Oct 1982 13:52:40 +0000 (05:52 -0800)
committerDavid Wasley <dlw@ucbvax.Berkeley.EDU>
Sun, 31 Oct 1982 13:52:40 +0000 (05:52 -0800)
SCCS-vsn: usr.bin/f77/libF77/range.c 1.2

usr/src/usr.bin/f77/libF77/range.c

index f774373..d08dc7e 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
-char id_range[] = "@(#)range.c 1.1";
+char id_range[] = "@(#)range.c 1.2";
  *
  * routines to return extreme values
  * VERY MACHINE DEPENDENT
  *
  * routines to return extreme values
  * VERY MACHINE DEPENDENT
@@ -19,12 +19,15 @@ float
 flmax_()
 {
        union fi n;
 flmax_()
 {
        union fi n;
-#ifdef PDP11
+#if    pdp11
        n.i = 0x7fffffffL;
        n.i = 0x7fffffffL;
-#endif
-#ifdef VAX
+#else  pdp11
+#if    vax
        n.i = 0xffff7fff;
        n.i = 0xffff7fff;
-#endif
+#else  vax
+       UNKNOWN MACHINE!
+#endif vax
+#endif pdp11
        return(n.f);
 }
 
        return(n.f);
 }
 
@@ -32,14 +35,17 @@ double
 dflmax_()
 {
        union dj n;
 dflmax_()
 {
        union dj n;
-#ifdef PDP11
+#if    pdp11
        n.j[0] = 0x7fffffffL;
        n.j[1] = 0xffffffffL;
        n.j[0] = 0x7fffffffL;
        n.j[1] = 0xffffffffL;
-#endif
-#ifdef VAX
+#else  pdp11
+#if    vax
        n.j[0] = 0xffff7fff;
        n.j[1] = 0xffffffff;
        n.j[0] = 0xffff7fff;
        n.j[1] = 0xffffffff;
-#endif
+#else  vax
+       UNKNOWN MACHINE!
+#endif vax
+#endif pdp11
        return(n.d);
 }
 
        return(n.d);
 }
 
@@ -47,12 +53,15 @@ float
 flmin_()
 {
        union fi n;
 flmin_()
 {
        union fi n;
-#ifdef PDP11
+#if    pdp11
        n.i = 0x00800000L;
        n.i = 0x00800000L;
-#endif
-#ifdef VAX
+#else  pdp11
+#if    vax
        n.i = 0x00000080;
        n.i = 0x00000080;
-#endif
+#else  vax
+       UNKNOWN MACHINE!
+#endif vax
+#endif pdp11
        return(n.f);
 }
 
        return(n.f);
 }
 
@@ -60,20 +69,57 @@ double
 dflmin_()
 {
        union dj n;
 dflmin_()
 {
        union dj n;
-#ifdef PDP11
+#if    pdp11
        n.j[0] = 0x00800000L;
        n.j[1] = 0;
        n.j[0] = 0x00800000L;
        n.j[1] = 0;
-#endif
-#ifdef VAX
+#else  pdp11
+#if    vax
        n.j[0] = 0x00000080;
        n.j[1] = 0;
        n.j[0] = 0x00000080;
        n.j[1] = 0;
-#endif
+#else  vax
+       UNKNOWN MACHINE!
+#endif vax
+#endif pdp11
        return(n.d);
 }
 
 long int
 inmax_()
 {
        return(n.d);
 }
 
 long int
 inmax_()
 {
-       return(0x7fffffff);
+       return(0x7fffffffL);
 }
 
 }
 
+
+float
+ffrac_()
+{
+       union fi n;
+#if    pdp11
+       n.i = 0x35000000L;
+#else  pdp11
+#if    vax
+       n.i = 0x00003500;
+#else  vax
+       UNKNOWN MACHINE!
+#endif vax
+#endif pdp11
+       return(n.f);
+}
+
+double
+dffrac_()
+{
+       union dj n;
+#if    pdp11
+       n.j[0] = 0x25000000L;
+       n.j[1] = 0;
+#else  pdp11
+#if    vax
+       n.j[0] = 0x00002500;
+       n.j[1] = 0;
+#else  vax
+       UNKNOWN MACHINE!
+#endif vax
+#endif pdp11
+       return(n.d);
+}