Average Error: 3.0 → 0.1
Time: 4.0s
Precision: 64
\[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
\[x + \frac{\sqrt{1}}{\frac{\sqrt{e^{z}}}{y} \cdot \left(\sqrt{e^{z}} \cdot 1.12837916709551256\right) - \frac{x}{1}}\]
x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}
x + \frac{\sqrt{1}}{\frac{\sqrt{e^{z}}}{y} \cdot \left(\sqrt{e^{z}} \cdot 1.12837916709551256\right) - \frac{x}{1}}
double f(double x, double y, double z) {
        double r454308 = x;
        double r454309 = y;
        double r454310 = 1.1283791670955126;
        double r454311 = z;
        double r454312 = exp(r454311);
        double r454313 = r454310 * r454312;
        double r454314 = r454308 * r454309;
        double r454315 = r454313 - r454314;
        double r454316 = r454309 / r454315;
        double r454317 = r454308 + r454316;
        return r454317;
}

double f(double x, double y, double z) {
        double r454318 = x;
        double r454319 = 1.0;
        double r454320 = sqrt(r454319);
        double r454321 = z;
        double r454322 = exp(r454321);
        double r454323 = sqrt(r454322);
        double r454324 = y;
        double r454325 = r454323 / r454324;
        double r454326 = 1.1283791670955126;
        double r454327 = r454323 * r454326;
        double r454328 = r454325 * r454327;
        double r454329 = r454318 / r454319;
        double r454330 = r454328 - r454329;
        double r454331 = r454320 / r454330;
        double r454332 = r454318 + r454331;
        return r454332;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original3.0
Target0.0
Herbie0.1
\[x + \frac{1}{\frac{1.12837916709551256}{y} \cdot e^{z} - x}\]

Derivation

  1. Initial program 3.0

    \[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
  2. Using strategy rm
  3. Applied add-exp-log3.0

    \[\leadsto x + \frac{y}{\color{blue}{e^{\log 1.12837916709551256}} \cdot e^{z} - x \cdot y}\]
  4. Applied prod-exp3.0

    \[\leadsto x + \frac{y}{\color{blue}{e^{\log 1.12837916709551256 + z}} - x \cdot y}\]
  5. Simplified3.0

    \[\leadsto x + \frac{y}{e^{\color{blue}{z + \log 1.12837916709551256}} - x \cdot y}\]
  6. Using strategy rm
  7. Applied clear-num3.0

    \[\leadsto x + \color{blue}{\frac{1}{\frac{e^{z + \log 1.12837916709551256} - x \cdot y}{y}}}\]
  8. Using strategy rm
  9. Applied add-sqr-sqrt3.0

    \[\leadsto x + \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{\frac{e^{z + \log 1.12837916709551256} - x \cdot y}{y}}\]
  10. Applied associate-/l*3.0

    \[\leadsto x + \color{blue}{\frac{\sqrt{1}}{\frac{\frac{e^{z + \log 1.12837916709551256} - x \cdot y}{y}}{\sqrt{1}}}}\]
  11. Simplified0.0

    \[\leadsto x + \frac{\sqrt{1}}{\color{blue}{\frac{e^{z}}{\frac{y}{1.12837916709551256}} - \frac{x}{1}}}\]
  12. Using strategy rm
  13. Applied div-inv0.0

    \[\leadsto x + \frac{\sqrt{1}}{\frac{e^{z}}{\color{blue}{y \cdot \frac{1}{1.12837916709551256}}} - \frac{x}{1}}\]
  14. Applied add-sqr-sqrt0.0

    \[\leadsto x + \frac{\sqrt{1}}{\frac{\color{blue}{\sqrt{e^{z}} \cdot \sqrt{e^{z}}}}{y \cdot \frac{1}{1.12837916709551256}} - \frac{x}{1}}\]
  15. Applied times-frac0.1

    \[\leadsto x + \frac{\sqrt{1}}{\color{blue}{\frac{\sqrt{e^{z}}}{y} \cdot \frac{\sqrt{e^{z}}}{\frac{1}{1.12837916709551256}}} - \frac{x}{1}}\]
  16. Simplified0.1

    \[\leadsto x + \frac{\sqrt{1}}{\frac{\sqrt{e^{z}}}{y} \cdot \color{blue}{\left(\sqrt{e^{z}} \cdot 1.12837916709551256\right)} - \frac{x}{1}}\]
  17. Final simplification0.1

    \[\leadsto x + \frac{\sqrt{1}}{\frac{\sqrt{e^{z}}}{y} \cdot \left(\sqrt{e^{z}} \cdot 1.12837916709551256\right) - \frac{x}{1}}\]

Reproduce

herbie shell --seed 2020049 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (+ x (/ 1 (- (* (/ 1.1283791670955126 y) (exp z)) x)))

  (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))