summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--attract.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/attract.c b/attract.c
index bd7717d..16f1703 100644
--- a/attract.c
+++ b/attract.c
@@ -16,6 +16,7 @@ const int MAXITER=200;
const double EPS=1e-1;
static double complex att_func(double complex x){
+#if 0
static const int N=9;
double complex r=1,y=x;
@@ -25,6 +26,10 @@ static double complex att_func(double complex x){
}
r+=y;
return clog(r);
+#else
+ static const double N=8.5;
+ return clog((1-cpow(x,N+1))/(1-x));
+#endif
}
struct colour{
@@ -123,7 +128,7 @@ int main(void){
unsigned char img[cfg.width*cfg.height*3];
int nthreads=sysconf(_SC_NPROCESSORS_ONLN);
- nthreads/=2;
+ if(nthreads==4)nthreads/=2;
if(nthreads>=999||nthreads<1)nthreads=1;
fprintf(stderr,"Using %d thread%s\n",nthreads,nthreads==1?"":"s");