[llvm-commits] CVS: llvm/test/Programs/SingleSource/mandel.c
Chris Lattner
lattner at cs.uiuc.edu
Fri May 30 13:06:01 PDT 2003
Changes in directory llvm/test/Programs/SingleSource:
mandel.c updated: 1.3 -> 1.4
---
Log message:
Remove dependency on complex.h which is not available on sun
---
Diffs of the changes:
Index: llvm/test/Programs/SingleSource/mandel.c
diff -u llvm/test/Programs/SingleSource/mandel.c:1.3 llvm/test/Programs/SingleSource/mandel.c:1.4
--- llvm/test/Programs/SingleSource/mandel.c:1.3 Fri May 30 12:49:36 2003
+++ llvm/test/Programs/SingleSource/mandel.c Fri May 30 13:04:52 2003
@@ -1,11 +1,13 @@
-#include <complex.h>
#define ESCAPE 2
#define IMAGE_SIZE 10
#define START_X -2.0
#define START_Y START_X
#define MAX_ITER 10
#define step (-START_X - START_X)/IMAGE_SIZE
-void emit(double complex X) {
+
+#define I 1.0iF
+
+void emit(double __complex__ X) {
printf("%f\n", (double)X);
}
@@ -13,8 +15,8 @@
int x, y, n;
for (x = 0; x < IMAGE_SIZE; ++x) {
for (y = 0; y < IMAGE_SIZE; ++y) {
- double complex c = (START_X+x*step) + (START_Y-y*step) * I;
- double complex z = 0.0;
+ double __complex__ c = (START_X+x*step) + (START_Y-y*step) * I;
+ double __complex__ z = 0.0;
for (n = 0; n < MAX_ITER; ++n) {
z = z * z + c;
More information about the llvm-commits
mailing list