Average Error: 4.8 → 0.1
Time: 15.2s
Precision: 64
\[\frac{x}{y \cdot y} - 3\]
\[\frac{x}{y} \cdot \frac{1}{y} - 3\]
\frac{x}{y \cdot y} - 3
\frac{x}{y} \cdot \frac{1}{y} - 3
double f(double x, double y) {
        double r218681 = x;
        double r218682 = y;
        double r218683 = r218682 * r218682;
        double r218684 = r218681 / r218683;
        double r218685 = 3.0;
        double r218686 = r218684 - r218685;
        return r218686;
}

double f(double x, double y) {
        double r218687 = x;
        double r218688 = y;
        double r218689 = r218687 / r218688;
        double r218690 = 1.0;
        double r218691 = r218690 / r218688;
        double r218692 = r218689 * r218691;
        double r218693 = 3.0;
        double r218694 = r218692 - r218693;
        return r218694;
}

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

Derivation

  1. Initial program 4.8

    \[\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{x}{y} \cdot \frac{1}{y} - 3\]

Reproduce

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

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

  (- (/ x (* y y)) 3))