Average Error: 0.3 → 0.3
Time: 16.5s
Precision: binary64
Cost: 20416
\[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
\[\begin{array}{l} t_1 := \sqrt{z + z}\\ \left(\left(x \cdot 0.5\right) \cdot t_1 - t_1 \cdot y\right) \cdot e^{\frac{t \cdot t}{2}} \end{array} \]
(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
 (let* ((t_1 (sqrt (+ z z))))
   (* (- (* (* x 0.5) t_1) (* t_1 y)) (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) {
	double t_1 = sqrt((z + z));
	return (((x * 0.5) * t_1) - (t_1 * y)) * exp(((t * t) / 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
    real(8) :: t_1
    t_1 = sqrt((z + z))
    code = (((x * 0.5d0) * t_1) - (t_1 * y)) * exp(((t * t) / 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) {
	double t_1 = Math.sqrt((z + z));
	return (((x * 0.5) * t_1) - (t_1 * y)) * Math.exp(((t * t) / 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):
	t_1 = math.sqrt((z + z))
	return (((x * 0.5) * t_1) - (t_1 * y)) * math.exp(((t * t) / 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)
	t_1 = sqrt(Float64(z + z))
	return Float64(Float64(Float64(Float64(x * 0.5) * t_1) - Float64(t_1 * y)) * exp(Float64(Float64(t * t) / 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)
	t_1 = sqrt((z + z));
	tmp = (((x * 0.5) * t_1) - (t_1 * y)) * exp(((t * t) / 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_] := Block[{t$95$1 = N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision]}, N[(N[(N[(N[(x * 0.5), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(t$95$1 * y), $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\begin{array}{l}
t_1 := \sqrt{z + z}\\
\left(\left(x \cdot 0.5\right) \cdot t_1 - t_1 \cdot y\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}

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. Applied egg-rr0.3

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

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

Alternatives

Alternative 1
Error0.3
Cost13760
\[e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \]
Alternative 2
Error0.3
Cost13632
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \]
Alternative 3
Error0.9
Cost7872
\[\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \left(1 + \left(t \cdot t\right) \cdot \left(0.5 + t \cdot \left(t \cdot 0.16666666666666666\right)\right)\right)\right) \]
Alternative 4
Error0.9
Cost7488
\[\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \left(1 + t \cdot \left(0.5 \cdot t\right)\right)\right) \]
Alternative 5
Error17.3
Cost7048
\[\begin{array}{l} t_1 := y \cdot \left(-\sqrt{z \cdot 2}\right)\\ \mathbf{if}\;y \leq -1.789438372534507 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 76549734856.34467:\\ \;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error1.3
Cost6976
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2} \]
Alternative 7
Error31.5
Cost6720
\[x \cdot \sqrt{0.5 \cdot z} \]
Alternative 8
Error59.2
Cost576
\[\left(z + z\right) \cdot \left(x \cdot 0.5 - y\right) \]

Error

Reproduce

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