Average Error: 0.3 → 0.5
Time: 6.4s
Precision: binary64
\[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}\]
\[\left(\sqrt{z} \cdot \left(x \cdot 0.5 - y\right)\right) \cdot \left({\left(e^{\frac{t}{2}}\right)}^{t} \cdot \sqrt{2}\right)\]
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\left(\sqrt{z} \cdot \left(x \cdot 0.5 - y\right)\right) \cdot \left({\left(e^{\frac{t}{2}}\right)}^{t} \cdot \sqrt{2}\right)
(FPCore (x y z t)
 :precision binary64
 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
(FPCore (x y z t)
 :precision binary64
 (* (* (sqrt z) (- (* x 0.5) y)) (* (pow (exp (/ t 2.0)) t) (sqrt 2.0))))
double code(double x, double y, double z, double t) {
	return ((double) (((double) (((double) (((double) (x * 0.5)) - y)) * ((double) sqrt(((double) (z * 2.0)))))) * ((double) exp((((double) (t * t)) / 2.0)))));
}
double code(double x, double y, double z, double t) {
	return ((double) (((double) (((double) sqrt(z)) * ((double) (((double) (x * 0.5)) - y)))) * ((double) (((double) pow(((double) exp((t / 2.0))), t)) * ((double) sqrt(2.0))))));
}

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.5
\[\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. Simplified0.3

    \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot {\left(e^{\frac{t}{2}}\right)}^{t}\right)}\]
  3. Using strategy rm
  4. Applied sqrt-prod0.5

    \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{2}\right)} \cdot {\left(e^{\frac{t}{2}}\right)}^{t}\right)\]
  5. Applied associate-*l*0.5

    \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z} \cdot \left(\sqrt{2} \cdot {\left(e^{\frac{t}{2}}\right)}^{t}\right)\right)}\]
  6. Simplified0.5

    \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z} \cdot \color{blue}{\left({\left(e^{\frac{t}{2}}\right)}^{t} \cdot \sqrt{2}\right)}\right)\]
  7. Using strategy rm
  8. Applied associate-*r*0.5

    \[\leadsto \color{blue}{\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z}\right) \cdot \left({\left(e^{\frac{t}{2}}\right)}^{t} \cdot \sqrt{2}\right)}\]
  9. Simplified0.5

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

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

Reproduce

herbie shell --seed 2020198 
(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.0))) (pow (exp 1.0) (/ (* t t) 2.0)))

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