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

1. x = 1.3100436170095023e+65
$e^{x} - e^{x + \frac{1}{x}}$
$e^{x} - e^{x} \cdot e^{\frac{1}{x}}$
e^{x} - e^{x + \frac{1}{x}}
e^{x} - e^{x} \cdot e^{\frac{1}{x}}
double f(double x) {
double r1693641 = x;
double r1693642 = exp(r1693641);
double r1693643 = 1.0;
double r1693644 = r1693643 / r1693641;
double r1693645 = r1693641 + r1693644;
double r1693646 = exp(r1693645);
double r1693647 = r1693642 - r1693646;
return r1693647;
}


double f(double x) {
double r1693648 = x;
double r1693649 = exp(r1693648);
double r1693650 = 1.0;
double r1693651 = r1693650 / r1693648;
double r1693652 = exp(r1693651);
double r1693653 = r1693649 * r1693652;
double r1693654 = r1693649 - r1693653;
return r1693654;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.1

$e^{x} - e^{x + \frac{1}{x}}$
2. Using strategy rm
3. Applied exp-sum0.0

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

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

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "exp(x)-exp(x+1/x)"
:precision binary64
(- (exp x) (exp (+ x (/ 1 x)))))