Skip to content

Instantly share code, notes, and snippets.

@iwillspeak
Last active Dec 15, 2015
Embed
What would you like to do?
An example of computing R and Theta for a complex number in C99
#include <stdio.h>
#include <stdlib.h>
#include <complex.h>
int main(int argc, char* argv[])
{
float _Complex number = 1 + (1 * _Complex_I);
printf("%g, %g", cabs(number), carg(number));
exit(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment