summaryrefslogtreecommitdiff
path: root/hw2/calcSigmoid.cpp
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2022-09-09 15:22:01 -0600
committerGitHub <noreply@github.com>2022-09-09 15:22:01 -0600
commite2ab34e60f544d9d6902fe3eb8e0947009234955 (patch)
tree0a93bb11a63e8dc62663925f7f90f41576229dc2 /hw2/calcSigmoid.cpp
parent6ae81ee58a1d2ffa8f8f5fe9dc45a8f064c31c4d (diff)
added commentsHEADmaster
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