summaryrefslogtreecommitdiff
path: root/hw2/calcSigmoid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'hw2/calcSigmoid.cpp')
-rw-r--r--hw2/calcSigmoid.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw2/calcSigmoid.cpp b/hw2/calcSigmoid.cpp
index 723ec66..e1ac3ed 100644
--- a/hw2/calcSigmoid.cpp
+++ b/hw2/calcSigmoid.cpp
@@ -4,16 +4,16 @@
// Homework 2 - Problem 6
#include<iostream>
-#include<cmath>
+#include<cmath> // Required for using the exp function
using namespace std;
int main() {
double x = 0;
double sigmoid = 0;
- cout << "Enter a value for x:\n";
+ cout << "Enter a value for x:\n"; // User input
cin >> x;
sigmoid = 1/(1+(exp(-x)));
- cout << "The sigmoid for x=" << x << " is " << sigmoid;
+ cout << "The sigmoid for x=" << x << " is " << sigmoid; // prints our sigmoid function
return 0;
} \ No newline at end of file