4.3.1 Sigmoid
Last updated
Last updated
#include <stdio.h>
#include <math.h>
double sigmoid(double x) {
return 1 / (1 + exp(-x));
}
int main() {
double x = 0.5;
double y = sigmoid(x);
printf("The sigmoid of %f is %f\n", x, y);
return 0;
}The sigmoid of 0.500000 is 0.622459