Average Error: 0.0 → 0.1
Time: 13.3s
Precision: 64
$-10 \lt x \land x \lt 10$
$\log \left(\frac{e^{x}}{1 + e^{x}}\right)$
$\log \left(\left(1 + \left(e^{x} \cdot e^{x} - e^{x}\right)\right) \cdot \frac{e^{x}}{e^{3 \cdot x} + 1}\right)$
\log \left(\frac{e^{x}}{1 + e^{x}}\right)
\log \left(\left(1 + \left(e^{x} \cdot e^{x} - e^{x}\right)\right) \cdot \frac{e^{x}}{e^{3 \cdot x} + 1}\right)
double f(double x) {
double r53444526 = x;
double r53444527 = exp(r53444526);
double r53444528 = 1.0;
double r53444529 = r53444528 + r53444527;
double r53444530 = r53444527 / r53444529;
double r53444531 = log(r53444530);
return r53444531;
}


double f(double x) {
double r53444532 = 1.0;
double r53444533 = x;
double r53444534 = exp(r53444533);
double r53444535 = r53444534 * r53444534;
double r53444536 = r53444535 - r53444534;
double r53444537 = r53444532 + r53444536;
double r53444538 = 3.0;
double r53444539 = r53444538 * r53444533;
double r53444540 = exp(r53444539);
double r53444541 = r53444540 + r53444532;
double r53444542 = r53444534 / r53444541;
double r53444543 = r53444537 * r53444542;
double r53444544 = log(r53444543);
return r53444544;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\log \left(\frac{e^{x}}{1 + e^{x}}\right)$
2. Using strategy rm
3. Applied flip3-+0.0

$\leadsto \log \left(\frac{e^{x}}{\color{blue}{\frac{{1}^{3} + {\left(e^{x}\right)}^{3}}{1 \cdot 1 + \left(e^{x} \cdot e^{x} - 1 \cdot e^{x}\right)}}}\right)$
4. Applied associate-/r/0.1

$\leadsto \log \color{blue}{\left(\frac{e^{x}}{{1}^{3} + {\left(e^{x}\right)}^{3}} \cdot \left(1 \cdot 1 + \left(e^{x} \cdot e^{x} - 1 \cdot e^{x}\right)\right)\right)}$
5. Simplified0.1

$\leadsto \log \left(\color{blue}{\frac{e^{x}}{1 + e^{x \cdot 3}}} \cdot \left(1 \cdot 1 + \left(e^{x} \cdot e^{x} - 1 \cdot e^{x}\right)\right)\right)$
6. Final simplification0.1

$\leadsto \log \left(\left(1 + \left(e^{x} \cdot e^{x} - e^{x}\right)\right) \cdot \frac{e^{x}}{e^{3 \cdot x} + 1}\right)$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "log(exp(x)/(1+exp(x)))"
:pre (and (< (- 10) x) (< x 10))
(log (/ (exp x) (+ 1 (exp x)))))