guarantee monotonicity
authorGroup working with Kahn on math lib <elefunt@ucbvax.Berkeley.EDU>
Sat, 18 Oct 1986 16:52:36 +0000 (08:52 -0800)
committerGroup working with Kahn on math lib <elefunt@ucbvax.Berkeley.EDU>
Sat, 18 Oct 1986 16:52:36 +0000 (08:52 -0800)
SCCS-vsn: lib/libm/common_source/exp.c 1.5

usr/src/lib/libm/common_source/exp.c

index 87d5b4b..a24d47b 100644 (file)
@@ -13,7 +13,7 @@
 
 #ifndef lint
 static char sccsid[] =
 
 #ifndef lint
 static char sccsid[] =
-"@(#)exp.c     4.3 (Berkeley) 8/21/85; 1.4 (ucb.elefunt) %G%";
+"@(#)exp.c     4.3 (Berkeley) 8/21/85; 1.5 (ucb.elefunt) %G%";
 #endif not lint
 
 /* EXP(X)
 #endif not lint
 
 /* EXP(X)
@@ -129,7 +129,7 @@ double x;
                    /* return 2^k*[1+x+x*c/(2+c)]  */
                        z=x*x;
                        c= x - z*(p1+z*(p2+z*(p3+z*(p4+z*p5))));
                    /* return 2^k*[1+x+x*c/(2+c)]  */
                        z=x*x;
                        c= x - z*(p1+z*(p2+z*(p3+z*(p4+z*p5))));
-                       return  scalb(1.0+(hi-(lo-x*c/(2.0-c))),k);
+                       return  scalb(1.0+(hi-(lo-(x*c)/(2.0-c))),k);
 
                }
                /* end of x > lntiny */
 
                }
                /* end of x > lntiny */