Average Error: 5.2 → 0.1
Time: 9.4s
Precision: 64
\[\frac{x}{y \cdot y} - 3\]
\[\frac{1}{\frac{y}{x} \cdot y} - 3\]
\frac{x}{y \cdot y} - 3
\frac{1}{\frac{y}{x} \cdot y} - 3
double f(double x, double y) {
        double r10607895 = x;
        double r10607896 = y;
        double r10607897 = r10607896 * r10607896;
        double r10607898 = r10607895 / r10607897;
        double r10607899 = 3.0;
        double r10607900 = r10607898 - r10607899;
        return r10607900;
}

double f(double x, double y) {
        double r10607901 = 1.0;
        double r10607902 = y;
        double r10607903 = x;
        double r10607904 = r10607902 / r10607903;
        double r10607905 = r10607904 * r10607902;
        double r10607906 = r10607901 / r10607905;
        double r10607907 = 3.0;
        double r10607908 = r10607906 - r10607907;
        return r10607908;
}

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.2
Target0.1
Herbie0.1
\[\frac{\frac{x}{y}}{y} - 3\]

Derivation

  1. Initial program 5.2

    \[\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 clear-num0.1

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

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

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

Reproduce

herbie shell --seed 2019179 +o rules:numerics
(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))