\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}{\left(\sqrt{e^{t}}\right)}^{t} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\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 (* (pow (sqrt (exp t)) t) (* (- (* x 0.5) y) (sqrt (* 2.0 z)))))
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 pow(sqrt(exp(t)), t) * (((x * 0.5) - y) * sqrt(2.0 * z));
}









Bits error versus x









Bits error versus y









Bits error versus z









Bits error versus t
Results
| Original | 0.3 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 13760 |
| Alternative 2 | |
|---|---|
| Error | 0.9 |
| Cost | 7488 |
| Alternative 3 | |
|---|---|
| Error | 1.3 |
| Cost | 6976 |
| Alternative 4 | |
|---|---|
| Error | 61.3 |
| Cost | 64 |
| Alternative 5 | |
|---|---|
| Error | 61.7 |
| Cost | 64 |

Initial program 0.3
Simplified0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2021044
(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))))