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

1. x = 1.3100436170095023e+65
$e^{x + 1} - e^{2 \cdot x}$
$\left(\sqrt{e^{x + 1}} + \sqrt{e^{2 \cdot x}}\right) \cdot \left(\sqrt{e^{x + 1}} - \sqrt{e^{2 \cdot x}}\right)$
e^{x + 1} - e^{2 \cdot x}
\left(\sqrt{e^{x + 1}} + \sqrt{e^{2 \cdot x}}\right) \cdot \left(\sqrt{e^{x + 1}} - \sqrt{e^{2 \cdot x}}\right)
double f(double x) {
double r1622768 = x;
double r1622769 = 1.0;
double r1622770 = r1622768 + r1622769;
double r1622771 = exp(r1622770);
double r1622772 = 2.0;
double r1622773 = r1622772 * r1622768;
double r1622774 = exp(r1622773);
double r1622775 = r1622771 - r1622774;
return r1622775;
}


double f(double x) {
double r1622776 = x;
double r1622777 = 1.0;
double r1622778 = r1622776 + r1622777;
double r1622779 = exp(r1622778);
double r1622780 = sqrt(r1622779);
double r1622781 = 2.0;
double r1622782 = r1622781 * r1622776;
double r1622783 = exp(r1622782);
double r1622784 = sqrt(r1622783);
double r1622785 = r1622780 + r1622784;
double r1622786 = r1622780 - r1622784;
double r1622787 = r1622785 * r1622786;
return r1622787;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.7

$e^{x + 1} - e^{2 \cdot x}$
2. Using strategy rm

$\leadsto e^{x + 1} - \color{blue}{\sqrt{e^{2 \cdot x}} \cdot \sqrt{e^{2 \cdot x}}}$

$\leadsto \color{blue}{\sqrt{e^{x + 1}} \cdot \sqrt{e^{x + 1}}} - \sqrt{e^{2 \cdot x}} \cdot \sqrt{e^{2 \cdot x}}$
5. Applied difference-of-squares0.0

$\leadsto \color{blue}{\left(\sqrt{e^{x + 1}} + \sqrt{e^{2 \cdot x}}\right) \cdot \left(\sqrt{e^{x + 1}} - \sqrt{e^{2 \cdot x}}\right)}$
6. Final simplification0.0

$\leadsto \left(\sqrt{e^{x + 1}} + \sqrt{e^{2 \cdot x}}\right) \cdot \left(\sqrt{e^{x + 1}} - \sqrt{e^{2 \cdot x}}\right)$

# Reproduce

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