Average Error: 5.3 → 0.1
Time: 30.6s
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 r13805799 = x;
        double r13805800 = y;
        double r13805801 = r13805800 * r13805800;
        double r13805802 = r13805799 / r13805801;
        double r13805803 = 3.0;
        double r13805804 = r13805802 - r13805803;
        return r13805804;
}

double f(double x, double y) {
        double r13805805 = 1.0;
        double r13805806 = y;
        double r13805807 = r13805805 / r13805806;
        double r13805808 = x;
        double r13805809 = r13805808 / r13805806;
        double r13805810 = r13805807 * r13805809;
        double r13805811 = 3.0;
        double r13805812 = r13805810 - r13805811;
        return r13805812;
}

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 2019168 +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))