pantry/projects/jugit.fz-juelich.de/mlz/libcerf/test.c
Andrew c46d559a04
jugit.fz-juelich.de/mlz/libcerf (#2589)
* jugit.fz-juelich.de/mlz/libcerf

* gcc

* DCMAKE_CXX_STANDARD

* modified:   projects/jugit.fz-juelich.de/mlz/libcerf/package.yml

* builds local...

* need perl

---------

Co-authored-by: Jacob Heider <jacob@tea.xyz>
2023-08-20 22:52:43 -04:00

13 lines
283 B
C

#include <cerf.h>
#include <complex.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main (void) {
double _Complex a = 1.0 - 0.4I;
a = cerf(a);
if (fabs(creal(a)-0.910867) > 1.e-6) abort();
if (fabs(cimag(a)+0.156454) > 1.e-6) abort();
return 0;
}