Average Error: 0.3 → 0.3
Time: 7.4s
Precision: 64
\[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}\]
\[\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)\]
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)
double f(double x, double y, double z, double t) {
        double r898428 = x;
        double r898429 = 0.5;
        double r898430 = r898428 * r898429;
        double r898431 = y;
        double r898432 = r898430 - r898431;
        double r898433 = z;
        double r898434 = 2.0;
        double r898435 = r898433 * r898434;
        double r898436 = sqrt(r898435);
        double r898437 = r898432 * r898436;
        double r898438 = t;
        double r898439 = r898438 * r898438;
        double r898440 = r898439 / r898434;
        double r898441 = exp(r898440);
        double r898442 = r898437 * r898441;
        return r898442;
}

double f(double x, double y, double z, double t) {
        double r898443 = x;
        double r898444 = 0.5;
        double r898445 = r898443 * r898444;
        double r898446 = y;
        double r898447 = r898445 - r898446;
        double r898448 = z;
        double r898449 = 2.0;
        double r898450 = r898448 * r898449;
        double r898451 = sqrt(r898450);
        double r898452 = t;
        double r898453 = r898452 * r898452;
        double r898454 = r898453 / r898449;
        double r898455 = exp(r898454);
        double r898456 = r898451 * r898455;
        double r898457 = r898447 * r898456;
        return r898457;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.3
Target0.3
Herbie0.3
\[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot {\left(e^{1}\right)}^{\left(\frac{t \cdot t}{2}\right)}\]

Derivation

  1. Initial program 0.3

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}\]
  2. Using strategy rm
  3. Applied associate-*l*0.3

    \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)}\]
  4. Final simplification0.3

    \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)\]

Reproduce

herbie shell --seed 2020018 +o rules:numerics
(FPCore (x y z t)
  :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
  :precision binary64

  :herbie-target
  (* (* (- (* x 0.5) y) (sqrt (* z 2))) (pow (exp 1) (/ (* t t) 2)))

  (* (* (- (* x 0.5) y) (sqrt (* z 2))) (exp (/ (* t t) 2))))