Average Error: 0.0 → 0.5
Time: 7.9s
Precision: 64
$\frac{1}{1 + e^{-x}}$
$\sqrt{\frac{1}{e^{-x} + 1}} \cdot \sqrt{\frac{1}{e^{-x} + 1}}$
\frac{1}{1 + e^{-x}}
\sqrt{\frac{1}{e^{-x} + 1}} \cdot \sqrt{\frac{1}{e^{-x} + 1}}
double f(double x) {
double r30955352 = 1.0;
double r30955353 = x;
double r30955354 = -r30955353;
double r30955355 = exp(r30955354);
double r30955356 = r30955352 + r30955355;
double r30955357 = r30955352 / r30955356;
return r30955357;
}


double f(double x) {
double r30955358 = 1.0;
double r30955359 = x;
double r30955360 = -r30955359;
double r30955361 = exp(r30955360);
double r30955362 = r30955361 + r30955358;
double r30955363 = r30955358 / r30955362;
double r30955364 = sqrt(r30955363);
double r30955365 = r30955364 * r30955364;
return r30955365;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\frac{1}{1 + e^{-x}}$
2. Using strategy rm
$\leadsto \color{blue}{\sqrt{\frac{1}{1 + e^{-x}}} \cdot \sqrt{\frac{1}{1 + e^{-x}}}}$
$\leadsto \sqrt{\frac{1}{e^{-x} + 1}} \cdot \sqrt{\frac{1}{e^{-x} + 1}}$
herbie shell --seed 1