Tree [18630c] default tip / src /
 History

Read Only access


File Date Author Commit
 Makefile.in 2016-09-06 Julien Bect Julien Bect [a381bc] src/Makefile.in: Add @configure_input@
 README 2016-07-18 Susi Lehtola Susi Lehtola [96e722] Complete overhaul of the template system for sp...
 bootstrap 2016-11-15 Julien Bect Julien Bect [f691a8] Use full GSL function names
 buildgsl_sf.sh 2016-11-15 Julien Bect Julien Bect [f691a8] Use full GSL function names
 configure.ac 2016-11-20 Julien Bect Julien Bect [18630c] src/configure.ac: Use __octave_config_info__ in...
 generate_array_template.sh 2016-09-23 Julien Bect Julien Bect [13c187] Do not remove missing functions entirely; issue...
 generate_template.sh 2016-09-23 Julien Bect Julien Bect [13c187] Do not remove missing functions entirely; issue...
 gsl_sf.header.cc 2016-10-19 Julien Bect Julien Bect [aa7119] gsl_sf: Fix the help text + display it when gsl...
 replace_template.sh 2016-09-18 Julien Bect Julien Bect [10b649] Deal with deprecated functions

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(unsigned int)
	double fn(unsigned int, unsigned int)
	double fn(int)
	double fn(int,double)
	double fn(int,double,double)
	double fn(int,int,double)
	double fn(int,int,double,double)
	double fn(double)
	double fn(double,mode)
	double fn(double,double)
	double fn(double,double,mode)
	double fn(double,double,double)
	double fn(double,double,double,mode)
	double fn(double,double,double,double)
	double fn(double,double,double,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.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks