This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dilog function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]