1# This file was automatically generated by SWIG (http://www.swig.org). 2# Version 4.0.1 3# 4# Do not make changes to this file unless you know what you are doing--modify 5# the SWIG interface file instead. 6 7package Math::GSL::Sys; 8use base qw(Exporter); 9use base qw(DynaLoader); 10package Math::GSL::Sysc; 11bootstrap Math::GSL::Sys; 12package Math::GSL::Sys; 13@EXPORT = qw(); 14 15# ---------- BASE METHODS ------------- 16 17package Math::GSL::Sys; 18 19sub TIEHASH { 20 my ($classname,$obj) = @_; 21 return bless $obj, $classname; 22} 23 24sub CLEAR { } 25 26sub FIRSTKEY { } 27 28sub NEXTKEY { } 29 30sub FETCH { 31 my ($self,$field) = @_; 32 my $member_func = "swig_${field}_get"; 33 $self->$member_func(); 34} 35 36sub STORE { 37 my ($self,$field,$newval) = @_; 38 my $member_func = "swig_${field}_set"; 39 $self->$member_func($newval); 40} 41 42sub this { 43 my $ptr = shift; 44 return tied(%$ptr); 45} 46 47 48# ------- FUNCTION WRAPPERS -------- 49 50package Math::GSL::Sys; 51 52*gsl_error = *Math::GSL::Sysc::gsl_error; 53*gsl_stream_printf = *Math::GSL::Sysc::gsl_stream_printf; 54*gsl_strerror = *Math::GSL::Sysc::gsl_strerror; 55*gsl_set_error_handler = *Math::GSL::Sysc::gsl_set_error_handler; 56*gsl_set_error_handler_off = *Math::GSL::Sysc::gsl_set_error_handler_off; 57*gsl_set_stream_handler = *Math::GSL::Sysc::gsl_set_stream_handler; 58*gsl_set_stream = *Math::GSL::Sysc::gsl_set_stream; 59*gsl_log1p = *Math::GSL::Sysc::gsl_log1p; 60*gsl_expm1 = *Math::GSL::Sysc::gsl_expm1; 61*gsl_hypot = *Math::GSL::Sysc::gsl_hypot; 62*gsl_hypot3 = *Math::GSL::Sysc::gsl_hypot3; 63*gsl_acosh = *Math::GSL::Sysc::gsl_acosh; 64*gsl_asinh = *Math::GSL::Sysc::gsl_asinh; 65*gsl_atanh = *Math::GSL::Sysc::gsl_atanh; 66*gsl_isnan = *Math::GSL::Sysc::gsl_isnan; 67*gsl_isinf = *Math::GSL::Sysc::gsl_isinf; 68*gsl_finite = *Math::GSL::Sysc::gsl_finite; 69*gsl_nan = *Math::GSL::Sysc::gsl_nan; 70*gsl_posinf = *Math::GSL::Sysc::gsl_posinf; 71*gsl_neginf = *Math::GSL::Sysc::gsl_neginf; 72*gsl_fdiv = *Math::GSL::Sysc::gsl_fdiv; 73*gsl_coerce_double = *Math::GSL::Sysc::gsl_coerce_double; 74*gsl_coerce_float = *Math::GSL::Sysc::gsl_coerce_float; 75*gsl_coerce_long_double = *Math::GSL::Sysc::gsl_coerce_long_double; 76*gsl_ldexp = *Math::GSL::Sysc::gsl_ldexp; 77*gsl_frexp = *Math::GSL::Sysc::gsl_frexp; 78*gsl_fcmp = *Math::GSL::Sysc::gsl_fcmp; 79 80# ------- VARIABLE STUBS -------- 81 82package Math::GSL::Sys; 83 84*GSL_VERSION = *Math::GSL::Sysc::GSL_VERSION; 85*GSL_MAJOR_VERSION = *Math::GSL::Sysc::GSL_MAJOR_VERSION; 86*GSL_MINOR_VERSION = *Math::GSL::Sysc::GSL_MINOR_VERSION; 87*GSL_POSZERO = *Math::GSL::Sysc::GSL_POSZERO; 88*GSL_NEGZERO = *Math::GSL::Sysc::GSL_NEGZERO; 89*GSL_SUCCESS = *Math::GSL::Sysc::GSL_SUCCESS; 90*GSL_FAILURE = *Math::GSL::Sysc::GSL_FAILURE; 91*GSL_CONTINUE = *Math::GSL::Sysc::GSL_CONTINUE; 92*GSL_EDOM = *Math::GSL::Sysc::GSL_EDOM; 93*GSL_ERANGE = *Math::GSL::Sysc::GSL_ERANGE; 94*GSL_EFAULT = *Math::GSL::Sysc::GSL_EFAULT; 95*GSL_EINVAL = *Math::GSL::Sysc::GSL_EINVAL; 96*GSL_EFAILED = *Math::GSL::Sysc::GSL_EFAILED; 97*GSL_EFACTOR = *Math::GSL::Sysc::GSL_EFACTOR; 98*GSL_ESANITY = *Math::GSL::Sysc::GSL_ESANITY; 99*GSL_ENOMEM = *Math::GSL::Sysc::GSL_ENOMEM; 100*GSL_EBADFUNC = *Math::GSL::Sysc::GSL_EBADFUNC; 101*GSL_ERUNAWAY = *Math::GSL::Sysc::GSL_ERUNAWAY; 102*GSL_EMAXITER = *Math::GSL::Sysc::GSL_EMAXITER; 103*GSL_EZERODIV = *Math::GSL::Sysc::GSL_EZERODIV; 104*GSL_EBADTOL = *Math::GSL::Sysc::GSL_EBADTOL; 105*GSL_ETOL = *Math::GSL::Sysc::GSL_ETOL; 106*GSL_EUNDRFLW = *Math::GSL::Sysc::GSL_EUNDRFLW; 107*GSL_EOVRFLW = *Math::GSL::Sysc::GSL_EOVRFLW; 108*GSL_ELOSS = *Math::GSL::Sysc::GSL_ELOSS; 109*GSL_EROUND = *Math::GSL::Sysc::GSL_EROUND; 110*GSL_EBADLEN = *Math::GSL::Sysc::GSL_EBADLEN; 111*GSL_ENOTSQR = *Math::GSL::Sysc::GSL_ENOTSQR; 112*GSL_ESING = *Math::GSL::Sysc::GSL_ESING; 113*GSL_EDIVERGE = *Math::GSL::Sysc::GSL_EDIVERGE; 114*GSL_EUNSUP = *Math::GSL::Sysc::GSL_EUNSUP; 115*GSL_EUNIMPL = *Math::GSL::Sysc::GSL_EUNIMPL; 116*GSL_ECACHE = *Math::GSL::Sysc::GSL_ECACHE; 117*GSL_ETABLE = *Math::GSL::Sysc::GSL_ETABLE; 118*GSL_ENOPROG = *Math::GSL::Sysc::GSL_ENOPROG; 119*GSL_ENOPROGJ = *Math::GSL::Sysc::GSL_ENOPROGJ; 120*GSL_ETOLF = *Math::GSL::Sysc::GSL_ETOLF; 121*GSL_ETOLX = *Math::GSL::Sysc::GSL_ETOLX; 122*GSL_ETOLG = *Math::GSL::Sysc::GSL_ETOLG; 123*GSL_EOF = *Math::GSL::Sysc::GSL_EOF; 124 125our @EXPORT = qw(); 126our @EXPORT_OK = qw/ 127 gsl_log1p 128 gsl_expm1 129 gsl_hypot 130 gsl_hypot3 131 gsl_acosh 132 gsl_asinh 133 gsl_atanh 134 gsl_isnan 135 gsl_isinf 136 gsl_finite 137 gsl_posinf 138 gsl_neginf 139 gsl_fdiv 140 gsl_coerce_double 141 gsl_coerce_float 142 gsl_coerce_long_double 143 gsl_ldexp 144 gsl_frexp 145 gsl_fcmp 146 gsl_nan 147 gsl_isnan 148 gsl_inf 149 $GSL_NAN 150 $GSL_POSINF 151 $GSL_NEGINF 152 /; 153 154our %EXPORT_TAGS = ( all => \@EXPORT_OK ); 155our $GSL_NAN = gsl_nan(); 156our $GSL_POSINF = gsl_posinf(); 157our $GSL_NEGINF = gsl_neginf(); 158 159__END__ 160 161=encoding utf8 162 163=head1 NAME 164 165Math::GSL::Sys - Misc Math Functions 166 167=head1 SYNOPSIS 168 169 use Math::GSL::Sys qw/:all/; 170 171=head1 DESCRIPTION 172 173This module contains various useful math functions that are not usually 174provided by standard libraries. 175 176=over 177 178=item * C<gsl_log1p($x)> 179 180This function computes the value of \log(1+$x) in a way that is accurate for 181small $x. It provides an alternative to the BSD math function log1p(x). 182 183=item * C<gsl_expm1($x)> 184 185This function computes the value of \exp($x)-1 in a way that is accurate for 186small $x. It provides an alternative to the BSD math function expm1(x). 187 188=item * C<gsl_hypot($x, $y)> 189 190This function computes the value of \sqrt{$x^2 + $y^2} in a way that avoids 191overflow. It provides an alternative to the BSD math function hypot($x,$y). 192 193=item * C<gsl_hypot3($x, $y, $z)> 194 195This function computes the value of \sqrt{$x^2 + $y^2 + $z^2} in a way that 196avoids overflow. 197 198=item * C<gsl_acosh($x)> 199 200This function computes the value of \arccosh($x). It provides an alternative to 201the standard math function acosh($x). 202 203=item * C<gsl_asinh($x)> 204 205This function computes the value of \arcsinh($x). It provides an alternative to 206the standard math function asinh($x). 207 208=item * C<gsl_atanh($x)> 209 210This function computes the value of \arctanh($x). It provides an alternative to 211the standard math function atanh($x). 212 213=item * C<gsl_isnan($x)> 214 215This function returns 1 if $x is not-a-number. 216 217=item * C<gsl_isinf($x)> 218 219This function returns +1 if $x is positive infinity, -1 if $x is negative 220infinity and 0 otherwise. 221 222=item * C<gsl_finite($x)> 223 224This function returns 1 if $x is a real number, and 0 if it is infinite or not-a-number. 225 226=item * C<gsl_posinf > 227 228=item * C<gsl_neginf > 229 230=item * C<gsl_fdiv > 231 232=item * C<gsl_coerce_double > 233 234=item * C<gsl_coerce_float > 235 236=item * C<gsl_coerce_long_double > 237 238=item * C<gsl_ldexp($x, $e)> 239 240This function computes the value of $x * 2**$e. It provides an alternative to 241the standard math function ldexp($x,$e). 242 243=item * C<gsl_frexp($x)> 244 245This function splits the number $x into its normalized fraction f and exponent 246e, such that $x = f * 2^e and 0.5 <= f < 1. The function returns f and then the 247exponent in e. If $x is zero, both f and e are set to zero. This function 248provides an alternative to the standard math function frexp(x, e). 249 250=item * C<gsl_fcmp($x, $y, $epsilon)> 251 252This function determines whether $x and $y are approximately equal to a 253relative accuracy $epsilon. The relative accuracy is measured using an interval 254of size 2 \delta, where \delta = 2^k \epsilon and k is the maximum base-2 255exponent of $x and $y as computed by the function frexp. If $x and $y lie 256within this interval, they are considered approximately equal and the function 257returns 0. Otherwise if $x < $y, the function returns -1, or if $x > $y, the 258function returns +1. Note that $x and $y are compared to relative accuracy, so 259this function is not suitable for testing whether a value is approximately 260zero. The implementation is based on the package fcmp by T.C. Belding. 261 262=back 263 264For more informations on the functions, we refer you to the GSL official 265documentation: L<http://www.gnu.org/software/gsl/manual/html_node/> 266 267=head1 AUTHORS 268 269Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com> 270 271=head1 COPYRIGHT AND LICENSE 272 273Copyright (C) 2008-2021 Jonathan "Duke" Leto and Thierry Moisan 274 275This program is free software; you can redistribute it and/or modify it 276under the same terms as Perl itself. 277 278=cut 279 2801; 281