Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pdl::gsl::diff(3) [suse man page]

DIFF(3) 						User Contributed Perl Documentation						   DIFF(3)

NAME
PDL::GSL::DIFF - PDL interface to numerical differentiation routines in GSL DESCRIPTION
This is an interface to the numerical differentiation package present in the GNU Scientific Library. SYNOPSIS
use PDL; use PDL::GSL::DIFF; my $x0 = 3.3; my @res = gsldiff(&myfunction,$x0); # same as above: @res = gsldiff(&myfunction,$x0,{Method => 'central'}); # use only values greater than $x0 to get the derivative @res = gsldiff(&myfunction,$x0,{Method => 'forward'}); # use only values smaller than $x0 to get the derivative @res = gsldiff(&myfunction,$x0,{Method => 'backward'}); sub myfunction{ my ($x) = @_; return $x**2; } FUNCTIONS
gsldiff() This functions serves as an interface to the three differentiation functions present in GSL: gsl_diff_central, gsl_diff_backward and gsl_diff_forward. To compute the derivative, the central method uses values greater and smaller than the point at which the derivative is to be evaluated, while backward and forward use only values smaller and greater respectively. gsldiff() returns both the derivative and an absolute error estimate. The default method is 'central', others can be specified by passing an option. Please check the GSL documentation for more information. Usage: ($d,$abserr) = gsldiff($function_ref,$x,{Method => $method}); Example: #derivative using default method ('central') ($d,$abserr) = gsldiff(&myf,3.3); #same as above with method set explicitly ($d,$abserr) = gsldiff(&myf,3.3,{Method => 'central'}); #using backward & forward methods ($d,$abserr) = gsldiff(&myf,3.3,{Method => 'backward'}); ($d,$abserr) = gsldiff(&myf,3.3,{Method => 'forward'}); sub myf{ my ($x) = @_; return exp($x); } BUGS
Feedback is welcome. Log bugs in the PDL bug database (the database is always linked from http://pdl.perl.org). SEE ALSO
PDL The GSL documentation is online at http://sources.redhat.com/gsl/ref/gsl-ref_toc.html AUTHOR
This file copyright (C) 2003 Andres Jordan <andresj@physics.rutgers.edu> 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 differentiation routines were written by David Morrison. FUNCTIONS
diff_central Signature: (double x(); double [o] res(); double [o] abserr(); SV* funcion) info not available diff_central does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. diff_backward Signature: (double x(); double [o] res(); double [o] abserr(); SV* funcion) info not available diff_backward does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. diff_forward Signature: (double x(); double [o] res(); double [o] abserr(); SV* funcion) info not available diff_forward does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. perl v5.12.1 2010-07-05 DIFF(3)

Check Out this Related Man Page

TRIG(3pm)						User Contributed Perl Documentation						 TRIG(3pm)

NAME
PDL::GSLSF::TRIG - PDL interface to GSL Special Functions DESCRIPTION
This is an interface to the Special Function package present in the GNU Scientific Library. SYNOPSIS
FUNCTIONS
gsl_sf_sin Signature: (double x(); double [o]y(); double [o]e()) Sin(x) with GSL semantics. gsl_sf_sin does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_cos Signature: (double x(); double [o]y(); double [o]e()) Cos(x) with GSL semantics. gsl_sf_cos does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_hypot Signature: (double x(); double xx(); double [o]y(); double [o]e()) Hypot(x,xx) with GSL semantics. gsl_sf_hypot does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_complex_sin Signature: (double zr(); double zi(); double [o]x(); double [o]y(); double [o]xe(); double [o]ye()) Sin(z) for complex z gsl_sf_complex_sin does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_complex_cos Signature: (double zr(); double zi(); double [o]x(); double [o]y(); double [o]xe(); double [o]ye()) Cos(z) for complex z gsl_sf_complex_cos does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_complex_logsin Signature: (double zr(); double zi(); double [o]x(); double [o]y(); double [o]xe(); double [o]ye()) Log(Sin(z)) for complex z gsl_sf_complex_logsin does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_lnsinh Signature: (double x(); double [o]y(); double [o]e()) Log(Sinh(x)) with GSL semantics. gsl_sf_lnsinh does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_lncosh Signature: (double x(); double [o]y(); double [o]e()) Log(Cos(x)) with GSL semantics. gsl_sf_lncosh does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_polar_to_rect Signature: (double r(); double t(); double [o]x(); double [o]y(); double [o]xe(); double [o]ye()) Convert polar to rectlinear coordinates. gsl_sf_polar_to_rect does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_rect_to_polar Signature: (double x(); double y(); double [o]r(); double [o]t(); double [o]re(); double [o]te()) Convert rectlinear to polar coordinates. return argument in range [-pi, pi]. gsl_sf_rect_to_polar does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_angle_restrict_symm Signature: (double [o]y()) Force an angle to lie in the range (-pi,pi]. gsl_sf_angle_restrict_symm does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_angle_restrict_pos Signature: (double [o]y()) Force an angle to lie in the range [0,2 pi). gsl_sf_angle_restrict_pos does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_sin_err Signature: (double x(); double dx(); double [o]y(); double [o]e()) Sin(x) for quantity with an associated error. gsl_sf_sin_err does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_cos_err Signature: (double x(); double dx(); double [o]y(); double [o]e()) Cos(x) for quantity with an associated error. gsl_sf_cos_err does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. 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. perl v5.14.2 2012-05-30 TRIG(3pm)
Man Page