?

Average Error: 0.3 → 0.3
Time: 31.7s
Precision: binary64
Cost: 13760

?

\[\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(\sqrt{z \cdot 2} \cdot e^{t \cdot \frac{t}{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) (* (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))) * 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))));
}
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)) * 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) {
	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.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))))
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(sqrt(Float64(z * 2.0)) * exp(Float64(t * Float64(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)
	tmp = ((x * 0.5) - y) * (sqrt((z * 2.0)) * 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_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(t * N[(t / 2.0), $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 \left(\sqrt{z \cdot 2} \cdot e^{t \cdot \frac{t}{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 e^{t \cdot \frac{t}{2}}\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}} \]

    rational.json-simplify-2 [=>]0.3

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

    rational.json-simplify-43 [=>]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)} \]

    rational.json-simplify-49 [=>]0.3

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

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

Alternatives

Alternative 1
Error1.1
Cost13956
\[\begin{array}{l} t_1 := \sqrt{z \cdot 2}\\ t_2 := 0.5 \cdot \left(x \cdot t_1\right)\\ \mathbf{if}\;t \cdot t \leq 5.5 \cdot 10^{-16}:\\ \;\;\;\;\left(-y\right) \cdot t_1 + t_2\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot e^{\frac{t \cdot t}{2}}\\ \end{array} \]
Alternative 2
Error1.2
Cost13892
\[\begin{array}{l} \mathbf{if}\;t \cdot t \leq 5.5 \cdot 10^{-16}:\\ \;\;\;\;\frac{\left(x + \left(x - y \cdot 4\right)\right) \cdot \sqrt{z + z}}{4}\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \left(x \cdot \sqrt{z \cdot 2}\right)\right) \cdot e^{\frac{t \cdot t}{2}}\\ \end{array} \]
Alternative 3
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 4
Error19.0
Cost7640
\[\begin{array}{l} t_1 := \sqrt{z \cdot 2}\\ t_2 := 0.5 \cdot \left(x \cdot t_1\right)\\ t_3 := \left(-y\right) \cdot t_1\\ \mathbf{if}\;y \leq -7.8 \cdot 10^{+96}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -2.05 \cdot 10^{-45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{-94}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+94}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+123}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error1.3
Cost7232
\[\frac{\left(x + \left(x - y \cdot 4\right)\right) \cdot \sqrt{z + z}}{4} \]
Alternative 6
Error1.2
Cost6976
\[\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2} \]
Alternative 7
Error31.8
Cost6784
\[\left(-y\right) \cdot \sqrt{z \cdot 2} \]

Error

Reproduce?

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