diff options
-rw-r--r-- | attract.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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"); |