[llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/McCat/08-main/main.c

Chris Lattner lattner at cs.uiuc.edu
Thu Oct 23 11:49:01 PDT 2003


Changes in directory llvm/test/Programs/MultiSource/Benchmarks/McCat/08-main:

main.c updated: 1.1 -> 1.2

---
Log message:

Fix floating point precision problem


---
Diffs of the changes:  (+2 -2)

Index: llvm/test/Programs/MultiSource/Benchmarks/McCat/08-main/main.c
diff -u llvm/test/Programs/MultiSource/Benchmarks/McCat/08-main/main.c:1.1 llvm/test/Programs/MultiSource/Benchmarks/McCat/08-main/main.c:1.2
--- llvm/test/Programs/MultiSource/Benchmarks/McCat/08-main/main.c:1.1	Mon May 12 13:26:43 2003
+++ llvm/test/Programs/MultiSource/Benchmarks/McCat/08-main/main.c	Thu Oct 23 11:48:47 2003
@@ -80,8 +80,8 @@
   /*printf("MakeSphere");*/
   dfi    = 2*PI/sli;    /* The step in the slices */
   dtheta = 2*PI/pol;    /* The step in the amount of polys in a slice */
-  for(fi=-PI;fi<PI;fi=fi+dfi){ /* The slices */
-    for(theta=-PI;theta<PI;theta=theta+dtheta){   /* The polys in the slices */
+  for(fi=-PI;fi<PI+0.000001;fi=fi+dfi){ /* The slices */
+    for(theta=-PI;theta<PI+0.000001;theta=theta+dtheta){   /* The polys in the slices */
       /*printf(".");
       fflush(stdout);*/
       p[0].x = cos(theta)*cos(fi)*r;





More information about the llvm-commits mailing list