Epstein Zeta Library 0.5.1
Calculates the Epstein Zeta function
Loading...
Searching...
No Matches
Macros | Functions
test_epsteinZeta.c File Reference

Benchmarking of the Epstein zeta function. More...

#include "../tools.h"
#include "epsteinZeta.h"
#include "utils.h"
#include <complex.h>
#include <errno.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for test_epsteinZeta.c:

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_random_matrices (void)
 Tests Epstein zeta function for random matrices in multiple dimensions by comparing against Mathematica reference values.
 
int test_epsteinZetaReg_random_matrices (void)
 Tests Epstein zeta function for random matrices in multiple dimensions by comparing against Mathematica reference values.
 
int main ()
 Main function to run all Epstein zeta function tests.
 

Detailed Description

Benchmarking of the Epstein zeta function.

Function Documentation

◆ freeTestResources()

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.

Parameters
[in]aPointer to the matrix of coefficients.
[in]nuPointer to the array of nu values.
[in]xPointer to the array of x values.
[in]yPointer to the array of y values.
[in]zetaRefPointer to the array of reference zeta values.

◆ main()

int main ( void )

Main function to run all Epstein zeta function tests.

Returns
number of failed tests.

◆ reportEpsteinZetaCutoffError()

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.

Parameters
[in]testCaseA string describing the specific test case that failed.
[in]zeta1The first computed value of the Epstein zeta function.
[in]zeta2The second computed value of the Epstein zeta function for comparison.
[in]nuThe parameter nu of the Epstein zeta function.
[in]yPointer to the array of y values.
[in]dimThe dimension of the lattice.

◆ reportEpsteinZetaError()

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.

Parameters
[in]valZetaThe value computed by epsteinZeta.
[in]valZetaRegThe value computed by the epsteinZetaReg representation.
[in]errorMaxAbsRelThe maximum of absolute and relative errors.
[in]tolThe tolerance level for the test.
[in]mPointer to the matrix of coefficients.
[in]dimThe dimension of the lattice.
[in]nuThe parameter nu of the Epstein zeta function.
[in]xPointer to the array of x values.
[in]yPointer to the array of y values.

◆ sHat()

double sHat ( double nu,
unsigned int dim,
double * y )

Calculates the singularity of the Epstein zeta function as y approaches zero.

Parameters
[in]nuThe parameter nu of the Epstein zeta function.
[in]dimThe dimension of the lattice.
[in]yPointer to the array of y values.
Returns
The value of the singularity function.

◆ test_epsteinZeta_random_matrices()

int test_epsteinZeta_random_matrices ( void )

Tests Epstein zeta function for random matrices in multiple dimensions by comparing against Mathematica reference values.

Returns
number of failed tests.

◆ test_epsteinZetaReg_random_matrices()

int test_epsteinZetaReg_random_matrices ( void )

Tests Epstein zeta function for random matrices in multiple dimensions by comparing against Mathematica reference values.

Returns
number of failed tests.