|
Epstein Zeta Library 0.5.0
Calculates the Epstein Zeta function
|
Benchmarking of the Epstein zeta function. More...
#include "../tools.h"#include "epsteinZeta.h"#include "stdbool.h"#include "utils.h"#include <complex.h>#include <errno.h>#include <math.h>#include <stdio.h>#include <stdlib.h>
Macros | |
| #define | MAX_PATH_LENGTH 1024 |
| #define | BASE_PATH "csv" |
Functions | |
| double | sHat (double nu, unsigned int dim, double *y) |
| Calculates the singularity of the Epstein zeta function as y approaches zero. | |
| void | freeTestResources (double *a, double *nu, double *x, double *y, double *zetaRef) |
| Free memory allocated for test resources. | |
| void | reportEpsteinZetaError (double complex valZeta, double complex valZetaReg, double errorMaxAbsRel, double tol, double *m, unsigned int dim, double nu, double *x, double *y) |
| Reports an error when the Epstein Zeta function representation test fails. | |
| void | reportEpsteinZetaCutoffError (const char *testCase, double complex zeta1, double complex zeta2, double nu, double *y, unsigned int dim) |
| Reports an error when the Epstein Zeta function cutoff test fails. | |
| int | test_epsteinZeta_epsteinZetaReg () |
| Test function for Epstein Zeta and Regularized Epstein Zeta functions. | |
| bool | test_epsteinZeta_epsteinZetaReg_represent_as_each_other () |
| Test if the Epstein Zeta function can be represented in terms of the regularized function and the singularity, particularly focusing on cases where nu = dim + 2k, where k is an integer. | |
| bool | test_epsteinZeta_cutoff () |
| Test the Epstein Zeta function behavior around the cutoff point for nu <= dim. | |
| int | main () |
| Main function to run all Epstein Zeta function tests. | |
Benchmarking of the Epstein zeta function.
| void freeTestResources | ( | double * | a, |
| double * | nu, | ||
| double * | x, | ||
| double * | y, | ||
| double * | zetaRef ) |
Free memory allocated for test resources.
This function deallocates memory that was dynamically allocated for various arrays used in the Epstein Zeta function tests.
| [in] | a | Pointer to the matrix of coefficients. |
| [in] | nu | Pointer to the array of nu values. |
| [in] | x | Pointer to the array of x values. |
| [in] | y | Pointer to the array of y values. |
| [in] | zetaRef | Pointer to the array of reference zeta values. |
| int main | ( | void | ) |
Main function to run all Epstein Zeta function tests.
| void reportEpsteinZetaCutoffError | ( | const char * | testCase, |
| double complex | zeta1, | ||
| double complex | zeta2, | ||
| double | nu, | ||
| double * | y, | ||
| unsigned int | dim ) |
Reports an error when the Epstein Zeta function cutoff test fails.
| [in] | testCase | A string describing the specific test case that failed. |
| [in] | zeta1 | The first computed value of the Epstein Zeta function. |
| [in] | zeta2 | The second computed value of the Epstein Zeta function for comparison. |
| [in] | nu | The parameter nu of the Epstein zeta function. |
| [in] | y | Pointer to the array of y values. |
| [in] | dim | The dimension of the lattice. |
| void reportEpsteinZetaError | ( | double complex | valZeta, |
| double complex | valZetaReg, | ||
| double | errorMaxAbsRel, | ||
| double | tol, | ||
| double * | m, | ||
| unsigned int | dim, | ||
| double | nu, | ||
| double * | x, | ||
| double * | y ) |
Reports an error when the Epstein Zeta function representation test fails.
This function prints detailed information about the test case that failed, including the computed values, error margins, and input parameters.
| [in] | valZeta | The value computed by epsteinZeta. |
| [in] | valZetaReg | The value computed by the epsteinZetaReg representation. |
| [in] | errorMaxAbsRel | The maximum of absolute and relative errors. |
| [in] | tol | The tolerance level for the test. |
| [in] | m | Pointer to the matrix of coefficients. |
| [in] | dim | The dimension of the lattice. |
| [in] | nu | The parameter nu of the Epstein zeta function. |
| [in] | x | Pointer to the array of x values. |
| [in] | y | Pointer to the array of y values. |
| double sHat | ( | double | nu, |
| unsigned int | dim, | ||
| double * | y ) |
Calculates the singularity of the Epstein zeta function as y approaches zero.
| [in] | nu | The parameter nu of the Epstein zeta function. |
| [in] | dim | The dimension of the lattice. |
| [in] | y | Pointer to the array of y values. |
| bool test_epsteinZeta_cutoff | ( | ) |
Test the Epstein Zeta function behavior around the cutoff point for nu <= dim.
This function tests the Epstein Zeta function for four cases:
It then compares these results to check if:
| int test_epsteinZeta_epsteinZetaReg | ( | ) |
Test function for Epstein Zeta and Regularized Epstein Zeta functions.
This function tests both the epsteinZeta and epsteinZetaReg functions by comparing their outputs with reference values read from data files. It performs multiple test cases for each function and reports the number of passed tests.
| bool test_epsteinZeta_epsteinZetaReg_represent_as_each_other | ( | ) |
Test if the Epstein Zeta function can be represented in terms of the regularized function and the singularity, particularly focusing on cases where nu = dim + 2k, where k is an integer.