Average Error: 0.3 → 0.3
Time: 9.5s
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 r826687 = x;
        double r826688 = 0.5;
        double r826689 = r826687 * r826688;
        double r826690 = y;
        double r826691 = r826689 - r826690;
        double r826692 = z;
        double r826693 = 2.0;
        double r826694 = r826692 * r826693;
        double r826695 = sqrt(r826694);
        double r826696 = r826691 * r826695;
        double r826697 = t;
        double r826698 = r826697 * r826697;
        double r826699 = r826698 / r826693;
        double r826700 = exp(r826699);
        double r826701 = r826696 * r826700;
        return r826701;
}

double f(double x, double y, double z, double t) {
        double r826702 = x;
        double r826703 = 0.5;
        double r826704 = r826702 * r826703;
        double r826705 = y;
        double r826706 = r826704 - r826705;
        double r826707 = z;
        double r826708 = 2.0;
        double r826709 = r826707 * r826708;
        double r826710 = sqrt(r826709);
        double r826711 = t;
        double r826712 = r826711 * r826711;
        double r826713 = r826712 / r826708;
        double r826714 = exp(r826713);
        double r826715 = r826710 * r826714;
        double r826716 = r826706 * r826715;
        return r826716;
}

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