?

Average Error: 0.3 → 0.3
Time: 15.3s
Precision: binary64
Cost: 20096

?

\[\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 \left({\left(e^{0.5 \cdot t}\right)}^{t} \cdot \sqrt{z \cdot 2}\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) (* (pow (exp (* 0.5 t)) t) (sqrt (* z 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) * (pow(exp((0.5 * t)), t) * sqrt((z * 2.0)));
}
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) * ((exp((0.5d0 * t)) ** t) * sqrt((z * 2.0d0)))
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.pow(Math.exp((0.5 * t)), t) * Math.sqrt((z * 2.0)));
}
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.pow(math.exp((0.5 * t)), t) * math.sqrt((z * 2.0)))
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) * Float64((exp(Float64(0.5 * t)) ^ t) * sqrt(Float64(z * 2.0))))
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) * ((exp((0.5 * t)) ^ t) * sqrt((z * 2.0)));
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[(N[Power[N[Exp[N[(0.5 * t), $MachinePrecision]], $MachinePrecision], t], $MachinePrecision] * N[Sqrt[N[(z * 2.0), $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 \left({\left(e^{0.5 \cdot t}\right)}^{t} \cdot \sqrt{z \cdot 2}\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.3
Target0.3
Herbie0.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)} \]

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. Simplified0.3

    \[\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]0.3

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

    associate-*l* [=>]0.3

    \[ \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/ [<=]0.3

    \[ \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 [=>]0.3

    \[ \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 [=>]0.3

    \[ \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-rr0.3

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

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

Alternatives

Alternative 1
Error0.3
Cost13760
\[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
Alternative 2
Error0.3
Cost13632
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot e^{t \cdot t}} \]
Alternative 3
Error0.9
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
Error29.9
Cost7378
\[\begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{-216} \lor \neg \left(y \leq 5.8 \cdot 10^{-130}\right) \land \left(y \leq 1.15 \cdot 10^{-77} \lor \neg \left(y \leq 2.2 \cdot 10^{-54}\right)\right):\\ \;\;\;\;y \cdot \left(-\sqrt{z \cdot 2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)}\\ \end{array} \]
Alternative 5
Error17.2
Cost7378
\[\begin{array}{l} t_1 := \sqrt{z \cdot 2}\\ \mathbf{if}\;x \leq -1.08 \cdot 10^{-83} \lor \neg \left(x \leq 2.3 \cdot 10^{-66}\right) \land \left(x \leq 2.35 \cdot 10^{+33} \lor \neg \left(x \leq 5.8 \cdot 10^{+62}\right)\right):\\ \;\;\;\;t_1 \cdot \left(x \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-t_1\right)\\ \end{array} \]
Alternative 6
Error0.9
Cost7360
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z + z \cdot \left(t \cdot t\right)\right)} \]
Alternative 7
Error28.8
Cost7244
\[\begin{array}{l} t_1 := y \cdot \left(-\sqrt{z \cdot 2}\right)\\ \mathbf{if}\;x \leq 2 \cdot 10^{-44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+40}:\\ \;\;\;\;\sqrt{z \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)}\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot \left(0.5 \cdot \left(x \cdot z\right)\right)}\\ \end{array} \]
Alternative 8
Error1.3
Cost6976
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2} \]
Alternative 9
Error30.9
Cost6784
\[y \cdot \left(-\sqrt{z \cdot 2}\right) \]
Alternative 10
Error61.9
Cost6720
\[y \cdot \sqrt{z \cdot 2} \]

Error

Reproduce?

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