dilog function

Laurent Nguyen-Ngoc laurent.nguyenngoc@free.fr
Sat Sep 13 00:59:00 GMT 2003


I had a routine to write in which I needed the dilog function so I 
naturally turned to GSL. After checking  GSL's routine vs. Mathematica 
results for the dilog function, I came across the following observation:

To get the dilog of a complex number z, I needed the sequence:

r=abs(z)
theta = atan2(z.im, z.re)
gsl_sf_angle_restrict_pos_e(&theta)
gsl_sf_complex_dilog_e(r,theta, &di_z_re, &di_z_im)

where di_z_re, di_z_im are of gsl_sf_result type.

Failure to have theta in the right determination (by restrict_pos) 
gives, for some z, the conjugate answer (or the negative of it, I don't 
remember).

This seems undocumented -or I skipped it... I just realized that by 
comparing to Mathematica results.

Best,

Laurent



More information about the Gsl-discuss mailing list