?

Average Accuracy: 99.5% → 99.5%
Time: 18.5s
Precision: binary64
Cost: 19968

?

\[\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 \sqrt{\left(z \cdot 2\right) \cdot {\left(e^{t}\right)}^{t}} \]
(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) (pow (exp t) t)))))
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) * pow(exp(t), t)));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = ((x * 0.5d0) - y) * sqrt(((z * 2.0d0) * (exp(t) ** t)))
end function
public static double code(double x, double y, double z, double t) {
	return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
public static double code(double x, double y, double z, double t) {
	return ((x * 0.5) - y) * Math.sqrt(((z * 2.0) * Math.pow(Math.exp(t), t)));
}
def code(x, y, z, t):
	return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
def code(x, y, z, t):
	return ((x * 0.5) - y) * math.sqrt(((z * 2.0) * math.pow(math.exp(t), t)))
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0)))
end
function code(x, y, z, t)
	return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * (exp(t) ^ t))))
end
function tmp = code(x, y, z, t)
	tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
end
function tmp = code(x, y, z, t)
	tmp = ((x * 0.5) - y) * sqrt(((z * 2.0) * (exp(t) ^ t)));
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Power[N[Exp[t], $MachinePrecision], t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\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 \sqrt{\left(z \cdot 2\right) \cdot {\left(e^{t}\right)}^{t}}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original99.5%
Target99.5%
Herbie99.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 99.5%

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

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

    [Start]99.5

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

    associate-*l* [=>]99.5

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

    associate-*l/ [<=]99.5

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

    exp-prod [=>]99.5

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

    exp-sqrt [=>]99.5

    \[ \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot {\color{blue}{\left(\sqrt{e^{t}}\right)}}^{t}\right) \]
  3. Applied egg-rr99.5%

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

    [Start]99.5

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

    add-sqr-sqrt [=>]99.0

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

    sqrt-unprod [=>]99.5

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

    swap-sqr [=>]99.5

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

    add-sqr-sqrt [<=]99.5

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

    pow-prod-down [=>]99.5

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

    add-sqr-sqrt [<=]99.5

    \[ \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot {\color{blue}{\left(e^{t}\right)}}^{t}} \]
  4. Final simplification99.5%

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

Alternatives

Alternative 1
Accuracy99.5%
Cost13632
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot e^{t \cdot t}} \]
Alternative 2
Accuracy98.6%
Cost13568
\[\left(x \cdot 0.5 - y\right) \cdot \left(\mathsf{hypot}\left(1, t\right) \cdot \sqrt{z \cdot 2}\right) \]
Alternative 3
Accuracy98.6%
Cost7360
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot \left(2 + 2 \cdot \left(t \cdot t\right)\right)} \]
Alternative 4
Accuracy72.6%
Cost7113
\[\begin{array}{l} t_1 := \sqrt{z \cdot 2}\\ \mathbf{if}\;y \leq -4.2 \cdot 10^{+73} \lor \neg \left(y \leq 3.8 \cdot 10^{-26}\right):\\ \;\;\;\;\frac{t_1}{\frac{-1}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(x \cdot 0.5\right)\\ \end{array} \]
Alternative 5
Accuracy23.5%
Cost6980
\[\begin{array}{l} \mathbf{if}\;y \leq -2.05 \cdot 10^{-151}:\\ \;\;\;\;\sqrt{y \cdot \left(y \cdot \left(z \cdot 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)}\\ \end{array} \]
Alternative 6
Accuracy26.3%
Cost6980
\[\begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-137}:\\ \;\;\;\;\sqrt{y \cdot \left(y \cdot \left(z \cdot 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 \cdot \left(x \cdot \left(x \cdot z\right)\right)}\\ \end{array} \]
Alternative 7
Accuracy52.4%
Cost6980
\[\begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+76}:\\ \;\;\;\;\sqrt{y \cdot \left(y \cdot \left(z \cdot 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5\right)\\ \end{array} \]
Alternative 8
Accuracy98.1%
Cost6976
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{z + z} \]
Alternative 9
Accuracy17.0%
Cost6848
\[\sqrt{y \cdot \left(y \cdot \left(z \cdot 2\right)\right)} \]
Alternative 10
Accuracy3.9%
Cost64
\[0 \]

Error

Reproduce?

herbie shell --seed 2023137 
(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))))