Average Error: 0.3 → 0.4
Time: 12.9s
Precision: binary64
Cost: 32896
\[\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 \sqrt{\sqrt{{\left(e^{t}\right)}^{\left(t + t\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 (* z 2.0))) (sqrt (sqrt (pow (exp t) (+ 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))) * sqrt(sqrt(pow(exp(t), (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))) * sqrt(sqrt((exp(t) ** (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.sqrt(Math.sqrt(Math.pow(Math.exp(t), (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.sqrt(math.sqrt(math.pow(math.exp(t), (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(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * sqrt(sqrt((exp(t) ^ Float64(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))) * sqrt(sqrt((exp(t) ^ (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[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Sqrt[N[Power[N[Exp[t], $MachinePrecision], N[(t + t), $MachinePrecision]], $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(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \sqrt{\sqrt{{\left(e^{t}\right)}^{\left(t + t\right)}}}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.3
Target0.3
Herbie0.4
\[\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(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \sqrt{e^{t \cdot t}}} \]
    Proof
    (*.f64 (*.f64 (-.f64 (*.f64 x 1/2) y) (sqrt.f64 (*.f64 z 2))) (sqrt.f64 (exp.f64 (*.f64 t t)))): 0 points increase in error, 0 points decrease in error
    (*.f64 (*.f64 (-.f64 (*.f64 x 1/2) y) (sqrt.f64 (*.f64 z 2))) (Rewrite<= exp-sqrt_binary64 (exp.f64 (/.f64 (*.f64 t t) 2)))): 1 points increase in error, 2 points decrease in error
  3. Applied egg-rr0.4

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

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

Alternatives

Alternative 1
Error0.3
Cost20416
\[\begin{array}{l} t_1 := \sqrt{z + z}\\ \left(\left(x \cdot 0.5\right) \cdot t_1 - y \cdot t_1\right) \cdot e^{\frac{t \cdot t}{2}} \end{array} \]
Alternative 2
Error0.3
Cost13632
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z \cdot e^{t \cdot t}\right)} \]
Alternative 3
Error0.8
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
Error17.9
Cost7376
\[\begin{array}{l} t_1 := \left(x \cdot 0.5\right) \cdot \sqrt{z \cdot 2}\\ t_2 := y \cdot \left(-\sqrt{z + z}\right)\\ \mathbf{if}\;y \leq -5.4 \cdot 10^{-18}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-152}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-66}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error0.8
Cost7360
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z + z \cdot \left(t \cdot t\right)\right)} \]
Alternative 6
Error1.1
Cost6976
\[\sqrt{z + z} \cdot \left(x \cdot 0.5 - y\right) \]
Alternative 7
Error53.1
Cost6848
\[\sqrt{0.5 \cdot \left(x \cdot \left(x \cdot z\right)\right)} \]
Alternative 8
Error32.0
Cost6848
\[\left(x \cdot 0.5\right) \cdot \sqrt{z \cdot 2} \]
Alternative 9
Error61.5
Cost64
\[0 \]

Error

Reproduce

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