Average Error: 4.6 → 0.1
Time: 7.7s
Precision: 64
\[\frac{x}{y \cdot y} - 3.0\]
\[\frac{1}{\frac{y}{x} \cdot y} - 3.0\]
\frac{x}{y \cdot y} - 3.0
\frac{1}{\frac{y}{x} \cdot y} - 3.0
double f(double x, double y) {
        double r16694061 = x;
        double r16694062 = y;
        double r16694063 = r16694062 * r16694062;
        double r16694064 = r16694061 / r16694063;
        double r16694065 = 3.0;
        double r16694066 = r16694064 - r16694065;
        return r16694066;
}

double f(double x, double y) {
        double r16694067 = 1.0;
        double r16694068 = y;
        double r16694069 = x;
        double r16694070 = r16694068 / r16694069;
        double r16694071 = r16694070 * r16694068;
        double r16694072 = r16694067 / r16694071;
        double r16694073 = 3.0;
        double r16694074 = r16694072 - r16694073;
        return r16694074;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original4.6
Target0.1
Herbie0.1
\[\frac{\frac{x}{y}}{y} - 3.0\]

Derivation

  1. Initial program 4.6

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

    \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} - 3.0\]
  4. Using strategy rm
  5. Applied clear-num0.1

    \[\leadsto \color{blue}{\frac{1}{\frac{y}{\frac{x}{y}}}} - 3.0\]
  6. Using strategy rm
  7. Applied associate-/r/0.1

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

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

Reproduce

herbie shell --seed 2019165 
(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))