#include <iostream>
#include <cmath>
double NumberBetween0and1(double x) {
return 1.0 / (1 + std::exp(-x));
}
int main() {
for (double x =-1000.0;x < 1000;x = x + 0.1) {
double t = NumberBetween0and1(x);
if (t < 0 || t > 1) {
std::cerr << "x = " << x << " t = " << t << std::endl;
}
}
return 0;
}