TAHOE's code generator doesn't give us correct code for such
authorZhishun Alex Liu <zliu@ucbvax.Berkeley.EDU>
Sat, 11 Jul 1987 13:17:38 +0000 (05:17 -0800)
committerZhishun Alex Liu <zliu@ucbvax.Berkeley.EDU>
Sat, 11 Jul 1987 13:17:38 +0000 (05:17 -0800)
constructs as (double)sx*sy.  work-around: force temporary store.

SCCS-vsn: lib/libm/common_source/pow.c 1.6

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

index 9dd9a05..141c482 100644 (file)
@@ -165,6 +165,9 @@ double x,y;
 {
         double logb(),scalb(),copysign(),log__L(),exp__E();
         double c,s,t,z,tx,ty;
 {
         double logb(),scalb(),copysign(),log__L(),exp__E();
         double c,s,t,z,tx,ty;
+#ifdef TAHOE
+       double tahoe_tmp;
+#endif
         float sx,sy;
        long k=0;
         int n,m;
         float sx,sy;
        long k=0;
         int n,m;
@@ -207,7 +210,11 @@ double x,y;
           /* end of checking whether k==y */
 
                 sy=y; ty=y-sy;          /* y ~ sy + ty */
           /* end of checking whether k==y */
 
                 sy=y; ty=y-sy;          /* y ~ sy + ty */
+#ifdef TAHOE
+               s = (tahoe_tmp = sx)*sy-k*ln2hi;
+#else
                s=(double)sx*sy-k*ln2hi;        /* (sy+ty)*(sx+tx)-kln2 */
                s=(double)sx*sy-k*ln2hi;        /* (sy+ty)*(sx+tx)-kln2 */
+#endif
                z=(tx*ty-k*ln2lo);
                tx=tx*sy; ty=sx*ty;
                t=ty+z; t+=tx; t+=s;
                z=(tx*ty-k*ln2lo);
                tx=tx*sy; ty=sx*ty;
                t=ty+z; t+=tx; t+=s;