#include <stdio.h>#include <fstream.h>Include dependency graph for BaseDefinitions.h:

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

Go to the source code of this file.
Defines | |
| #define | Zahl double |
| #define | min(a, b) (a<b)?a:b |
| #define | epsilon 0.0000000001 |
| #define | M_SQRTPI 1.772453850905516027298167483341145182798 |
| #define | M_1SQRT2PI 0.398942280401432677939946059934 |
| #define | Free(ptr) delete[] ptr;ptr=NULL; |
| #define | lfloor(f) (long)floor(f) |
| #define | min(x, y) (x<y)?x:y |
| #define | max(x, y) (x>y)?x:y |
Functions | |
| Zahl | AsymErfc (Zahl zsq) |
| void | WriteDoubleArray (ofstream &str, long len, double *vals, char *endchar, long dim) |
| long | power (long m, long n) |
| double | power (double m, long n) |
| long | binom (long i, long k) |
| double | vectabs (double a1, double a2, double a3) |
| double | Phi (long base, long x) |
| long | LongToCoeff (long nr, long base, long *cfs, long cflen) |
| double | CoeffToDoubleModified (long base, long *cfs, long cflen, long modfact) |
| double | CoeffToDouble (long base, long *cfs, long cflen) |
| bool | IsPrimitiveRoot (long proot, long base) |
| long | CalcDeterminant (long *A, long dim, long i) |
Variables | |
| long | ERFCMAXREK |
|
|
Frees the array-pointer ptr and sets it to NULL afterwards.
|
|
|
|
|
|
approximate value for the square root of pi.
|
|
|
We want to use double, but who knows, maybe sometimes we need long double or just float. By using our own type we only have to change this here and then to recompile |
|
|
|
|
|
|
|
|
Macro, returns the maximum of two given values.
|
|
|
Macro, returns the minimum of two given values.
|
|
|
Macro, returns the minimum of two given values.
|
|
|
Calculates the Erfc by means of its asymptotic expansion.
|
|
|
calculates the determinant of the (upper left) i*i submatrix of the dim*dim Matrix A. This is really slow, but never mind... flag the rows used so that we don't need another array for the cofactor. This saves a lot of mem... |
|
|
returns the double-representation of the cofficients in base "base" given in cfs. E.g. cfs={1,2,1,2,1}, base=3 => returns 1/3 + 2/9 + 1/27 + 2/81 + 1/243 |
|
|
returns the double-representation of the cofficients in base "base" given in cfs. E.g. cfs={1,2,1,2,1}, base=3 => returns 1/3 + 2/9 + 1/27 + 2/81 + 1/243 This is the modified version, needed by Atanassov's sequence. (Not quite implemented yet ...) |
|
|
Checks if proot is a primitive root modulo base.
|
|
|
Expands n in base "base".
|
|
|
The digit inversion function. This inverts x (written down in base "base") at the comma. E.g. Phi(3, 25): 25=2*9+2*3+1=221_3 => 0.112_3=1/3 + 1/9 + 2/27 |
|
|
Writes the "dim"-dimensional array vals in Mathematica-List format to the file str.
|
|
|
Returns the binomial coefficient (i k).
|
|
|
Returns m^n where n and m are double variable. The result is of type double, too. |
|
|
Returns m^n, where n and m are long variables. The result, of course, is also of type long. |
|
|
Returns the length of the 3-dimensional vector (a1, a2, a3) (just sqrt(a1*a1 + a2*a2 + a3*a3) ).
|
|
|
Defines how many term in the asymptotic expansion of erfc=1-erf should be used for the calculation.
|
1.2.7 written by Dimitri van Heesch,
© 1997-2001