![]() |
libSUFR
a LIBrary of Some Useful Fortran Routines
|
Procedures for numerical operations. More...
Go to the source code of this file.
Modules | |
module | sufr_numerics |
Procedures for numerical operations. | |
Functions/Subroutines | |
elemental real(double) function | sufr_numerics::reldiff (x1, x2) |
Return the relative difference between two numbers: dx/<x> - double precision. | |
elemental real function | sufr_numerics::reldiff_sp (x1, x2) |
Return the relative difference between two numbers: dx/<x> - single precision version. | |
elemental logical function | sufr_numerics::deq (x1, x2, eps) |
Test whether two double-precision variables are equal to better than a given value (default: 2x machine precision) | |
elemental logical function | sufr_numerics::deq0 (x0, eps) |
Test whether a double-precision variable is equal to zero better than a given value (default: 2x machine precision) | |
elemental logical function | sufr_numerics::seq (x1, x2, eps) |
Test whether two single-precision variables are equal to better than a given value (default: 2x machine precision) | |
elemental logical function | sufr_numerics::seq0 (x0, eps) |
Test whether a single-precision variable ais equal to zero better than a given value (default: 2x machine precision) | |
elemental logical function | sufr_numerics::dne (x1, x2, eps) |
Test whether two double-precision variables are unequal to better than a given value (default: 2x machine precision) | |
elemental logical function | sufr_numerics::dne0 (x0, eps) |
Test whether a double-precision variable is unequal to zero better than a given value (default: 2x machine precision) | |
elemental logical function | sufr_numerics::sne (x1, x2, eps) |
Test whether two single-precision variables are unequal to better than a given value (default: 2x machine precision) | |
elemental logical function | sufr_numerics::sne0 (x0, eps) |
Test whether a single-precision variable is unequal to zero better than a given value (default: 2x machine precision) | |
elemental logical function | sufr_numerics::isinf (x0) |
Test whether a double-precision variable is (+/-) infinite. | |
elemental logical function | sufr_numerics::sisinf (x0) |
Test whether a single-precision variable is (+/-) infinite. | |
elemental logical function | sufr_numerics::isanan (x0) |
Test whether a double-precision variable is not a number (NaN) | |
elemental logical function | sufr_numerics::sisanan (x0) |
Test whether a single-precision variable is not a number (NaN) | |
elemental logical function | sufr_numerics::isnormal (x0) |
Test whether a double-precision variable is normal (not +/- Inf, not NaN) | |
elemental logical function | sufr_numerics::sisnormal (x0) |
Test whether a single-precision variable is normal (not +/- Inf, not NaN) | |
pure subroutine | sufr_numerics::plot_ranges (plx, ply, ddx, ddy, xmin, xmax, ymin, ymax, dx, dy) |
Determine plot ranges from data arrays in x and y, and relative margins. | |
elemental integer function | sufr_numerics::mod1 (number, period) |
A modulo function to wrap array indices properly in Fortran ([1,N], rather than [0,N-1]) | |
integer function | sufr_numerics::gcd2 (a, b) |
Compute the greatest common divisor (GCD) of two positive integers using the Euclidean algoritm. | |
integer function | sufr_numerics::gcd (array) |
Computes the greatest common divisor (GCD) for an array of positive integers using the Euclidean algoritm. | |
integer function | sufr_numerics::lcm (array) |
Computes the least common multiplier (LCM) for an array of positive integers. | |
Procedures for numerical operations.
Definition in file numerics.f90.