Warren expounded in news:Xns9DA6AC2A2C8BWarrensBlatherings@81.169.183.62: > Adam Beneschan expounded in news:73a0af1d-7213-44af-90fa-ed6de4c64ce8 > @b4g2000pra.googlegroups.com: > >> On Jun 29, 12:31�pm, Warren wrote: >>> >>> > So, what is the "missing" function? >>> >>> > >>> >>> 1) The "inverse" of a complex number. >> >> Isn't that just 1.0 / X? > > Ok, it seems to be, as the GSL (Gnu Scientific Library) > defines it as: > > gsl_complex > gsl_complex_inverse (gsl_complex a) > { /* z=1/a */ > double s = 1.0 / gsl_complex_abs (a); > > gsl_complex z; > GSL_SET_COMPLEX (&z, (GSL_REAL (a) * s) * s, -(GSL_IMAG (a) * s) * s); > return z; > } Apologies for following up my own post, but looking at the GSL implementation of complex division: gsl_complex gsl_complex_div (gsl_complex a, gsl_complex b) { /* z=a/b */ double ar = GSL_REAL (a), ai = GSL_IMAG (a); double br = GSL_REAL (b), bi = GSL_IMAG (b); double s = 1.0 / gsl_complex_abs (b); double sbr = s * br; double sbi = s * bi; double zr = (ar * sbr + ai * sbi) * s; double zi = (ai * sbr - ar * sbi) * s; gsl_complex z; GSL_SET_COMPLEX (&z, zr, zi); return z; } Given a=1.0, the inverse function is definitely higher performance. It's simpler calculation probably implies more accuracy as well. Warren