Average Error: 0.3 → 0.5
Time: 7.6s
Precision: 64
\[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}\]
\[\left(\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)\right) \cdot \left(\sqrt{e^{\frac{t \cdot t}{2}}} \cdot \sqrt{{\left(e^{\frac{t}{\sqrt{2}}}\right)}^{\left(\frac{t}{\sqrt{2}}\right)}}\right)\]
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\left(\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)\right) \cdot \left(\sqrt{e^{\frac{t \cdot t}{2}}} \cdot \sqrt{{\left(e^{\frac{t}{\sqrt{2}}}\right)}^{\left(\frac{t}{\sqrt{2}}\right)}}\right)
double code(double x, double y, double z, double t) {
	return ((((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)));
}
double code(double x, double y, double z, double t) {
	return ((((x * 0.5) - y) * (sqrt(z) * sqrt(2.0))) * (sqrt(exp(((t * t) / 2.0))) * sqrt(pow(exp((t / sqrt(2.0))), (t / 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. Using strategy rm
  3. Applied sqrt-prod0.5

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

    \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)\right) \cdot \color{blue}{\left(\sqrt{e^{\frac{t \cdot t}{2}}} \cdot \sqrt{e^{\frac{t \cdot t}{2}}}\right)}\]
  6. Using strategy rm
  7. Applied add-sqr-sqrt0.5

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

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

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

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

Reproduce

herbie shell --seed 2020058 +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))))