Epstein Zeta Library 0.5.0
Calculates the Epstein Zeta function
Loading...
Searching...
No Matches
Functions
lattice_sum.c File Reference

Calculates the Madelung constant. More...

#include <complex.h>
#include <math.h>
#include <stdio.h>
#include "epsteinZeta.h"
Include dependency graph for lattice_sum.c:

Functions

int main ()
 calculate madelung constant and compare to precomputed value.
 

Detailed Description

Calculates the Madelung constant.

Minimal working example for the Epstein Zeta Library. If the library is installed, compile with gcc -o lattice_sum lattice_sum.c -lm -lepsteinZeta If the library is not installed, compile with gcc -o lattice_sum lattice_sum.c -lm -L/path/to/library -lepsteinZeta -I/path/to/include

Author
Andreas Buchheit, Jonathan Busse and Ruben Gutendorf.
Date
06/06/2024

Function Documentation

◆ main()

int main ( void )

calculate madelung constant and compare to precomputed value.

Madelung constant: sum_{i, j, k in Z} (-1)**(i + j + k) / sqrt(i**2 + j**2 + k**2)

Returns
true, if the difference to precomputed value is smaller than 10**(-14)