Average Error: 0.3 → 0.3
Time: 12.2s
Precision: binary64
Cost: 13760
\[\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 \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}\]
\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 \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}(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
(* (* (- (* 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 * 2.0)) * exp((t * t) / 2.0);
}
↓
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt(z * 2.0)) * exp((t * t) / 2.0);
}
Try it out
Enter valid numbers for all inputs
Target
| Original | 0.3 |
|---|
| Target | 0.3 |
|---|
| Herbie | 0.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)}\]
Alternatives
| Alternative 1 |
|---|
| Error | 1.4 |
|---|
| Cost | 47040 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}} \cdot \left(\sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}} \cdot \sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}}\right)\right)\]
| Alternative 2 |
|---|
| Error | 32.2 |
|---|
| Cost | 46400 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\left(\sqrt{\sqrt{z \cdot 2}} \cdot \sqrt{x \cdot 0.5 - y}\right) \cdot \left(\sqrt{\sqrt{z \cdot 2}} \cdot \sqrt{x \cdot 0.5 - y}\right)\right)\]
| Alternative 3 |
|---|
| Error | 1.4 |
|---|
| Cost | 46272 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt[3]{\sqrt{z \cdot 2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt[3]{\sqrt{z \cdot 2}} \cdot \sqrt[3]{\sqrt{z \cdot 2}}\right)\right)\right)\]
| Alternative 4 |
|---|
| Error | 0.3 |
|---|
| Cost | 45952 |
|---|
\[\left(\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \sqrt{{\left(\sqrt{e^{t}}\right)}^{t}}\right) \cdot \sqrt{e^{\frac{t \cdot t}{2}}}\]
| Alternative 5 |
|---|
| Error | 0.6 |
|---|
| Cost | 39488 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z}\right)\right)\right)\]
| Alternative 6 |
|---|
| Error | 31.4 |
|---|
| Cost | 39296 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot \left(\left(-y \cdot \sqrt{z}\right) \cdot \sqrt{\sqrt{2}}\right)\right)\]
| Alternative 7 |
|---|
| Error | 0.6 |
|---|
| Cost | 34048 |
|---|
\[\sqrt{e^{\frac{t \cdot t}{2}}} \cdot \left(\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \sqrt{{\left(0.5 \cdot t + \left(1 + \left(t \cdot t\right) \cdot \left(0.125 + t \cdot 0.020833333333333332\right)\right)\right)}^{t}}\right)\]
| Alternative 8 |
|---|
| Error | 1.4 |
|---|
| Cost | 33728 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\left(\sqrt[3]{x \cdot 0.5 - y} \cdot \sqrt[3]{x \cdot 0.5 - y}\right) \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt[3]{x \cdot 0.5 - y}\right)\right)\]
| Alternative 9 |
|---|
| Error | 31.8 |
|---|
| Cost | 33600 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}} \cdot \sqrt{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}}\right)\]
| Alternative 10 |
|---|
| Error | 32.1 |
|---|
| Cost | 33344 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{2} \cdot \left(\sqrt{x \cdot 0.5 - y} \cdot \left(\sqrt{z} \cdot \sqrt{x \cdot 0.5 - y}\right)\right)\right)\]
| Alternative 11 |
|---|
| Error | 0.6 |
|---|
| Cost | 33216 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{\sqrt{z \cdot 2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{\sqrt{z \cdot 2}}\right)\right)\]
| Alternative 12 |
|---|
| Error | 0.4 |
|---|
| Cost | 33088 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot \sqrt{2}}\right)\right)\]
| Alternative 13 |
|---|
| Error | 31.5 |
|---|
| Cost | 32960 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot \left(0.5 \cdot \left(x \cdot \sqrt{z \cdot \sqrt{2}}\right)\right)\right)\]
| Alternative 14 |
|---|
| Error | 31.3 |
|---|
| Cost | 32896 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot \left(-y \cdot \sqrt{z \cdot \sqrt{2}}\right)\right)\]
| Alternative 15 |
|---|
| Error | 42.4 |
|---|
| Cost | 27840 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \frac{\sqrt{z \cdot 2} \cdot \left({\left(x \cdot 0.5\right)}^{3} - {y}^{3}\right)}{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) + \left(y \cdot y + \left(x \cdot 0.5\right) \cdot y\right)}\]
| Alternative 16 |
|---|
| Error | 32.1 |
|---|
| Cost | 26944 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{x \cdot 0.5 - y} \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{x \cdot 0.5 - y}\right)\right)\]
| Alternative 17 |
|---|
| Error | 38.3 |
|---|
| Cost | 26624 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \sqrt[3]{{\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right)}^{3}}\]
| Alternative 18 |
|---|
| Error | 1.0 |
|---|
| Cost | 20800 |
|---|
\[\sqrt{z} \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \left(0.5 + \left(t \cdot t\right) \cdot 0.25\right) - \sqrt{2} \cdot \left(y + 0.5 \cdot \left(y \cdot \left(t \cdot t\right)\right)\right)\right)\]
| Alternative 19 |
|---|
| Error | 31.2 |
|---|
| Cost | 20800 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \frac{\sqrt{2} \cdot \left(\sqrt{z} \cdot \left(x \cdot \left(x \cdot 0.25\right) - y \cdot y\right)\right)}{x \cdot 0.5 + y}\]
| Alternative 20 |
|---|
| Error | 0.5 |
|---|
| Cost | 20160 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)\right)\]
| Alternative 21 |
|---|
| Error | 0.5 |
|---|
| Cost | 20160 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z}\right)\right)\]
| Alternative 22 |
|---|
| Error | 31.6 |
|---|
| Cost | 20032 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(\sqrt{z} \cdot \left(x \cdot \sqrt{2}\right)\right)\right)\]
| Alternative 23 |
|---|
| Error | 31.4 |
|---|
| Cost | 19968 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(-\sqrt{z} \cdot \left(y \cdot \sqrt{2}\right)\right)\]
| Alternative 24 |
|---|
| Error | 31.4 |
|---|
| Cost | 19968 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \left(-y \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)\right)\]
| Alternative 25 |
|---|
| Error | 31.1 |
|---|
| Cost | 14400 |
|---|
\[e^{\frac{t \cdot t}{2}} \cdot \frac{\sqrt{z \cdot 2} \cdot \left(x \cdot \left(x \cdot 0.25\right) - y \cdot y\right)}{x \cdot 0.5 + y}\]
| Alternative 26 |
|---|
| Error | 1.3 |
|---|
| Cost | 13376 |
|---|
\[\sqrt{2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z}\right)\]
| Alternative 27 |
|---|
| Error | 61.7 |
|---|
| Cost | 64 |
|---|
\[1\]
| Alternative 28 |
|---|
| Error | 61.5 |
|---|
| Cost | 64 |
|---|
\[0\]
| Alternative 29 |
|---|
| Error | 61.8 |
|---|
| Cost | 64 |
|---|
\[-1\]
Error

Derivation
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}}\]
Simplified0.3
\[\leadsto \color{blue}{\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}}\]
Final simplification0.3
\[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}\]
Reproduce
herbie shell --seed 2021042
(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))))