Average Error: 5.3 → 0.1
Time: 41.9s
Precision: 64
\[\frac{x}{y \cdot y} - 3\]
\[\frac{1}{y} \cdot \frac{x}{y} - 3\]
\frac{x}{y \cdot y} - 3
\frac{1}{y} \cdot \frac{x}{y} - 3
double f(double x, double y) {
        double r15178041 = x;
        double r15178042 = y;
        double r15178043 = r15178042 * r15178042;
        double r15178044 = r15178041 / r15178043;
        double r15178045 = 3.0;
        double r15178046 = r15178044 - r15178045;
        return r15178046;
}

double f(double x, double y) {
        double r15178047 = 1.0;
        double r15178048 = y;
        double r15178049 = r15178047 / r15178048;
        double r15178050 = x;
        double r15178051 = r15178050 / r15178048;
        double r15178052 = r15178049 * r15178051;
        double r15178053 = 3.0;
        double r15178054 = r15178052 - r15178053;
        return r15178054;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.3
Target0.1
Herbie0.1
\[\frac{\frac{x}{y}}{y} - 3\]

Derivation

  1. Initial program 5.3

    \[\frac{x}{y \cdot y} - 3\]
  2. Using strategy rm
  3. Applied associate-/r*0.1

    \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} - 3\]
  4. Using strategy rm
  5. Applied div-inv0.1

    \[\leadsto \color{blue}{\frac{x}{y} \cdot \frac{1}{y}} - 3\]
  6. Final simplification0.1

    \[\leadsto \frac{1}{y} \cdot \frac{x}{y} - 3\]

Reproduce

herbie shell --seed 2019200 
(FPCore (x y)
  :name "Statistics.Sample:$skurtosis from math-functions-0.1.5.2"

  :herbie-target
  (- (/ (/ x y) y) 3.0)

  (- (/ x (* y y)) 3.0))