mathplus.h File Reference

general purpose math definitions and functions (C) More...

#include <math.h>
#include "constants.h"

Include dependency graph for mathplus.h:

Go to the source code of this file.

Defines

#define LONG_LONG   long long

Functions

double bernoulli (const double x)
 Despite being C compliant, we do use namespace stuff, if we can.
double asinh (const double x)
unsigned long binom (const unsigned long x, unsigned long y)
 x!/(y!(x-y)!)
unsigned long binomial (const unsigned long y, const unsigned long z)
 (y+z)!/(y!z!)
unsigned long long fac (const unsigned char x)
unsigned long trinomial (const unsigned long x, const unsigned long y, const unsigned long z)
 (x+y+z)!/(x!y!z!) Like for binomial, more efficient algos (or algos less prone to overflow) are possible .
long double fact (const double x)
long double ldgamma (const double x)
 the gamma fct
double poisson (const double x, const double la)
 poisson distrib
double chi_s (const double x, const double n)
 chi_square distrib
double erfc3 (const double x, const double c, const double s)
 Gauss normal distribution (x, center, sigma).


Detailed Description

general purpose math definitions and functions (C)

Definition in file mathplus.h.


Define Documentation

#define LONG_LONG   long long

Definition at line 22 of file mathplus.h.


Function Documentation

double asinh ( const double  x  )  [inline]

Definition at line 44 of file mathplus.h.

References std::fabs(), log(), MATH__, and sqrt().

double bernoulli ( const double  x  )  [inline]

Despite being C compliant, we do use namespace stuff, if we can.

<Bernoulli function from: Simulation of optoelectronic semiconductors, TR 310, S. 60

Definition at line 35 of file mathplus.h.

References exp(), std::fabs(), and MATH__.

unsigned long binom ( const unsigned long  x,
unsigned long  y 
) [inline]

x!/(y!(x-y)!)

Definition at line 52 of file mathplus.h.

References LONG_LONG.

unsigned long binomial ( const unsigned long  y,
const unsigned long  z 
) [inline]

(y+z)!/(y!z!)

Definition at line 66 of file mathplus.h.

References LONG_LONG.

double chi_s ( const double  x,
const double  n 
) [inline]

chi_square distrib

Definition at line 130 of file mathplus.h.

References exp(), ldgamma(), MATH__, and std::pow().

double erfc3 ( const double  x,
const double  c,
const double  s 
) [inline]

Gauss normal distribution (x, center, sigma).

Definition at line 137 of file mathplus.h.

References exp(), MATH__, pi, and sqrt().

unsigned long long fac ( const unsigned char  x  )  [inline]

Definition at line 79 of file mathplus.h.

References LONG_LONG.

Referenced by TBCI::TSVector< T >::abs(), TBCI::TSVector< T >::add_t_tsv(), TBCI::CTensor< T >::calclayout(), TBCI::TSVector< T >::clone(), TBCI::TSMatrix< T >::clone(), TBCI::F_TSMatrix< T >::clone(), TBCI::Matrix< T >::div_rows(), TBCI::TSVector< T >::eval(), TBCI::TSMatrix< T >::eval(), TBCI::F_TSMatrix< T >::eval(), TBCI::TSVector< T >::fabs(), TBCI::F_TSMatrix< T >::fabs(), TBCI::TSVector< T >::fabssqr(), TBCI::TSMatrix< T >::fabssqr(), TBCI::TSVector< T >::get(), TBCI::F_TSMatrix< T >::get(), TBCI::TSVector< T >::getfac(), TBCI::TSMatrix< T >::getfac(), TBCI::TSVector< T >::getfacref(), TBCI::grid_min(), TBCI::Grid_Min_2D(), TBCI::hyper2geom1(), TBCI::lev_mar(), TBCI::LM_fit_2D(), TBCI::Matrix< T >::mult_rows(), TBCI::TSVector< T >::operator()(), TBCI::TSMatrix< T >::operator()(), TBCI::F_TSMatrix< T >::operator()(), TBCI::TSVector< T >::operator*(), TBCI::TSMatrix< T >::operator*(), TBCI::F_TSMatrix< T >::operator*(), TBCI::TSVector< T >::operator*=(), TBCI::TSMatrix< T >::operator*=(), TBCI::F_TSMatrix< T >::operator*=(), TBCI::TSVector< T >::operator+(), TBCI::TSMatrix< T >::operator+(), TBCI::TSVector< T >::operator-(), TBCI::TSMatrix< T >::operator-(), TBCI::F_TSMatrix< T >::operator-(), TBCI::TSVector< T >::operator/(), TBCI::TSMatrix< T >::operator/(), TBCI::F_TSMatrix< T >::operator/(), TBCI::TSVector< T >::operator/=(), TBCI::TSMatrix< T >::operator/=(), TBCI::F_TSMatrix< T >::operator/=(), TBCI::TSVector< T >::operator=(), TBCI::TSMatrix< T >::operator=(), TBCI::F_TSMatrix< T >::operator=(), TBCI::TSVector< T >::operator==(), TBCI::TSMatrix< T >::operator==(), TBCI::F_TSMatrix< T >::operator==(), TBCI::partial_del(), TBCI::Partial_Del(), TBCI::TSVector< T >::sub_t_tsv(), TBCI::TSVector< T >::sum(), and trinomial().

long double fact ( const double  x  )  [inline]

Note:
Stirling is only fine for large numbers

Definition at line 101 of file mathplus.h.

References E1, MATH__, pi, std::pow(), and sqrt().

Referenced by do_mat_tsv_mult(), ldgamma(), and TBCI::lu_solve_expert().

long double ldgamma ( const double  x  )  [inline]

the gamma fct

Definition at line 112 of file mathplus.h.

References fact(), and MATH__.

Referenced by chi_s(), and poisson().

double poisson ( const double  x,
const double  la 
) [inline]

poisson distrib

Definition at line 124 of file mathplus.h.

References exp(), ldgamma(), MATH__, and std::pow().

unsigned long trinomial ( const unsigned long  x,
const unsigned long  y,
const unsigned long  z 
) [inline]

(x+y+z)!/(x!y!z!) Like for binomial, more efficient algos (or algos less prone to overflow) are possible .

..

Definition at line 92 of file mathplus.h.

References fac().


Generated on Wed Nov 20 09:28:15 2013 for TBCI Numerical high perf. C++ Library by  doxygen 1.5.6