The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
pp_addpm({At=>Top},<<'EOD');
=head1 NAME

PDL::GSLSF::DILOG - PDL interface to GSL Special Functions

=head1 DESCRIPTION

This is an interface to the Special Function package present in the GNU Scientific Library. 

=head1 SYNOPSIS

=cut


EOD

# PP interface to GSL

pp_addhdr('
#include <gsl/gsl_sf.h>
#include "../gslerr.h"
');

pp_def('gsl_sf_dilog',
       GenericTypes => [D],
       Pars=>'double x(); double [o]y(); double [o]e()',
       Code =>'
gsl_sf_result r;
GSLERR(gsl_sf_dilog_e,($x(),&r))
$y() = r.val;
$e() = r.err; 
',
       Doc =>'/* Real part of DiLogarithm(x), for real argument. In Lewins notation, this is Li_2(x). Li_2(x) = - Re[ Integrate[ Log[1-s] / s, {s, 0, x}] ]'
      );

pp_def('gsl_sf_complex_dilog',
       GenericTypes => [D],
       Pars=>'double r(); double t(); double [o]re(); double [o]im(); double [o]ere(); double [o]eim()',
       Code =>'
gsl_sf_result re;
gsl_sf_result im;
GSLERR(gsl_sf_complex_dilog_e,($r(),$t(),&re,&im))
$re() = re.val;
$ere() = re.err; 
$im() = im.val;
$eim() = im.err; 
',
       Doc =>'DiLogarithm(z), for complex argument z = r Exp[i theta].'
      );


pp_addpm({At=>Bot},<<'EOD');
=head1 AUTHOR

This file copyright (C) 1999 Christian Pellegrin <chri@infis.univ.trieste.it>
All rights reserved. There
is no warranty. You are allowed to redistribute this software /
documentation under certain conditions. For details, see the file
COPYING in the PDL distribution. If this file is separated from the
PDL distribution, the copyright notice should be included in the file.

The GSL SF modules were written by G. Jungman.

=cut


EOD

pp_done();