Read Me
Wrapper for the GNU Scientific Library special functions.
GSL special functions are automatically generated.
When a new version of GSL comes out with new functions,
add the octave name, the GSL name and the documentation
string to buildgsl_sf.sh.
To protect against users having an older version of GSL
installed, you will also need to test for these new
functions in configure.add, listing as missing any that
are not available. If several functions are added by one
release of GSL you only need to test for one and list the rest.
Trim gsl_sf_ from the name when listing it as missing.
Each new definition will look like the following:
if test -n "${missing##* FN *}"; then
export octave_name=FN
export funcname=gsl_sf_FN
cat <<EOF > docstring.txt
FN_DESCRIPTION
EOF
./replace_template.sh INPUTS_to_double.template >> gsl_sf.cc
fi
Replace FN, gsl_sf_FN, FN_DESCRIPTION and INPUTS as appropriate.
There are several different templates to use depending
on the inputs to the special function. For example, if
the function takes two doubles and returns a double, use
the double_double_to_double.cc template.
To see the available templates, use:
ls *template
As of this writing there are:
double fn(double)
double fn(double,double)
double fn(int)
double fn(int,double)
double fn(int,int,double)
double fn(double,mode)
mode is a precision mode accepting a gsl_mode_t value.
If there is not appropriate template, you will have
to write your own, or write a specialized C++ function
for the new form.
Note that GSL special functions have an _e form which
returns an estimate of the absolute error of the
returned value. These are handled automatically by
the templates. If there is no _e form available you
will need to write a specialized template for the
function.