\frac{x0}{1 - x1} - x0\frac{\log \left(e^{\left(\left(\frac{\sqrt[3]{x0}}{\sqrt{1 - x1}} \cdot \frac{\sqrt[3]{x0}}{\sqrt{1 - x1}}\right) \cdot \sqrt[3]{x0}\right) \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}double f(double x0, double x1) {
double r277104 = x0;
double r277105 = 1.0;
double r277106 = x1;
double r277107 = r277105 - r277106;
double r277108 = r277104 / r277107;
double r277109 = r277108 - r277104;
return r277109;
}
double f(double x0, double x1) {
double r277110 = x0;
double r277111 = cbrt(r277110);
double r277112 = 1.0;
double r277113 = x1;
double r277114 = r277112 - r277113;
double r277115 = sqrt(r277114);
double r277116 = r277111 / r277115;
double r277117 = r277116 * r277116;
double r277118 = r277117 * r277111;
double r277119 = r277110 / r277114;
double r277120 = r277118 * r277119;
double r277121 = r277110 * r277110;
double r277122 = r277120 - r277121;
double r277123 = exp(r277122);
double r277124 = log(r277123);
double r277125 = r277119 + r277110;
double r277126 = r277124 / r277125;
return r277126;
}




Bits error versus x0




Bits error versus x1
Results
| Original | 7.8 |
|---|---|
| Target | 0.3 |
| Herbie | 5.1 |
Initial program 7.8
rmApplied flip--7.2
rmApplied add-sqr-sqrt5.6
Applied add-cube-cbrt5.6
Applied times-frac6.6
rmApplied add-log-exp6.6
Applied add-log-exp6.6
Applied diff-log6.3
Simplified6.3
rmApplied *-un-lft-identity6.3
Applied times-frac5.6
Applied associate-*l*5.1
Final simplification5.1
herbie shell --seed 2020045
(FPCore (x0 x1)
:name "(- (/ x0 (- 1 x1)) x0)"
:precision binary64
:pre (or (and (== x0 1.855) (== x1 0.000209)) (and (== x0 2.985) (== x1 0.0186)))
:herbie-target
(/ (* x0 x1) (- 1 x1))
(- (/ x0 (- 1 x1)) x0))