?

Average Accuracy: 99.5% → 99.5%
Time: 17.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(e^{t}\right)}^{t} \cdot \left(z + 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
 (* (- (* x 0.5) y) (sqrt (* (pow (exp t) t) (+ z 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 ((x * 0.5) - y) * sqrt((pow(exp(t), t) * (z + z)));
}
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(((exp(t) ** t) * (z + z)))
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((Math.pow(Math.exp(t), t) * (z + z)));
}
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((math.pow(math.exp(t), t) * (z + z)))
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((exp(t) ^ t) * Float64(z + z))))
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(((exp(t) ^ t) * (z + z)));
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[Power[N[Exp[t], $MachinePrecision], t], $MachinePrecision] * N[(z + z), $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(e^{t}\right)}^{t} \cdot \left(z + z\right)}

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 \sqrt{e^{t \cdot 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)} \]

    exp-sqrt [=>]99.5

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

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

    [Start]99.5

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

    add-log-exp [=>]6.9

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

    *-un-lft-identity [=>]6.9

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

    log-prod [=>]6.9

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

    metadata-eval [=>]6.9

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

    add-log-exp [<=]99.5

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

    sqrt-unprod [=>]99.5

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

    associate-*l* [=>]99.5

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

    exp-prod [=>]99.5

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

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

    [Start]99.5

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

    +-lft-identity [=>]99.5

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

    associate-*r* [=>]99.5

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

    *-commutative [=>]99.5

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

    *-commutative [=>]99.5

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

    count-2 [<=]99.5

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

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

Alternatives

Alternative 1
Accuracy99.5%
Cost13760
\[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
Alternative 2
Accuracy99.5%
Cost13632
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \]
Alternative 3
Accuracy98.7%
Cost7488
\[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \left(1 + 0.5 \cdot \left(t \cdot t\right)\right) \]
Alternative 4
Accuracy98.7%
Cost7360
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z + z \cdot \left(t \cdot t\right)\right)} \]
Alternative 5
Accuracy54.5%
Cost7113
\[\begin{array}{l} \mathbf{if}\;x \leq -2.25 \cdot 10^{-184} \lor \neg \left(x \leq 7.5 \cdot 10^{-122}\right):\\ \;\;\;\;\left(x \cdot 0.5\right) \cdot \sqrt{z \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{y \cdot \left(2 \cdot \left(y \cdot z\right)\right)}\\ \end{array} \]
Alternative 6
Accuracy18.7%
Cost6980
\[\begin{array}{l} \mathbf{if}\;x \leq 8.8 \cdot 10^{-119}:\\ \;\;\;\;z \cdot \left(x + y \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 \cdot \left(x \cdot \left(x \cdot z\right)\right)}\\ \end{array} \]
Alternative 7
Accuracy26.2%
Cost6980
\[\begin{array}{l} \mathbf{if}\;x \leq 7.2 \cdot 10^{-120}:\\ \;\;\;\;\sqrt{y \cdot \left(2 \cdot \left(y \cdot z\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 \cdot \left(x \cdot \left(x \cdot z\right)\right)}\\ \end{array} \]
Alternative 8
Accuracy98.2%
Cost6976
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{z + z} \]
Alternative 9
Accuracy7.4%
Cost448
\[z \cdot \left(x + y \cdot -2\right) \]

Error

Reproduce?

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