#include <cmath>
#include <algorithm>
#include <cstdlib>
Include dependency graph for scalfunc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Namespaces | |
| namespace | SPUC |
Defines | |
| #define | pow2i(x) ((x)<0 ? 0 : (1<<(x))) |
| Integer 2^x. | |
Functions | |
| double | SPUC::Qfunc (double x) |
| Q-function. | |
| double | SPUC::erfinv (double x) |
| Inverse of error function. | |
| double | SPUC::gamma (double x) |
| Gamma function. | |
| double | SPUC::log2 (double x) |
| double | SPUC::logb (double b, double x) |
| double | SPUC::sinc (double x) |
| Sinc function. sinc(x) = sin(pi*x)/pi*x. | |
| int | SPUC::round_i (double x) |
| Round to nearest integer. | |
| int | SPUC::ceil_i (double x) |
| The nearest larger integer. | |
| int | SPUC::floor_i (double x) |
| The nearest smaller integer. | |
| double | SPUC::round (double x) |
| Round to nearest integer, return result in double. | |
| bool | SPUC::is_int (double x) |
| Return true if x is an integer. | |
| bool | SPUC::is_even (int x) |
| Return true if x is an even integer. | |
| int | SPUC::needed_bits (int n) |
| Calculate how many bits are needed to represent the integer n. | |
| int | SPUC::needed_bits (double n) |
| The number of bits needed to encode {n} symbols. (Yes, it is exact!). | |
| int | SPUC::pow2 (int x) |
| Calculate two to the power of x (2^x). | |
| double | SPUC::pow2 (double x) |
| Calculate two to the power of x (2^x). | |
| double | SPUC::pow10 (double x) |
| Calculate ten to the power of x (10^x). | |
| double | SPUC::dB (double x) |
| Decibel of x (10*log10(x)). | |
| double | SPUC::inv_dB (double x) |
| Inverse of decibel. | |
| int | SPUC::gray_code (int x) |
| Convert to Gray Code. | |
| double | SPUC::binom (int n, int k) |
| Compute the binomial coefficient "n over k" as a float. | |
| int | SPUC::binom_i (int n, int k) |
| Compute the binomial coefficient "n over k" as an integer. | |
| double | SPUC::log_binom (int n, int k) |
| Compute the base 10 logarithm of the binomial coefficient "n over k". | |
| double | SPUC::rad_to_deg (double x) |
| Convert radians to degrees. | |
| double | SPUC::deg_to_rad (double x) |
| Convert degrees to radians. | |
| double | SPUC::asinh (double x) |
| Arcus sinhyp. | |
| double | SPUC::acosh (double x) |
| Arcus coshyp. | |
| double | SPUC::atanh (double x) |
| Arcus tanhyp. | |
| double | SPUC::sqr (double x) |
| Square of x. | |
| double | SPUC::rem (double x, double y) |
| The reminder of the division x/y. | |
| double | SPUC::sign (double x) |
| The sign of x. | |
| double | SPUC::sgn (double x) |
| The sign of x. | |
| signed char | SPUC::abs (signed char x) |
| Absolute value. | |
| short | SPUC::abs (short x) |
| Absolute value. | |
| double | SPUC::fact (int index) |
| Calculates factorial coefficient for index <= 170. | |
| long | SPUC::mod (long k, long n) |
| Calculates the modulus, i.e. the signed reminder after division. | |
| long | SPUC::gcd (long a, long b) |
| returns the greatest common divisor (GCD) g of the elements a and b. | |
| double | SPUC::integrate (double(*f)(double), double A, double B, double tol=0.001) |
Integrate over the function f from A to B with tolerance tol. | |
2002/12/19 23:56:44
1.4.4