Average Error: 0.1 → 0.0
Time: 12.4s
Precision: 64
• ## could not determine a ground truth for program body (more)

1. x = 1.3100436170095023e+65
$\left(\sinh x - \cosh x\right) + \tanh x$
$\frac{1 - e^{-2 \cdot x}}{1 + e^{x \cdot -2}} - e^{-x}$
\left(\sinh x - \cosh x\right) + \tanh x
\frac{1 - e^{-2 \cdot x}}{1 + e^{x \cdot -2}} - e^{-x}
double f(double x) {
double r2224074 = x;
double r2224075 = sinh(r2224074);
double r2224076 = cosh(r2224074);
double r2224077 = r2224075 - r2224076;
double r2224078 = tanh(r2224074);
double r2224079 = r2224077 + r2224078;
return r2224079;
}


double f(double x) {
double r2224080 = 1.0;
double r2224081 = -2.0;
double r2224082 = x;
double r2224083 = r2224081 * r2224082;
double r2224084 = exp(r2224083);
double r2224085 = r2224080 - r2224084;
double r2224086 = r2224082 * r2224081;
double r2224087 = exp(r2224086);
double r2224088 = r2224080 + r2224087;
double r2224089 = r2224085 / r2224088;
double r2224090 = -r2224082;
double r2224091 = exp(r2224090);
double r2224092 = r2224089 - r2224091;
return r2224092;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.1

$\left(\sinh x - \cosh x\right) + \tanh x$
2. Simplified0.0

$\leadsto \color{blue}{\tanh x - e^{-x}}$
3. Using strategy rm
4. Applied tanh-def0.0

$\leadsto \color{blue}{\frac{1 - e^{-2 \cdot x}}{1 + e^{-2 \cdot x}}} - e^{-x}$
5. Simplified0.0

$\leadsto \frac{1 - e^{-2 \cdot x}}{\color{blue}{1 + e^{x \cdot -2}}} - e^{-x}$
6. Final simplification0.0

$\leadsto \frac{1 - e^{-2 \cdot x}}{1 + e^{x \cdot -2}} - e^{-x}$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "sinh(x) - cosh(x) + tanh(x)"
:precision binary64
(+ (- (sinh x) (cosh x)) (tanh x)))