Average Error: 4.8 → 0.1
Time: 3.3s
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 r274171 = x;
        double r274172 = y;
        double r274173 = r274172 * r274172;
        double r274174 = r274171 / r274173;
        double r274175 = 3.0;
        double r274176 = r274174 - r274175;
        return r274176;
}

double f(double x, double y) {
        double r274177 = x;
        double r274178 = y;
        double r274179 = r274177 / r274178;
        double r274180 = 1.0;
        double r274181 = r274180 / r274178;
        double r274182 = r274179 * r274181;
        double r274183 = 3.0;
        double r274184 = r274182 - r274183;
        return r274184;
}

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