How to use erfc() function to get the complementary error function value for N in C

1 Answer

0 votes
#include <stdio.h>     
#include <math.h>
 
int main(int argc, char **argv)
{
	printf("erfc(-1) = %.6f\n", erfc(-1));
    printf("erfc(1) = %.6f\n", erfc(1));
    printf("erfc(0) = %.6f\n", erfc(0));
	printf("erfc(-0) = %.6f\n", erfc(-0));

    return 0;
}

/*
run:
  
erfc(-1) = 1.842701
erfc(1) = 0.157299
erfc(0) = 1.000000
erfc(-0) = 1.000000

*/

 



answered Mar 15, 2016 by avibootz
...