Average Error: 0.0 → 0.1
Time: 9.7s
Precision: 64
\[x - \frac{y}{1 + \frac{x \cdot y}{2}}\]
\[x - \frac{1}{\frac{1 + \frac{y \cdot x}{2}}{y}}\]
x - \frac{y}{1 + \frac{x \cdot y}{2}}
x - \frac{1}{\frac{1 + \frac{y \cdot x}{2}}{y}}
double f(double x, double y) {
        double r13319651 = x;
        double r13319652 = y;
        double r13319653 = 1.0;
        double r13319654 = r13319651 * r13319652;
        double r13319655 = 2.0;
        double r13319656 = r13319654 / r13319655;
        double r13319657 = r13319653 + r13319656;
        double r13319658 = r13319652 / r13319657;
        double r13319659 = r13319651 - r13319658;
        return r13319659;
}

double f(double x, double y) {
        double r13319660 = x;
        double r13319661 = 1.0;
        double r13319662 = 1.0;
        double r13319663 = y;
        double r13319664 = r13319663 * r13319660;
        double r13319665 = 2.0;
        double r13319666 = r13319664 / r13319665;
        double r13319667 = r13319662 + r13319666;
        double r13319668 = r13319667 / r13319663;
        double r13319669 = r13319661 / r13319668;
        double r13319670 = r13319660 - r13319669;
        return r13319670;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[x - \frac{y}{1 + \frac{x \cdot y}{2}}\]
  2. Using strategy rm
  3. Applied clear-num0.1

    \[\leadsto x - \color{blue}{\frac{1}{\frac{1 + \frac{x \cdot y}{2}}{y}}}\]
  4. Final simplification0.1

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

Reproduce

herbie shell --seed 2019172 
(FPCore (x y)
  :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, B"
  (- x (/ y (+ 1.0 (/ (* x y) 2.0)))))