30 May
2003
30 May
'03
3:26 a.m.
Jonathan, there's no "conjbug". See my long message in the other forum. In researching this I noticed that the Xfractint function: void FPUcplxlog_CMPLX *x, _CMPLX *z) { double mod,zx,zy; mod = sqrt(x->x*x->x + x->y*x->y); zx = log(mod); zy = atan2(x->y,x->x); z->x = zx; z->y = zy; } could be speeded up by getting rid of the sqrt() at the cost of a multiply: void FPUcplxlog_CMPLX *x, _CMPLX *z) { double zx,zy; zx = .5*log(x->x*x->x + x->y*x->y); zy = atan2(x->y,x->x); z->x = zx; z->y = zy; } There's no downside that I can see, the two are mathematically equivalent, and the faster version is just as readable. I didn't benchmark the different but I'll bet it's measurable. Tim