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

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
    (*.f64 (-.f64 (*.f64 x 1/2) y) (*.f64 (sqrt.f64 (*.f64 z 2)) (pow.f64 (sqrt.f64 (exp.f64 t)) t))): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (*.f64 x 1/2) y) (*.f64 (sqrt.f64 (*.f64 z 2)) (pow.f64 (Rewrite<= exp-sqrt_binary64 (exp.f64 (/.f64 t 2))) t))): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (*.f64 x 1/2) y) (*.f64 (sqrt.f64 (*.f64 z 2)) (Rewrite<= exp-prod_binary64 (exp.f64 (*.f64 (/.f64 t 2) t))))): 1 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (*.f64 x 1/2) y) (*.f64 (sqrt.f64 (*.f64 z 2)) (exp.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 t t) 2))))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (-.f64 (*.f64 x 1/2) y) (sqrt.f64 (*.f64 z 2))) (exp.f64 (/.f64 (*.f64 t t) 2)))): 1 points increase in error, 1 points decrease in error
  3. Applied egg-rr1.4

    \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{{\left(\sqrt[3]{\sqrt{\left(z + z\right) \cdot e^{t \cdot t}}}\right)}^{3}} \]
  4. Applied egg-rr0.3

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

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

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

Alternatives

Alternative 1
Error0.3
Cost20224
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z + z\right) \cdot {\left(e^{t + t}\right)}^{\left(0.5 \cdot t\right)}} \]
Alternative 2
Error0.3
Cost19968
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z + z\right) \cdot {\left(e^{t}\right)}^{t}} \]
Alternative 3
Error0.3
Cost13632
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \]
Alternative 4
Error31.6
Cost7368
\[\begin{array}{l} t_1 := y \cdot \left(-\sqrt{z \cdot 2}\right)\\ \mathbf{if}\;x \cdot 0.5 \leq 4 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot 0.5 \leq 2 \cdot 10^{+101}:\\ \;\;\;\;\sqrt{z \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error54.0
Cost7108
\[\begin{array}{l} \mathbf{if}\;x \cdot 0.5 \leq 5 \cdot 10^{-119}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \left(z + z\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)}\\ \end{array} \]
Alternative 6
Error50.9
Cost6980
\[\begin{array}{l} \mathbf{if}\;y \leq -3.5367909495759996 \cdot 10^{-94}:\\ \;\;\;\;\sqrt{z \cdot \left(y \cdot \left(y \cdot 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)}\\ \end{array} \]
Alternative 7
Error1.2
Cost6976
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2} \]
Alternative 8
Error59.2
Cost576
\[\left(x \cdot 0.5 - y\right) \cdot \left(z + z\right) \]

Error

Reproduce

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