Hi,
Below is a small C program that prints e^i.
#include <stdio.h>
#include <complex.h>
int main(void)
{
printf("e^i = %lf + %lf i\n",creal(cexp(I)),cimag(cexp(I)));
}
Compiling on linux works fine
pgcc -o my_prog main.c
./my_prog
e^i = 0.540302 + 0.841471 i
However, when compiling on windows, the code crashes without throwing an error message.
pgcc -o my_prog main.c
.\my_prog
Is some additional step required on windows?