Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A

Percentage Accurate: 99.3% → 99.7%
Time: 22.0s
Alternatives: 11
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\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))))
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
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))
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 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]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 11 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\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))))
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
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))
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 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]
\begin{array}{l}

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

Alternative 1: 99.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right) \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (* (sqrt (* z 2.0)) (* (- (* x 0.5) y) (sqrt (pow (exp t) t)))))
double code(double x, double y, double z, double t) {
	return sqrt((z * 2.0)) * (((x * 0.5) - y) * sqrt(pow(exp(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 = sqrt((z * 2.0d0)) * (((x * 0.5d0) - y) * sqrt((exp(t) ** t)))
end function
public static double code(double x, double y, double z, double t) {
	return Math.sqrt((z * 2.0)) * (((x * 0.5) - y) * Math.sqrt(Math.pow(Math.exp(t), t)));
}
def code(x, y, z, t):
	return math.sqrt((z * 2.0)) * (((x * 0.5) - y) * math.sqrt(math.pow(math.exp(t), t)))
function code(x, y, z, t)
	return Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * sqrt((exp(t) ^ t))))
end
function tmp = code(x, y, z, t)
	tmp = sqrt((z * 2.0)) * (((x * 0.5) - y) * sqrt((exp(t) ^ t)));
end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[Power[N[Exp[t], $MachinePrecision], t], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Step-by-step derivation
    1. *-commutative99.8%

      \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    2. associate-*l*99.8%

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
    3. sqr-neg99.8%

      \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
    4. exp-sqrt99.8%

      \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
    5. sqr-neg99.8%

      \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
    6. exp-prod99.8%

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

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

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

Alternative 2: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z \cdot 2\right)} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (* (- (* x 0.5) y) (sqrt (* (exp (* t t)) (* z 2.0)))))
double code(double x, double y, double z, double t) {
	return ((x * 0.5) - y) * sqrt((exp((t * t)) * (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((exp((t * t)) * (z * 2.0d0)))
end function
public static double code(double x, double y, double z, double t) {
	return ((x * 0.5) - y) * Math.sqrt((Math.exp((t * t)) * (z * 2.0)));
}
def code(x, y, z, t):
	return ((x * 0.5) - y) * math.sqrt((math.exp((t * t)) * (z * 2.0)))
function code(x, y, z, t)
	return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(exp(Float64(t * t)) * Float64(z * 2.0))))
end
function tmp = code(x, y, z, t)
	tmp = ((x * 0.5) - y) * sqrt((exp((t * t)) * (z * 2.0)));
end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision] * N[(z * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z \cdot 2\right)}
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Step-by-step derivation
    1. *-commutative99.8%

      \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    2. associate-*l*99.8%

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
    3. sqr-neg99.8%

      \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
    4. exp-sqrt99.8%

      \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
    5. sqr-neg99.8%

      \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
    6. exp-prod99.8%

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

    \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
  4. Step-by-step derivation
    1. add-cube-cbrt_binary6498.9%

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(\sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}} \cdot \sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}}\right) \cdot \sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}}\right)} \]
  5. Applied rewrite-once98.9%

    \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(\left(\sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}} \cdot \sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}}\right) \cdot \sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}}\right)} \]
  6. Step-by-step derivation
    1. pow298.9%

      \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{{\left(\sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}}\right)}^{2}} \cdot \sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}}\right) \]
    2. pow-plus98.9%

      \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{{\left(\sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}}\right)}^{\left(2 + 1\right)}} \]
    3. metadata-eval98.9%

      \[\leadsto \sqrt{z \cdot 2} \cdot {\left(\sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}}\right)}^{\color{blue}{3}} \]
  7. Applied egg-rr98.9%

    \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{{\left(\sqrt[3]{\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}}\right)}^{3}} \]
  8. Step-by-step derivation
    1. rem-cube-cbrt99.8%

      \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    2. *-commutative99.8%

      \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(\sqrt{{\left(e^{t}\right)}^{t}} \cdot \left(x \cdot 0.5 - y\right)\right)} \]
    3. associate-*r*99.8%

      \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right) \cdot \left(x \cdot 0.5 - y\right)} \]
    4. *-commutative99.8%

      \[\leadsto \color{blue}{\left(\sqrt{{\left(e^{t}\right)}^{t}} \cdot \sqrt{z \cdot 2}\right)} \cdot \left(x \cdot 0.5 - y\right) \]
    5. flip3--35.0%

      \[\leadsto \left(\sqrt{{\left(e^{t}\right)}^{t}} \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{\frac{{\left(x \cdot 0.5\right)}^{3} - {y}^{3}}{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) + \left(y \cdot y + \left(x \cdot 0.5\right) \cdot y\right)}} \]
    6. clear-num35.0%

      \[\leadsto \left(\sqrt{{\left(e^{t}\right)}^{t}} \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{\frac{1}{\frac{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) + \left(y \cdot y + \left(x \cdot 0.5\right) \cdot y\right)}{{\left(x \cdot 0.5\right)}^{3} - {y}^{3}}}} \]
    7. un-div-inv35.0%

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

      \[\leadsto \frac{\color{blue}{\sqrt{{\left(e^{t}\right)}^{t} \cdot \left(z \cdot 2\right)}}}{\frac{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) + \left(y \cdot y + \left(x \cdot 0.5\right) \cdot y\right)}{{\left(x \cdot 0.5\right)}^{3} - {y}^{3}}} \]
    9. clear-num35.0%

      \[\leadsto \frac{\sqrt{{\left(e^{t}\right)}^{t} \cdot \left(z \cdot 2\right)}}{\color{blue}{\frac{1}{\frac{{\left(x \cdot 0.5\right)}^{3} - {y}^{3}}{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) + \left(y \cdot y + \left(x \cdot 0.5\right) \cdot y\right)}}}} \]
    10. flip3--99.7%

      \[\leadsto \frac{\sqrt{{\left(e^{t}\right)}^{t} \cdot \left(z \cdot 2\right)}}{\frac{1}{\color{blue}{x \cdot 0.5 - y}}} \]
  9. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{{\left(e^{t}\right)}^{t} \cdot \left(z \cdot 2\right)}}{\frac{1}{x \cdot 0.5 - y}}} \]
  10. Step-by-step derivation
    1. associate-/r/99.8%

      \[\leadsto \color{blue}{\frac{\sqrt{{\left(e^{t}\right)}^{t} \cdot \left(z \cdot 2\right)}}{1} \cdot \left(x \cdot 0.5 - y\right)} \]
    2. /-rgt-identity99.8%

      \[\leadsto \color{blue}{\sqrt{{\left(e^{t}\right)}^{t} \cdot \left(z \cdot 2\right)}} \cdot \left(x \cdot 0.5 - y\right) \]
    3. exp-prod99.8%

      \[\leadsto \sqrt{\color{blue}{e^{t \cdot t}} \cdot \left(z \cdot 2\right)} \cdot \left(x \cdot 0.5 - y\right) \]
    4. *-commutative99.8%

      \[\leadsto \sqrt{e^{t \cdot t} \cdot \color{blue}{\left(2 \cdot z\right)}} \cdot \left(x \cdot 0.5 - y\right) \]
  11. Simplified99.8%

    \[\leadsto \color{blue}{\sqrt{e^{t \cdot t} \cdot \left(2 \cdot z\right)} \cdot \left(x \cdot 0.5 - y\right)} \]
  12. Final simplification99.8%

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

Alternative 3: 65.2% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ t_2 := \sqrt{z \cdot 2}\\ t_3 := t_2 \cdot y\\ \mathbf{if}\;t \leq 255000000000:\\ \;\;\;\;\frac{t_1}{{\left(z \cdot 2\right)}^{-0.5}}\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{+134}:\\ \;\;\;\;\frac{\left(z \cdot 2\right) \cdot \left(y \cdot \left(-y\right)\right)}{t_3}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+147}:\\ \;\;\;\;t_2 \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \left(-1 - t \cdot \left(0.5 \cdot t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* z 2.0))) (t_3 (* t_2 y)))
   (if (<= t 255000000000.0)
     (/ t_1 (pow (* z 2.0) -0.5))
     (if (<= t 1.16e+134)
       (/ (* (* z 2.0) (* y (- y))) t_3)
       (if (<= t 4e+147) (* t_2 t_1) (* t_3 (- -1.0 (* t (* 0.5 t)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double t_2 = sqrt((z * 2.0));
	double t_3 = t_2 * y;
	double tmp;
	if (t <= 255000000000.0) {
		tmp = t_1 / pow((z * 2.0), -0.5);
	} else if (t <= 1.16e+134) {
		tmp = ((z * 2.0) * (y * -y)) / t_3;
	} else if (t <= 4e+147) {
		tmp = t_2 * t_1;
	} else {
		tmp = t_3 * (-1.0 - (t * (0.5 * t)));
	}
	return tmp;
}
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
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (x * 0.5d0) - y
    t_2 = sqrt((z * 2.0d0))
    t_3 = t_2 * y
    if (t <= 255000000000.0d0) then
        tmp = t_1 / ((z * 2.0d0) ** (-0.5d0))
    else if (t <= 1.16d+134) then
        tmp = ((z * 2.0d0) * (y * -y)) / t_3
    else if (t <= 4d+147) then
        tmp = t_2 * t_1
    else
        tmp = t_3 * ((-1.0d0) - (t * (0.5d0 * t)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double t_2 = Math.sqrt((z * 2.0));
	double t_3 = t_2 * y;
	double tmp;
	if (t <= 255000000000.0) {
		tmp = t_1 / Math.pow((z * 2.0), -0.5);
	} else if (t <= 1.16e+134) {
		tmp = ((z * 2.0) * (y * -y)) / t_3;
	} else if (t <= 4e+147) {
		tmp = t_2 * t_1;
	} else {
		tmp = t_3 * (-1.0 - (t * (0.5 * t)));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	t_2 = math.sqrt((z * 2.0))
	t_3 = t_2 * y
	tmp = 0
	if t <= 255000000000.0:
		tmp = t_1 / math.pow((z * 2.0), -0.5)
	elif t <= 1.16e+134:
		tmp = ((z * 2.0) * (y * -y)) / t_3
	elif t <= 4e+147:
		tmp = t_2 * t_1
	else:
		tmp = t_3 * (-1.0 - (t * (0.5 * t)))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	t_2 = sqrt(Float64(z * 2.0))
	t_3 = Float64(t_2 * y)
	tmp = 0.0
	if (t <= 255000000000.0)
		tmp = Float64(t_1 / (Float64(z * 2.0) ^ -0.5));
	elseif (t <= 1.16e+134)
		tmp = Float64(Float64(Float64(z * 2.0) * Float64(y * Float64(-y))) / t_3);
	elseif (t <= 4e+147)
		tmp = Float64(t_2 * t_1);
	else
		tmp = Float64(t_3 * Float64(-1.0 - Float64(t * Float64(0.5 * t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x * 0.5) - y;
	t_2 = sqrt((z * 2.0));
	t_3 = t_2 * y;
	tmp = 0.0;
	if (t <= 255000000000.0)
		tmp = t_1 / ((z * 2.0) ^ -0.5);
	elseif (t <= 1.16e+134)
		tmp = ((z * 2.0) * (y * -y)) / t_3;
	elseif (t <= 4e+147)
		tmp = t_2 * t_1;
	else
		tmp = t_3 * (-1.0 - (t * (0.5 * t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * y), $MachinePrecision]}, If[LessEqual[t, 255000000000.0], N[(t$95$1 / N[Power[N[(z * 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.16e+134], N[(N[(N[(z * 2.0), $MachinePrecision] * N[(y * (-y)), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[t, 4e+147], N[(t$95$2 * t$95$1), $MachinePrecision], N[(t$95$3 * N[(-1.0 - N[(t * N[(0.5 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{z \cdot 2}\\
t_3 := t_2 \cdot y\\
\mathbf{if}\;t \leq 255000000000:\\
\;\;\;\;\frac{t_1}{{\left(z \cdot 2\right)}^{-0.5}}\\

\mathbf{elif}\;t \leq 1.16 \cdot 10^{+134}:\\
\;\;\;\;\frac{\left(z \cdot 2\right) \cdot \left(y \cdot \left(-y\right)\right)}{t_3}\\

\mathbf{elif}\;t \leq 4 \cdot 10^{+147}:\\
\;\;\;\;t_2 \cdot t_1\\

\mathbf{else}:\\
\;\;\;\;t_3 \cdot \left(-1 - t \cdot \left(0.5 \cdot t\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 2.55e11

    1. Initial program 99.7%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. *-commutative99.7%

        \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. associate-*l*99.7%

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      3. sqr-neg99.7%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
      4. exp-sqrt99.7%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
      5. sqr-neg99.7%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
      6. exp-prod99.8%

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. Taylor expanded in t around 0 70.9%

      \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(0.5 \cdot x - y\right)} \]
    5. Step-by-step derivation
      1. /-rgt-identity70.9%

        \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{1}} \cdot \left(0.5 \cdot x - y\right) \]
      2. *-commutative70.9%

        \[\leadsto \color{blue}{\left(0.5 \cdot x - y\right) \cdot \frac{\sqrt{z \cdot 2}}{1}} \]
      3. clear-num70.8%

        \[\leadsto \left(0.5 \cdot x - y\right) \cdot \color{blue}{\frac{1}{\frac{1}{\sqrt{z \cdot 2}}}} \]
      4. un-div-inv70.8%

        \[\leadsto \color{blue}{\frac{0.5 \cdot x - y}{\frac{1}{\sqrt{z \cdot 2}}}} \]
      5. *-commutative70.8%

        \[\leadsto \frac{\color{blue}{x \cdot 0.5} - y}{\frac{1}{\sqrt{z \cdot 2}}} \]
      6. pow1/270.8%

        \[\leadsto \frac{x \cdot 0.5 - y}{\frac{1}{\color{blue}{{\left(z \cdot 2\right)}^{0.5}}}} \]
      7. pow-flip70.9%

        \[\leadsto \frac{x \cdot 0.5 - y}{\color{blue}{{\left(z \cdot 2\right)}^{\left(-0.5\right)}}} \]
      8. metadata-eval70.9%

        \[\leadsto \frac{x \cdot 0.5 - y}{{\left(z \cdot 2\right)}^{\color{blue}{-0.5}}} \]
    6. Applied egg-rr70.9%

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

    if 2.55e11 < t < 1.16e134

    1. Initial program 100.0%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. associate-*l*100.0%

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      3. sqr-neg100.0%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
      4. exp-sqrt100.0%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
      5. sqr-neg100.0%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
      6. exp-prod100.0%

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. Taylor expanded in t around 0 4.9%

      \[\leadsto \color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)} \]
    5. Taylor expanded in x around 0 3.1%

      \[\leadsto \sqrt{z} \cdot \color{blue}{\left(-1 \cdot \left(y \cdot \sqrt{2}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg3.1%

        \[\leadsto \sqrt{z} \cdot \color{blue}{\left(-y \cdot \sqrt{2}\right)} \]
      2. *-commutative3.1%

        \[\leadsto \sqrt{z} \cdot \left(-\color{blue}{\sqrt{2} \cdot y}\right) \]
      3. distribute-rgt-neg-out3.1%

        \[\leadsto \sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)} \]
    7. Simplified3.1%

      \[\leadsto \sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*r*3.1%

        \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \sqrt{2}\right) \cdot \left(-y\right)} \]
      2. sqrt-prod3.1%

        \[\leadsto \color{blue}{\sqrt{z \cdot 2}} \cdot \left(-y\right) \]
      3. distribute-rgt-neg-out3.1%

        \[\leadsto \color{blue}{-\sqrt{z \cdot 2} \cdot y} \]
      4. remove-double-div3.1%

        \[\leadsto -\sqrt{z \cdot 2} \cdot \color{blue}{\frac{1}{\frac{1}{y}}} \]
      5. div-inv3.1%

        \[\leadsto -\color{blue}{\frac{\sqrt{z \cdot 2}}{\frac{1}{y}}} \]
      6. distribute-frac-neg3.1%

        \[\leadsto \color{blue}{\frac{-\sqrt{z \cdot 2}}{\frac{1}{y}}} \]
      7. neg-sub03.1%

        \[\leadsto \frac{\color{blue}{0 - \sqrt{z \cdot 2}}}{\frac{1}{y}} \]
      8. div-sub3.1%

        \[\leadsto \color{blue}{\frac{0}{\frac{1}{y}} - \frac{\sqrt{z \cdot 2}}{\frac{1}{y}}} \]
      9. div-inv3.1%

        \[\leadsto \frac{0}{\frac{1}{y}} - \color{blue}{\sqrt{z \cdot 2} \cdot \frac{1}{\frac{1}{y}}} \]
      10. remove-double-div3.1%

        \[\leadsto \frac{0}{\frac{1}{y}} - \sqrt{z \cdot 2} \cdot \color{blue}{y} \]
      11. *-commutative3.1%

        \[\leadsto \frac{0}{\frac{1}{y}} - \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
    9. Applied egg-rr3.1%

      \[\leadsto \color{blue}{\frac{0}{\frac{1}{y}} - y \cdot \sqrt{z \cdot 2}} \]
    10. Step-by-step derivation
      1. div03.1%

        \[\leadsto \color{blue}{0} - y \cdot \sqrt{z \cdot 2} \]
      2. sub0-neg3.1%

        \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
      3. distribute-lft-neg-in3.1%

        \[\leadsto \color{blue}{\left(-y\right) \cdot \sqrt{z \cdot 2}} \]
      4. *-commutative3.1%

        \[\leadsto \left(-y\right) \cdot \sqrt{\color{blue}{2 \cdot z}} \]
    11. Simplified3.1%

      \[\leadsto \color{blue}{\left(-y\right) \cdot \sqrt{2 \cdot z}} \]
    12. Step-by-step derivation
      1. distribute-lft-neg-out3.1%

        \[\leadsto \color{blue}{-y \cdot \sqrt{2 \cdot z}} \]
      2. neg-sub03.1%

        \[\leadsto \color{blue}{0 - y \cdot \sqrt{2 \cdot z}} \]
      3. flip--20.8%

        \[\leadsto \color{blue}{\frac{0 \cdot 0 - \left(y \cdot \sqrt{2 \cdot z}\right) \cdot \left(y \cdot \sqrt{2 \cdot z}\right)}{0 + y \cdot \sqrt{2 \cdot z}}} \]
    13. Applied egg-rr20.8%

      \[\leadsto \color{blue}{\frac{0 - {\left(\frac{-1}{y \cdot \sqrt{z \cdot 2}}\right)}^{-2}}{0 + y \cdot \sqrt{z \cdot 2}}} \]
    14. Step-by-step derivation
      1. Simplified29.9%

        \[\leadsto \color{blue}{\frac{-\left(y \cdot y\right) \cdot \left(2 \cdot z\right)}{y \cdot \sqrt{2 \cdot z}}} \]

      if 1.16e134 < t < 3.9999999999999999e147

      1. Initial program 100.0%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative100.0%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
        2. associate-*l*100.0%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
        3. sqr-neg100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
        4. exp-sqrt100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
        5. sqr-neg100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
        6. exp-prod100.0%

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
      4. Taylor expanded in t around 0 44.4%

        \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(0.5 \cdot x - y\right)} \]

      if 3.9999999999999999e147 < t

      1. Initial program 100.0%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative100.0%

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

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

          \[\leadsto \left(\sqrt{z \cdot 2} \cdot \color{blue}{\frac{1}{\frac{x \cdot 0.5 + y}{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) - y \cdot y}}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
        4. un-div-inv84.8%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{\frac{x \cdot 0.5 + y}{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) - y \cdot y}}} \cdot e^{\frac{t \cdot t}{2}} \]
        5. clear-num84.8%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\color{blue}{\frac{1}{\frac{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) - y \cdot y}{x \cdot 0.5 + y}}}} \cdot e^{\frac{t \cdot t}{2}} \]
        6. flip--100.0%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{1}{\color{blue}{x \cdot 0.5 - y}}} \cdot e^{\frac{t \cdot t}{2}} \]
      3. Applied egg-rr100.0%

        \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{\frac{1}{x \cdot 0.5 - y}}} \cdot e^{\frac{t \cdot t}{2}} \]
      4. Taylor expanded in x around 0 78.8%

        \[\leadsto \frac{\sqrt{z \cdot 2}}{\color{blue}{\frac{-1}{y}}} \cdot e^{\frac{t \cdot t}{2}} \]
      5. Taylor expanded in t around 0 76.0%

        \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \color{blue}{\left(1 + 0.5 \cdot {t}^{2}\right)} \]
      6. Step-by-step derivation
        1. *-commutative76.0%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \left(1 + \color{blue}{{t}^{2} \cdot 0.5}\right) \]
        2. unpow276.0%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \left(1 + \color{blue}{\left(t \cdot t\right)} \cdot 0.5\right) \]
        3. associate-*l*76.0%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \left(1 + \color{blue}{t \cdot \left(t \cdot 0.5\right)}\right) \]
      7. Simplified76.0%

        \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \color{blue}{\left(1 + t \cdot \left(t \cdot 0.5\right)\right)} \]
      8. Step-by-step derivation
        1. div-inv76.0%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \frac{1}{\frac{-1}{y}}\right)} \cdot \left(1 + t \cdot \left(t \cdot 0.5\right)\right) \]
        2. frac-2neg76.0%

          \[\leadsto \left(\sqrt{z \cdot 2} \cdot \frac{1}{\color{blue}{\frac{--1}{-y}}}\right) \cdot \left(1 + t \cdot \left(t \cdot 0.5\right)\right) \]
        3. metadata-eval76.0%

          \[\leadsto \left(\sqrt{z \cdot 2} \cdot \frac{1}{\frac{\color{blue}{1}}{-y}}\right) \cdot \left(1 + t \cdot \left(t \cdot 0.5\right)\right) \]
        4. remove-double-div76.0%

          \[\leadsto \left(\sqrt{z \cdot 2} \cdot \color{blue}{\left(-y\right)}\right) \cdot \left(1 + t \cdot \left(t \cdot 0.5\right)\right) \]
      9. Applied egg-rr76.0%

        \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(-y\right)\right)} \cdot \left(1 + t \cdot \left(t \cdot 0.5\right)\right) \]
    15. Recombined 4 regimes into one program.
    16. Final simplification67.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 255000000000:\\ \;\;\;\;\frac{x \cdot 0.5 - y}{{\left(z \cdot 2\right)}^{-0.5}}\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{+134}:\\ \;\;\;\;\frac{\left(z \cdot 2\right) \cdot \left(y \cdot \left(-y\right)\right)}{\sqrt{z \cdot 2} \cdot y}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+147}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{z \cdot 2} \cdot y\right) \cdot \left(-1 - t \cdot \left(0.5 \cdot t\right)\right)\\ \end{array} \]

    Alternative 4: 87.6% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \sqrt{z \cdot 2} \cdot \left(0.5 \cdot \left(x + \left(x \cdot 0.5 - y\right) \cdot \left(t \cdot t\right)\right) - y\right) \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (* (sqrt (* z 2.0)) (- (* 0.5 (+ x (* (- (* x 0.5) y) (* t t)))) y)))
    double code(double x, double y, double z, double t) {
    	return sqrt((z * 2.0)) * ((0.5 * (x + (((x * 0.5) - y) * (t * t)))) - y);
    }
    
    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 = sqrt((z * 2.0d0)) * ((0.5d0 * (x + (((x * 0.5d0) - y) * (t * t)))) - y)
    end function
    
    public static double code(double x, double y, double z, double t) {
    	return Math.sqrt((z * 2.0)) * ((0.5 * (x + (((x * 0.5) - y) * (t * t)))) - y);
    }
    
    def code(x, y, z, t):
    	return math.sqrt((z * 2.0)) * ((0.5 * (x + (((x * 0.5) - y) * (t * t)))) - y)
    
    function code(x, y, z, t)
    	return Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(0.5 * Float64(x + Float64(Float64(Float64(x * 0.5) - y) * Float64(t * t)))) - y))
    end
    
    function tmp = code(x, y, z, t)
    	tmp = sqrt((z * 2.0)) * ((0.5 * (x + (((x * 0.5) - y) * (t * t)))) - y);
    end
    
    code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(0.5 * N[(x + N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \sqrt{z \cdot 2} \cdot \left(0.5 \cdot \left(x + \left(x \cdot 0.5 - y\right) \cdot \left(t \cdot t\right)\right) - y\right)
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. associate-*l*99.8%

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      3. sqr-neg99.8%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
      4. exp-sqrt99.8%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
      5. sqr-neg99.8%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
      6. exp-prod99.8%

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. Taylor expanded in t around 0 91.0%

      \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(\left(0.5 \cdot x + 0.5 \cdot \left({t}^{2} \cdot \left(0.5 \cdot x - y\right)\right)\right) - y\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-out91.0%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{0.5 \cdot \left(x + {t}^{2} \cdot \left(0.5 \cdot x - y\right)\right)} - y\right) \]
      2. *-commutative91.0%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(0.5 \cdot \left(x + \color{blue}{\left(0.5 \cdot x - y\right) \cdot {t}^{2}}\right) - y\right) \]
      3. unpow291.0%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(0.5 \cdot \left(x + \left(0.5 \cdot x - y\right) \cdot \color{blue}{\left(t \cdot t\right)}\right) - y\right) \]
    6. Simplified91.0%

      \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(0.5 \cdot \left(x + \left(0.5 \cdot x - y\right) \cdot \left(t \cdot t\right)\right) - y\right)} \]
    7. Final simplification91.0%

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

    Alternative 5: 85.4% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \left(1 + t \cdot \left(0.5 \cdot t\right)\right) \cdot \left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right) \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (* (+ 1.0 (* t (* 0.5 t))) (* (sqrt (* z 2.0)) (- (* x 0.5) y))))
    double code(double x, double y, double z, double t) {
    	return (1.0 + (t * (0.5 * t))) * (sqrt((z * 2.0)) * ((x * 0.5) - y));
    }
    
    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 = (1.0d0 + (t * (0.5d0 * t))) * (sqrt((z * 2.0d0)) * ((x * 0.5d0) - y))
    end function
    
    public static double code(double x, double y, double z, double t) {
    	return (1.0 + (t * (0.5 * t))) * (Math.sqrt((z * 2.0)) * ((x * 0.5) - y));
    }
    
    def code(x, y, z, t):
    	return (1.0 + (t * (0.5 * t))) * (math.sqrt((z * 2.0)) * ((x * 0.5) - y))
    
    function code(x, y, z, t)
    	return Float64(Float64(1.0 + Float64(t * Float64(0.5 * t))) * Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(x * 0.5) - y)))
    end
    
    function tmp = code(x, y, z, t)
    	tmp = (1.0 + (t * (0.5 * t))) * (sqrt((z * 2.0)) * ((x * 0.5) - y));
    end
    
    code[x_, y_, z_, t_] := N[(N[(1.0 + N[(t * N[(0.5 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left(1 + t \cdot \left(0.5 \cdot t\right)\right) \cdot \left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Taylor expanded in t around 0 88.5%

      \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{\left(1 + 0.5 \cdot {t}^{2}\right)} \]
    3. Step-by-step derivation
      1. *-commutative52.5%

        \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \left(1 + \color{blue}{{t}^{2} \cdot 0.5}\right) \]
      2. unpow252.5%

        \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \left(1 + \color{blue}{\left(t \cdot t\right)} \cdot 0.5\right) \]
      3. associate-*l*52.5%

        \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \left(1 + \color{blue}{t \cdot \left(t \cdot 0.5\right)}\right) \]
    4. Simplified88.5%

      \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{\left(1 + t \cdot \left(t \cdot 0.5\right)\right)} \]
    5. Final simplification88.5%

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

    Alternative 6: 59.3% accurate, 1.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{z \cdot 2}\\ \mathbf{if}\;t \leq 1.7 \cdot 10^{+25} \lor \neg \left(t \leq 1.7 \cdot 10^{+122}\right) \land t \leq 2.25 \cdot 10^{+171}:\\ \;\;\;\;t_1 \cdot \left(x \cdot 0.5 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{\frac{y}{y \cdot \left(-y\right)}}\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (sqrt (* z 2.0))))
       (if (or (<= t 1.7e+25) (and (not (<= t 1.7e+122)) (<= t 2.25e+171)))
         (* t_1 (- (* x 0.5) y))
         (/ t_1 (/ y (* y (- y)))))))
    double code(double x, double y, double z, double t) {
    	double t_1 = sqrt((z * 2.0));
    	double tmp;
    	if ((t <= 1.7e+25) || (!(t <= 1.7e+122) && (t <= 2.25e+171))) {
    		tmp = t_1 * ((x * 0.5) - y);
    	} else {
    		tmp = t_1 / (y / (y * -y));
    	}
    	return tmp;
    }
    
    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
        real(8) :: tmp
        t_1 = sqrt((z * 2.0d0))
        if ((t <= 1.7d+25) .or. (.not. (t <= 1.7d+122)) .and. (t <= 2.25d+171)) then
            tmp = t_1 * ((x * 0.5d0) - y)
        else
            tmp = t_1 / (y / (y * -y))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double t_1 = Math.sqrt((z * 2.0));
    	double tmp;
    	if ((t <= 1.7e+25) || (!(t <= 1.7e+122) && (t <= 2.25e+171))) {
    		tmp = t_1 * ((x * 0.5) - y);
    	} else {
    		tmp = t_1 / (y / (y * -y));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = math.sqrt((z * 2.0))
    	tmp = 0
    	if (t <= 1.7e+25) or (not (t <= 1.7e+122) and (t <= 2.25e+171)):
    		tmp = t_1 * ((x * 0.5) - y)
    	else:
    		tmp = t_1 / (y / (y * -y))
    	return tmp
    
    function code(x, y, z, t)
    	t_1 = sqrt(Float64(z * 2.0))
    	tmp = 0.0
    	if ((t <= 1.7e+25) || (!(t <= 1.7e+122) && (t <= 2.25e+171)))
    		tmp = Float64(t_1 * Float64(Float64(x * 0.5) - y));
    	else
    		tmp = Float64(t_1 / Float64(y / Float64(y * Float64(-y))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = sqrt((z * 2.0));
    	tmp = 0.0;
    	if ((t <= 1.7e+25) || (~((t <= 1.7e+122)) && (t <= 2.25e+171)))
    		tmp = t_1 * ((x * 0.5) - y);
    	else
    		tmp = t_1 / (y / (y * -y));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[t, 1.7e+25], And[N[Not[LessEqual[t, 1.7e+122]], $MachinePrecision], LessEqual[t, 2.25e+171]]], N[(t$95$1 * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(y / N[(y * (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \sqrt{z \cdot 2}\\
    \mathbf{if}\;t \leq 1.7 \cdot 10^{+25} \lor \neg \left(t \leq 1.7 \cdot 10^{+122}\right) \land t \leq 2.25 \cdot 10^{+171}:\\
    \;\;\;\;t_1 \cdot \left(x \cdot 0.5 - y\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{t_1}{\frac{y}{y \cdot \left(-y\right)}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < 1.69999999999999992e25 or 1.7e122 < t < 2.24999999999999984e171

      1. Initial program 99.8%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative99.8%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
        2. associate-*l*99.8%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
        3. sqr-neg99.8%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
        4. exp-sqrt99.8%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
        5. sqr-neg99.8%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
        6. exp-prod99.8%

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
      4. Taylor expanded in t around 0 68.3%

        \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(0.5 \cdot x - y\right)} \]

      if 1.69999999999999992e25 < t < 1.7e122 or 2.24999999999999984e171 < t

      1. Initial program 100.0%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative100.0%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
        2. associate-*l*100.0%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
        3. sqr-neg100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
        4. exp-sqrt100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
        5. sqr-neg100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
        6. exp-prod100.0%

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
      4. Taylor expanded in t around 0 14.4%

        \[\leadsto \color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)} \]
      5. Taylor expanded in x around 0 5.3%

        \[\leadsto \sqrt{z} \cdot \color{blue}{\left(-1 \cdot \left(y \cdot \sqrt{2}\right)\right)} \]
      6. Step-by-step derivation
        1. mul-1-neg5.3%

          \[\leadsto \sqrt{z} \cdot \color{blue}{\left(-y \cdot \sqrt{2}\right)} \]
        2. *-commutative5.3%

          \[\leadsto \sqrt{z} \cdot \left(-\color{blue}{\sqrt{2} \cdot y}\right) \]
        3. distribute-rgt-neg-out5.3%

          \[\leadsto \sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)} \]
      7. Simplified5.3%

        \[\leadsto \sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)} \]
      8. Step-by-step derivation
        1. associate-*r*5.3%

          \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \sqrt{2}\right) \cdot \left(-y\right)} \]
        2. sqrt-prod5.3%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2}} \cdot \left(-y\right) \]
        3. remove-double-div5.3%

          \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\frac{1}{\frac{1}{-y}}} \]
        4. metadata-eval5.3%

          \[\leadsto \sqrt{z \cdot 2} \cdot \frac{1}{\frac{\color{blue}{--1}}{-y}} \]
        5. frac-2neg5.3%

          \[\leadsto \sqrt{z \cdot 2} \cdot \frac{1}{\color{blue}{\frac{-1}{y}}} \]
        6. div-inv5.3%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{\frac{-1}{y}}} \]
        7. frac-2neg5.3%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\color{blue}{\frac{--1}{-y}}} \]
        8. metadata-eval5.3%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{\color{blue}{1}}{-y}} \]
        9. associate-/r/5.3%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{1} \cdot \left(-y\right)} \]
        10. neg-sub05.3%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{1} \cdot \color{blue}{\left(0 - y\right)} \]
        11. flip--28.3%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{1} \cdot \color{blue}{\frac{0 \cdot 0 - y \cdot y}{0 + y}} \]
        12. frac-times28.3%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2} \cdot \left(0 \cdot 0 - y \cdot y\right)}{1 \cdot \left(0 + y\right)}} \]
        13. metadata-eval28.3%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(\color{blue}{0} - y \cdot y\right)}{1 \cdot \left(0 + y\right)} \]
        14. sub0-neg28.3%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \color{blue}{\left(-y \cdot y\right)}}{1 \cdot \left(0 + y\right)} \]
        15. +-lft-identity28.3%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{1 \cdot \color{blue}{y}} \]
        16. remove-double-div28.3%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{1 \cdot \color{blue}{\frac{1}{\frac{1}{y}}}} \]
        17. div-inv28.3%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{\color{blue}{\frac{1}{\frac{1}{y}}}} \]
        18. remove-double-div28.3%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{\color{blue}{y}} \]
      9. Applied egg-rr28.3%

        \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{y}} \]
      10. Step-by-step derivation
        1. associate-/l*28.3%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{\frac{y}{-y \cdot y}}} \]
        2. *-commutative28.3%

          \[\leadsto \frac{\sqrt{\color{blue}{2 \cdot z}}}{\frac{y}{-y \cdot y}} \]
        3. distribute-rgt-neg-in28.3%

          \[\leadsto \frac{\sqrt{2 \cdot z}}{\frac{y}{\color{blue}{y \cdot \left(-y\right)}}} \]
      11. Simplified28.3%

        \[\leadsto \color{blue}{\frac{\sqrt{2 \cdot z}}{\frac{y}{y \cdot \left(-y\right)}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification60.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.7 \cdot 10^{+25} \lor \neg \left(t \leq 1.7 \cdot 10^{+122}\right) \land t \leq 2.25 \cdot 10^{+171}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{z \cdot 2}}{\frac{y}{y \cdot \left(-y\right)}}\\ \end{array} \]

    Alternative 7: 60.0% accurate, 1.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{z \cdot 2}\\ \mathbf{if}\;t \leq 9 \cdot 10^{+25} \lor \neg \left(t \leq 5 \cdot 10^{+122}\right) \land t \leq 1.55 \cdot 10^{+158}:\\ \;\;\;\;t_1 \cdot \left(x \cdot 0.5 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1 \cdot \left(y \cdot \left(-y\right)\right)}{y}\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (sqrt (* z 2.0))))
       (if (or (<= t 9e+25) (and (not (<= t 5e+122)) (<= t 1.55e+158)))
         (* t_1 (- (* x 0.5) y))
         (/ (* t_1 (* y (- y))) y))))
    double code(double x, double y, double z, double t) {
    	double t_1 = sqrt((z * 2.0));
    	double tmp;
    	if ((t <= 9e+25) || (!(t <= 5e+122) && (t <= 1.55e+158))) {
    		tmp = t_1 * ((x * 0.5) - y);
    	} else {
    		tmp = (t_1 * (y * -y)) / y;
    	}
    	return tmp;
    }
    
    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
        real(8) :: tmp
        t_1 = sqrt((z * 2.0d0))
        if ((t <= 9d+25) .or. (.not. (t <= 5d+122)) .and. (t <= 1.55d+158)) then
            tmp = t_1 * ((x * 0.5d0) - y)
        else
            tmp = (t_1 * (y * -y)) / y
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double t_1 = Math.sqrt((z * 2.0));
    	double tmp;
    	if ((t <= 9e+25) || (!(t <= 5e+122) && (t <= 1.55e+158))) {
    		tmp = t_1 * ((x * 0.5) - y);
    	} else {
    		tmp = (t_1 * (y * -y)) / y;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = math.sqrt((z * 2.0))
    	tmp = 0
    	if (t <= 9e+25) or (not (t <= 5e+122) and (t <= 1.55e+158)):
    		tmp = t_1 * ((x * 0.5) - y)
    	else:
    		tmp = (t_1 * (y * -y)) / y
    	return tmp
    
    function code(x, y, z, t)
    	t_1 = sqrt(Float64(z * 2.0))
    	tmp = 0.0
    	if ((t <= 9e+25) || (!(t <= 5e+122) && (t <= 1.55e+158)))
    		tmp = Float64(t_1 * Float64(Float64(x * 0.5) - y));
    	else
    		tmp = Float64(Float64(t_1 * Float64(y * Float64(-y))) / y);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = sqrt((z * 2.0));
    	tmp = 0.0;
    	if ((t <= 9e+25) || (~((t <= 5e+122)) && (t <= 1.55e+158)))
    		tmp = t_1 * ((x * 0.5) - y);
    	else
    		tmp = (t_1 * (y * -y)) / y;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[t, 9e+25], And[N[Not[LessEqual[t, 5e+122]], $MachinePrecision], LessEqual[t, 1.55e+158]]], N[(t$95$1 * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * N[(y * (-y)), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \sqrt{z \cdot 2}\\
    \mathbf{if}\;t \leq 9 \cdot 10^{+25} \lor \neg \left(t \leq 5 \cdot 10^{+122}\right) \land t \leq 1.55 \cdot 10^{+158}:\\
    \;\;\;\;t_1 \cdot \left(x \cdot 0.5 - y\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{t_1 \cdot \left(y \cdot \left(-y\right)\right)}{y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < 9.0000000000000006e25 or 4.99999999999999989e122 < t < 1.5500000000000001e158

      1. Initial program 99.8%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative99.8%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
        2. associate-*l*99.8%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
        3. sqr-neg99.8%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
        4. exp-sqrt99.8%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
        5. sqr-neg99.8%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
        6. exp-prod99.8%

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
      4. Taylor expanded in t around 0 68.7%

        \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(0.5 \cdot x - y\right)} \]

      if 9.0000000000000006e25 < t < 4.99999999999999989e122 or 1.5500000000000001e158 < t

      1. Initial program 100.0%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative100.0%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
        2. associate-*l*100.0%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
        3. sqr-neg100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
        4. exp-sqrt100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
        5. sqr-neg100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
        6. exp-prod100.0%

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
      4. Taylor expanded in t around 0 14.2%

        \[\leadsto \color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)} \]
      5. Taylor expanded in x around 0 5.2%

        \[\leadsto \sqrt{z} \cdot \color{blue}{\left(-1 \cdot \left(y \cdot \sqrt{2}\right)\right)} \]
      6. Step-by-step derivation
        1. mul-1-neg5.2%

          \[\leadsto \sqrt{z} \cdot \color{blue}{\left(-y \cdot \sqrt{2}\right)} \]
        2. *-commutative5.2%

          \[\leadsto \sqrt{z} \cdot \left(-\color{blue}{\sqrt{2} \cdot y}\right) \]
        3. distribute-rgt-neg-out5.2%

          \[\leadsto \sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)} \]
      7. Simplified5.2%

        \[\leadsto \sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)} \]
      8. Step-by-step derivation
        1. associate-*r*5.2%

          \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \sqrt{2}\right) \cdot \left(-y\right)} \]
        2. sqrt-prod5.2%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2}} \cdot \left(-y\right) \]
        3. remove-double-div5.2%

          \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\frac{1}{\frac{1}{-y}}} \]
        4. metadata-eval5.2%

          \[\leadsto \sqrt{z \cdot 2} \cdot \frac{1}{\frac{\color{blue}{--1}}{-y}} \]
        5. frac-2neg5.2%

          \[\leadsto \sqrt{z \cdot 2} \cdot \frac{1}{\color{blue}{\frac{-1}{y}}} \]
        6. div-inv5.2%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{\frac{-1}{y}}} \]
        7. frac-2neg5.2%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\color{blue}{\frac{--1}{-y}}} \]
        8. metadata-eval5.2%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{\color{blue}{1}}{-y}} \]
        9. associate-/r/5.2%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{1} \cdot \left(-y\right)} \]
        10. neg-sub05.2%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{1} \cdot \color{blue}{\left(0 - y\right)} \]
        11. flip--27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{1} \cdot \color{blue}{\frac{0 \cdot 0 - y \cdot y}{0 + y}} \]
        12. frac-times27.7%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2} \cdot \left(0 \cdot 0 - y \cdot y\right)}{1 \cdot \left(0 + y\right)}} \]
        13. metadata-eval27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(\color{blue}{0} - y \cdot y\right)}{1 \cdot \left(0 + y\right)} \]
        14. sub0-neg27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \color{blue}{\left(-y \cdot y\right)}}{1 \cdot \left(0 + y\right)} \]
        15. +-lft-identity27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{1 \cdot \color{blue}{y}} \]
        16. remove-double-div27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{1 \cdot \color{blue}{\frac{1}{\frac{1}{y}}}} \]
        17. div-inv27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{\color{blue}{\frac{1}{\frac{1}{y}}}} \]
        18. remove-double-div27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{\color{blue}{y}} \]
      9. Applied egg-rr27.7%

        \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{y}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification60.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 9 \cdot 10^{+25} \lor \neg \left(t \leq 5 \cdot 10^{+122}\right) \land t \leq 1.55 \cdot 10^{+158}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{z \cdot 2} \cdot \left(y \cdot \left(-y\right)\right)}{y}\\ \end{array} \]

    Alternative 8: 60.0% accurate, 1.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ t_2 := \sqrt{z \cdot 2}\\ \mathbf{if}\;t \leq 2.6 \cdot 10^{+24}:\\ \;\;\;\;\frac{t_1}{{\left(z \cdot 2\right)}^{-0.5}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+122} \lor \neg \left(t \leq 1.12 \cdot 10^{+163}\right):\\ \;\;\;\;\frac{t_2 \cdot \left(y \cdot \left(-y\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot t_1\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* z 2.0))))
       (if (<= t 2.6e+24)
         (/ t_1 (pow (* z 2.0) -0.5))
         (if (or (<= t 4.8e+122) (not (<= t 1.12e+163)))
           (/ (* t_2 (* y (- y))) y)
           (* t_2 t_1)))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (x * 0.5) - y;
    	double t_2 = sqrt((z * 2.0));
    	double tmp;
    	if (t <= 2.6e+24) {
    		tmp = t_1 / pow((z * 2.0), -0.5);
    	} else if ((t <= 4.8e+122) || !(t <= 1.12e+163)) {
    		tmp = (t_2 * (y * -y)) / y;
    	} else {
    		tmp = t_2 * t_1;
    	}
    	return tmp;
    }
    
    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
        real(8) :: t_2
        real(8) :: tmp
        t_1 = (x * 0.5d0) - y
        t_2 = sqrt((z * 2.0d0))
        if (t <= 2.6d+24) then
            tmp = t_1 / ((z * 2.0d0) ** (-0.5d0))
        else if ((t <= 4.8d+122) .or. (.not. (t <= 1.12d+163))) then
            tmp = (t_2 * (y * -y)) / y
        else
            tmp = t_2 * t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double t_1 = (x * 0.5) - y;
    	double t_2 = Math.sqrt((z * 2.0));
    	double tmp;
    	if (t <= 2.6e+24) {
    		tmp = t_1 / Math.pow((z * 2.0), -0.5);
    	} else if ((t <= 4.8e+122) || !(t <= 1.12e+163)) {
    		tmp = (t_2 * (y * -y)) / y;
    	} else {
    		tmp = t_2 * t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = (x * 0.5) - y
    	t_2 = math.sqrt((z * 2.0))
    	tmp = 0
    	if t <= 2.6e+24:
    		tmp = t_1 / math.pow((z * 2.0), -0.5)
    	elif (t <= 4.8e+122) or not (t <= 1.12e+163):
    		tmp = (t_2 * (y * -y)) / y
    	else:
    		tmp = t_2 * t_1
    	return tmp
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(x * 0.5) - y)
    	t_2 = sqrt(Float64(z * 2.0))
    	tmp = 0.0
    	if (t <= 2.6e+24)
    		tmp = Float64(t_1 / (Float64(z * 2.0) ^ -0.5));
    	elseif ((t <= 4.8e+122) || !(t <= 1.12e+163))
    		tmp = Float64(Float64(t_2 * Float64(y * Float64(-y))) / y);
    	else
    		tmp = Float64(t_2 * t_1);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = (x * 0.5) - y;
    	t_2 = sqrt((z * 2.0));
    	tmp = 0.0;
    	if (t <= 2.6e+24)
    		tmp = t_1 / ((z * 2.0) ^ -0.5);
    	elseif ((t <= 4.8e+122) || ~((t <= 1.12e+163)))
    		tmp = (t_2 * (y * -y)) / y;
    	else
    		tmp = t_2 * t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 2.6e+24], N[(t$95$1 / N[Power[N[(z * 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 4.8e+122], N[Not[LessEqual[t, 1.12e+163]], $MachinePrecision]], N[(N[(t$95$2 * N[(y * (-y)), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(t$95$2 * t$95$1), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot 0.5 - y\\
    t_2 := \sqrt{z \cdot 2}\\
    \mathbf{if}\;t \leq 2.6 \cdot 10^{+24}:\\
    \;\;\;\;\frac{t_1}{{\left(z \cdot 2\right)}^{-0.5}}\\
    
    \mathbf{elif}\;t \leq 4.8 \cdot 10^{+122} \lor \neg \left(t \leq 1.12 \cdot 10^{+163}\right):\\
    \;\;\;\;\frac{t_2 \cdot \left(y \cdot \left(-y\right)\right)}{y}\\
    
    \mathbf{else}:\\
    \;\;\;\;t_2 \cdot t_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < 2.5999999999999998e24

      1. Initial program 99.7%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative99.7%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
        2. associate-*l*99.7%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
        3. sqr-neg99.7%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
        4. exp-sqrt99.7%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
        5. sqr-neg99.7%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
        6. exp-prod99.8%

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
      4. Taylor expanded in t around 0 70.2%

        \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(0.5 \cdot x - y\right)} \]
      5. Step-by-step derivation
        1. /-rgt-identity70.2%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{1}} \cdot \left(0.5 \cdot x - y\right) \]
        2. *-commutative70.2%

          \[\leadsto \color{blue}{\left(0.5 \cdot x - y\right) \cdot \frac{\sqrt{z \cdot 2}}{1}} \]
        3. clear-num70.1%

          \[\leadsto \left(0.5 \cdot x - y\right) \cdot \color{blue}{\frac{1}{\frac{1}{\sqrt{z \cdot 2}}}} \]
        4. un-div-inv70.1%

          \[\leadsto \color{blue}{\frac{0.5 \cdot x - y}{\frac{1}{\sqrt{z \cdot 2}}}} \]
        5. *-commutative70.1%

          \[\leadsto \frac{\color{blue}{x \cdot 0.5} - y}{\frac{1}{\sqrt{z \cdot 2}}} \]
        6. pow1/270.1%

          \[\leadsto \frac{x \cdot 0.5 - y}{\frac{1}{\color{blue}{{\left(z \cdot 2\right)}^{0.5}}}} \]
        7. pow-flip70.2%

          \[\leadsto \frac{x \cdot 0.5 - y}{\color{blue}{{\left(z \cdot 2\right)}^{\left(-0.5\right)}}} \]
        8. metadata-eval70.2%

          \[\leadsto \frac{x \cdot 0.5 - y}{{\left(z \cdot 2\right)}^{\color{blue}{-0.5}}} \]
      6. Applied egg-rr70.2%

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

      if 2.5999999999999998e24 < t < 4.8000000000000004e122 or 1.11999999999999996e163 < t

      1. Initial program 100.0%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative100.0%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
        2. associate-*l*100.0%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
        3. sqr-neg100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
        4. exp-sqrt100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
        5. sqr-neg100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
        6. exp-prod100.0%

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
      4. Taylor expanded in t around 0 14.2%

        \[\leadsto \color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)} \]
      5. Taylor expanded in x around 0 5.2%

        \[\leadsto \sqrt{z} \cdot \color{blue}{\left(-1 \cdot \left(y \cdot \sqrt{2}\right)\right)} \]
      6. Step-by-step derivation
        1. mul-1-neg5.2%

          \[\leadsto \sqrt{z} \cdot \color{blue}{\left(-y \cdot \sqrt{2}\right)} \]
        2. *-commutative5.2%

          \[\leadsto \sqrt{z} \cdot \left(-\color{blue}{\sqrt{2} \cdot y}\right) \]
        3. distribute-rgt-neg-out5.2%

          \[\leadsto \sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)} \]
      7. Simplified5.2%

        \[\leadsto \sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)} \]
      8. Step-by-step derivation
        1. associate-*r*5.2%

          \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \sqrt{2}\right) \cdot \left(-y\right)} \]
        2. sqrt-prod5.2%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2}} \cdot \left(-y\right) \]
        3. remove-double-div5.2%

          \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\frac{1}{\frac{1}{-y}}} \]
        4. metadata-eval5.2%

          \[\leadsto \sqrt{z \cdot 2} \cdot \frac{1}{\frac{\color{blue}{--1}}{-y}} \]
        5. frac-2neg5.2%

          \[\leadsto \sqrt{z \cdot 2} \cdot \frac{1}{\color{blue}{\frac{-1}{y}}} \]
        6. div-inv5.2%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{\frac{-1}{y}}} \]
        7. frac-2neg5.2%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\color{blue}{\frac{--1}{-y}}} \]
        8. metadata-eval5.2%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{\color{blue}{1}}{-y}} \]
        9. associate-/r/5.2%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{1} \cdot \left(-y\right)} \]
        10. neg-sub05.2%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{1} \cdot \color{blue}{\left(0 - y\right)} \]
        11. flip--27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{1} \cdot \color{blue}{\frac{0 \cdot 0 - y \cdot y}{0 + y}} \]
        12. frac-times27.7%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2} \cdot \left(0 \cdot 0 - y \cdot y\right)}{1 \cdot \left(0 + y\right)}} \]
        13. metadata-eval27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(\color{blue}{0} - y \cdot y\right)}{1 \cdot \left(0 + y\right)} \]
        14. sub0-neg27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \color{blue}{\left(-y \cdot y\right)}}{1 \cdot \left(0 + y\right)} \]
        15. +-lft-identity27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{1 \cdot \color{blue}{y}} \]
        16. remove-double-div27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{1 \cdot \color{blue}{\frac{1}{\frac{1}{y}}}} \]
        17. div-inv27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{\color{blue}{\frac{1}{\frac{1}{y}}}} \]
        18. remove-double-div27.7%

          \[\leadsto \frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{\color{blue}{y}} \]
      9. Applied egg-rr27.7%

        \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2} \cdot \left(-y \cdot y\right)}{y}} \]

      if 4.8000000000000004e122 < t < 1.11999999999999996e163

      1. Initial program 100.0%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative100.0%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
        2. associate-*l*100.0%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
        3. sqr-neg100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
        4. exp-sqrt100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
        5. sqr-neg100.0%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
        6. exp-prod100.0%

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
      4. Taylor expanded in t around 0 35.1%

        \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(0.5 \cdot x - y\right)} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification60.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.6 \cdot 10^{+24}:\\ \;\;\;\;\frac{x \cdot 0.5 - y}{{\left(z \cdot 2\right)}^{-0.5}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+122} \lor \neg \left(t \leq 1.12 \cdot 10^{+163}\right):\\ \;\;\;\;\frac{\sqrt{z \cdot 2} \cdot \left(y \cdot \left(-y\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\\ \end{array} \]

    Alternative 9: 65.6% accurate, 1.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 8.8 \cdot 10^{+60}:\\ \;\;\;\;\frac{x \cdot 0.5 - y}{{\left(z \cdot 2\right)}^{-0.5}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{z \cdot 2} \cdot y\right) \cdot \left(-1 - t \cdot \left(0.5 \cdot t\right)\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (if (<= t 8.8e+60)
       (/ (- (* x 0.5) y) (pow (* z 2.0) -0.5))
       (* (* (sqrt (* z 2.0)) y) (- -1.0 (* t (* 0.5 t))))))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (t <= 8.8e+60) {
    		tmp = ((x * 0.5) - y) / pow((z * 2.0), -0.5);
    	} else {
    		tmp = (sqrt((z * 2.0)) * y) * (-1.0 - (t * (0.5 * t)));
    	}
    	return tmp;
    }
    
    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) :: tmp
        if (t <= 8.8d+60) then
            tmp = ((x * 0.5d0) - y) / ((z * 2.0d0) ** (-0.5d0))
        else
            tmp = (sqrt((z * 2.0d0)) * y) * ((-1.0d0) - (t * (0.5d0 * t)))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double tmp;
    	if (t <= 8.8e+60) {
    		tmp = ((x * 0.5) - y) / Math.pow((z * 2.0), -0.5);
    	} else {
    		tmp = (Math.sqrt((z * 2.0)) * y) * (-1.0 - (t * (0.5 * t)));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	tmp = 0
    	if t <= 8.8e+60:
    		tmp = ((x * 0.5) - y) / math.pow((z * 2.0), -0.5)
    	else:
    		tmp = (math.sqrt((z * 2.0)) * y) * (-1.0 - (t * (0.5 * t)))
    	return tmp
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (t <= 8.8e+60)
    		tmp = Float64(Float64(Float64(x * 0.5) - y) / (Float64(z * 2.0) ^ -0.5));
    	else
    		tmp = Float64(Float64(sqrt(Float64(z * 2.0)) * y) * Float64(-1.0 - Float64(t * Float64(0.5 * t))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if (t <= 8.8e+60)
    		tmp = ((x * 0.5) - y) / ((z * 2.0) ^ -0.5);
    	else
    		tmp = (sqrt((z * 2.0)) * y) * (-1.0 - (t * (0.5 * t)));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[t, 8.8e+60], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] / N[Power[N[(z * 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision] * N[(-1.0 - N[(t * N[(0.5 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;t \leq 8.8 \cdot 10^{+60}:\\
    \;\;\;\;\frac{x \cdot 0.5 - y}{{\left(z \cdot 2\right)}^{-0.5}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\sqrt{z \cdot 2} \cdot y\right) \cdot \left(-1 - t \cdot \left(0.5 \cdot t\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < 8.79999999999999984e60

      1. Initial program 99.8%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative99.8%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
        2. associate-*l*99.8%

          \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
        3. sqr-neg99.8%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
        4. exp-sqrt99.8%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
        5. sqr-neg99.8%

          \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
        6. exp-prod99.8%

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
      4. Taylor expanded in t around 0 68.3%

        \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(0.5 \cdot x - y\right)} \]
      5. Step-by-step derivation
        1. /-rgt-identity68.3%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{1}} \cdot \left(0.5 \cdot x - y\right) \]
        2. *-commutative68.3%

          \[\leadsto \color{blue}{\left(0.5 \cdot x - y\right) \cdot \frac{\sqrt{z \cdot 2}}{1}} \]
        3. clear-num68.2%

          \[\leadsto \left(0.5 \cdot x - y\right) \cdot \color{blue}{\frac{1}{\frac{1}{\sqrt{z \cdot 2}}}} \]
        4. un-div-inv68.2%

          \[\leadsto \color{blue}{\frac{0.5 \cdot x - y}{\frac{1}{\sqrt{z \cdot 2}}}} \]
        5. *-commutative68.2%

          \[\leadsto \frac{\color{blue}{x \cdot 0.5} - y}{\frac{1}{\sqrt{z \cdot 2}}} \]
        6. pow1/268.2%

          \[\leadsto \frac{x \cdot 0.5 - y}{\frac{1}{\color{blue}{{\left(z \cdot 2\right)}^{0.5}}}} \]
        7. pow-flip68.3%

          \[\leadsto \frac{x \cdot 0.5 - y}{\color{blue}{{\left(z \cdot 2\right)}^{\left(-0.5\right)}}} \]
        8. metadata-eval68.3%

          \[\leadsto \frac{x \cdot 0.5 - y}{{\left(z \cdot 2\right)}^{\color{blue}{-0.5}}} \]
      6. Applied egg-rr68.3%

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

      if 8.79999999999999984e60 < t

      1. Initial program 100.0%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. *-commutative100.0%

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

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

          \[\leadsto \left(\sqrt{z \cdot 2} \cdot \color{blue}{\frac{1}{\frac{x \cdot 0.5 + y}{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) - y \cdot y}}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
        4. un-div-inv88.7%

          \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{\frac{x \cdot 0.5 + y}{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) - y \cdot y}}} \cdot e^{\frac{t \cdot t}{2}} \]
        5. clear-num88.7%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\color{blue}{\frac{1}{\frac{\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right) - y \cdot y}{x \cdot 0.5 + y}}}} \cdot e^{\frac{t \cdot t}{2}} \]
        6. flip--100.0%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{1}{\color{blue}{x \cdot 0.5 - y}}} \cdot e^{\frac{t \cdot t}{2}} \]
      3. Applied egg-rr100.0%

        \[\leadsto \color{blue}{\frac{\sqrt{z \cdot 2}}{\frac{1}{x \cdot 0.5 - y}}} \cdot e^{\frac{t \cdot t}{2}} \]
      4. Taylor expanded in x around 0 67.9%

        \[\leadsto \frac{\sqrt{z \cdot 2}}{\color{blue}{\frac{-1}{y}}} \cdot e^{\frac{t \cdot t}{2}} \]
      5. Taylor expanded in t around 0 55.6%

        \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \color{blue}{\left(1 + 0.5 \cdot {t}^{2}\right)} \]
      6. Step-by-step derivation
        1. *-commutative55.6%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \left(1 + \color{blue}{{t}^{2} \cdot 0.5}\right) \]
        2. unpow255.6%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \left(1 + \color{blue}{\left(t \cdot t\right)} \cdot 0.5\right) \]
        3. associate-*l*55.6%

          \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \left(1 + \color{blue}{t \cdot \left(t \cdot 0.5\right)}\right) \]
      7. Simplified55.6%

        \[\leadsto \frac{\sqrt{z \cdot 2}}{\frac{-1}{y}} \cdot \color{blue}{\left(1 + t \cdot \left(t \cdot 0.5\right)\right)} \]
      8. Step-by-step derivation
        1. div-inv55.6%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \frac{1}{\frac{-1}{y}}\right)} \cdot \left(1 + t \cdot \left(t \cdot 0.5\right)\right) \]
        2. frac-2neg55.6%

          \[\leadsto \left(\sqrt{z \cdot 2} \cdot \frac{1}{\color{blue}{\frac{--1}{-y}}}\right) \cdot \left(1 + t \cdot \left(t \cdot 0.5\right)\right) \]
        3. metadata-eval55.6%

          \[\leadsto \left(\sqrt{z \cdot 2} \cdot \frac{1}{\frac{\color{blue}{1}}{-y}}\right) \cdot \left(1 + t \cdot \left(t \cdot 0.5\right)\right) \]
        4. remove-double-div55.6%

          \[\leadsto \left(\sqrt{z \cdot 2} \cdot \color{blue}{\left(-y\right)}\right) \cdot \left(1 + t \cdot \left(t \cdot 0.5\right)\right) \]
      9. Applied egg-rr55.6%

        \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(-y\right)\right)} \cdot \left(1 + t \cdot \left(t \cdot 0.5\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification65.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 8.8 \cdot 10^{+60}:\\ \;\;\;\;\frac{x \cdot 0.5 - y}{{\left(z \cdot 2\right)}^{-0.5}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{z \cdot 2} \cdot y\right) \cdot \left(-1 - t \cdot \left(0.5 \cdot t\right)\right)\\ \end{array} \]

    Alternative 10: 57.9% accurate, 2.0× speedup?

    \[\begin{array}{l} \\ \sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right) \end{array} \]
    (FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (- (* x 0.5) y)))
    double code(double x, double y, double z, double t) {
    	return sqrt((z * 2.0)) * ((x * 0.5) - y);
    }
    
    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 = sqrt((z * 2.0d0)) * ((x * 0.5d0) - y)
    end function
    
    public static double code(double x, double y, double z, double t) {
    	return Math.sqrt((z * 2.0)) * ((x * 0.5) - y);
    }
    
    def code(x, y, z, t):
    	return math.sqrt((z * 2.0)) * ((x * 0.5) - y)
    
    function code(x, y, z, t)
    	return Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(x * 0.5) - y))
    end
    
    function tmp = code(x, y, z, t)
    	tmp = sqrt((z * 2.0)) * ((x * 0.5) - y);
    end
    
    code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. associate-*l*99.8%

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      3. sqr-neg99.8%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
      4. exp-sqrt99.8%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
      5. sqr-neg99.8%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
      6. exp-prod99.8%

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. Taylor expanded in t around 0 58.0%

      \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(0.5 \cdot x - y\right)} \]
    5. Final simplification58.0%

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

    Alternative 11: 30.3% accurate, 2.0× speedup?

    \[\begin{array}{l} \\ \sqrt{z \cdot 2} \cdot \left(-y\right) \end{array} \]
    (FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (- y)))
    double code(double x, double y, double z, double t) {
    	return sqrt((z * 2.0)) * -y;
    }
    
    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 = sqrt((z * 2.0d0)) * -y
    end function
    
    public static double code(double x, double y, double z, double t) {
    	return Math.sqrt((z * 2.0)) * -y;
    }
    
    def code(x, y, z, t):
    	return math.sqrt((z * 2.0)) * -y
    
    function code(x, y, z, t)
    	return Float64(sqrt(Float64(z * 2.0)) * Float64(-y))
    end
    
    function tmp = code(x, y, z, t)
    	tmp = sqrt((z * 2.0)) * -y;
    end
    
    code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \sqrt{z \cdot 2} \cdot \left(-y\right)
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. associate-*l*99.8%

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      3. sqr-neg99.8%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot e^{\frac{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}{2}}\right) \]
      4. exp-sqrt99.8%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{e^{\left(-t\right) \cdot \left(-t\right)}}}\right) \]
      5. sqr-neg99.8%

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{\color{blue}{t \cdot t}}}\right) \]
      6. exp-prod99.8%

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. Taylor expanded in t around 0 57.5%

      \[\leadsto \color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)} \]
    5. Taylor expanded in x around 0 28.1%

      \[\leadsto \sqrt{z} \cdot \color{blue}{\left(-1 \cdot \left(y \cdot \sqrt{2}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg28.1%

        \[\leadsto \sqrt{z} \cdot \color{blue}{\left(-y \cdot \sqrt{2}\right)} \]
      2. *-commutative28.1%

        \[\leadsto \sqrt{z} \cdot \left(-\color{blue}{\sqrt{2} \cdot y}\right) \]
      3. distribute-rgt-neg-out28.1%

        \[\leadsto \sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)} \]
    7. Simplified28.1%

      \[\leadsto \sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*r*28.5%

        \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \sqrt{2}\right) \cdot \left(-y\right)} \]
      2. sqrt-prod28.6%

        \[\leadsto \color{blue}{\sqrt{z \cdot 2}} \cdot \left(-y\right) \]
      3. distribute-rgt-neg-out28.6%

        \[\leadsto \color{blue}{-\sqrt{z \cdot 2} \cdot y} \]
      4. remove-double-div28.5%

        \[\leadsto -\sqrt{z \cdot 2} \cdot \color{blue}{\frac{1}{\frac{1}{y}}} \]
      5. div-inv28.5%

        \[\leadsto -\color{blue}{\frac{\sqrt{z \cdot 2}}{\frac{1}{y}}} \]
      6. distribute-frac-neg28.5%

        \[\leadsto \color{blue}{\frac{-\sqrt{z \cdot 2}}{\frac{1}{y}}} \]
      7. neg-sub028.5%

        \[\leadsto \frac{\color{blue}{0 - \sqrt{z \cdot 2}}}{\frac{1}{y}} \]
      8. div-sub28.5%

        \[\leadsto \color{blue}{\frac{0}{\frac{1}{y}} - \frac{\sqrt{z \cdot 2}}{\frac{1}{y}}} \]
      9. div-inv28.5%

        \[\leadsto \frac{0}{\frac{1}{y}} - \color{blue}{\sqrt{z \cdot 2} \cdot \frac{1}{\frac{1}{y}}} \]
      10. remove-double-div28.6%

        \[\leadsto \frac{0}{\frac{1}{y}} - \sqrt{z \cdot 2} \cdot \color{blue}{y} \]
      11. *-commutative28.6%

        \[\leadsto \frac{0}{\frac{1}{y}} - \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
    9. Applied egg-rr28.6%

      \[\leadsto \color{blue}{\frac{0}{\frac{1}{y}} - y \cdot \sqrt{z \cdot 2}} \]
    10. Step-by-step derivation
      1. div028.6%

        \[\leadsto \color{blue}{0} - y \cdot \sqrt{z \cdot 2} \]
      2. sub0-neg28.6%

        \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
      3. distribute-lft-neg-in28.6%

        \[\leadsto \color{blue}{\left(-y\right) \cdot \sqrt{z \cdot 2}} \]
      4. *-commutative28.6%

        \[\leadsto \left(-y\right) \cdot \sqrt{\color{blue}{2 \cdot z}} \]
    11. Simplified28.6%

      \[\leadsto \color{blue}{\left(-y\right) \cdot \sqrt{2 \cdot z}} \]
    12. Final simplification28.6%

      \[\leadsto \sqrt{z \cdot 2} \cdot \left(-y\right) \]

    Developer target: 99.3% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \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)} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0))))
    double code(double x, double y, double z, double t) {
    	return (((x * 0.5) - y) * sqrt((z * 2.0))) * pow(exp(1.0), ((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(1.0d0) ** ((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.pow(Math.exp(1.0), ((t * t) / 2.0));
    }
    
    def code(x, y, z, t):
    	return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.pow(math.exp(1.0), ((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(1.0) ^ Float64(Float64(t * t) / 2.0)))
    end
    
    function tmp = code(x, y, z, t)
    	tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * (exp(1.0) ^ ((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[Power[N[Exp[1.0], $MachinePrecision], N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \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)}
    \end{array}
    

    Reproduce

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