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

Percentage Accurate: 99.4% → 99.8%
Time: 13.7s
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.4% 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.8% accurate, 0.7× speedup?

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

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

    \[\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. associate-*l*99.8%

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot 2} \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)\right)} \]
    2. expm1-udef74.4%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{z \cdot 2} \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} - 1\right)} \]
    3. sqrt-unprod74.4%

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\mathsf{log1p}\left(\sqrt{\color{blue}{z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)}}\right)} - 1\right) \]
    5. pow-exp74.4%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\mathsf{log1p}\left(\sqrt{z \cdot \left(2 \cdot \color{blue}{e^{t \cdot t}}\right)}\right)} - 1\right) \]
    6. pow274.4%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\mathsf{log1p}\left(\sqrt{z \cdot \left(2 \cdot e^{\color{blue}{{t}^{2}}}\right)}\right)} - 1\right) \]
  5. Applied egg-rr74.4%

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

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

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

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

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

Alternative 2: 59.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 65:\\
\;\;\;\;t_1 \cdot \sqrt{z \cdot 2}\\

\mathbf{elif}\;t \leq 1.42 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{{y}^{2} \cdot \left(z \cdot 2\right)}\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(2 \cdot \sqrt{\frac{{z}^{2}}{z \cdot 2}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 65

    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. exp-sqrt99.7%

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

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

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

    if 65 < t < 1.41999999999999998e79

    1. Initial program 94.1%

      \[\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. *-commutative94.1%

        \[\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. exp-sqrt100.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)} \]
    8. Step-by-step derivation
      1. expm1-log1p-u2.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)\right)\right)} \]
      2. expm1-udef2.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)\right)} - 1} \]
    9. Applied egg-rr1.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \sqrt{z \cdot 2}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def1.2%

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

        \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
    11. Simplified1.7%

      \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
    12. Step-by-step derivation
      1. add-sqr-sqrt1.0%

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{{y}^{2}}} \]
    13. Applied egg-rr53.7%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot z\right) \cdot {y}^{2}}} \]
    14. Step-by-step derivation
      1. *-commutative53.7%

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

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

    if 1.41999999999999998e79 < 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. associate-*l*100.0%

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt[3]{\left(\sqrt{z \cdot 2} \cdot \color{blue}{\sqrt{z \cdot 2}}\right) \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)} \]
      4. add-sqr-sqrt18.3%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt[3]{{\left(z \cdot 2\right)}^{1} \cdot \color{blue}{\sqrt{z \cdot 2}}} \]
      7. pow1/218.3%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt[3]{{\left(z \cdot 2\right)}^{1} \cdot \color{blue}{{\left(z \cdot 2\right)}^{0.5}}} \]
      8. pow-prod-up18.3%

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt[3]{{\left(z \cdot 2\right)}^{\color{blue}{1.5}}} \]
      10. pow1/318.3%

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. pow-pow8.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{{\left(z \cdot 2\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      2. *-commutative8.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot {\color{blue}{\left(2 \cdot z\right)}}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      3. metadata-eval8.4%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(2 \cdot \frac{z}{\sqrt{\color{blue}{z \cdot 2}}}\right) \]
    8. Applied egg-rr8.4%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(2 \cdot \frac{z}{\sqrt{z \cdot 2}}\right)} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt8.4%

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(2 \cdot \sqrt{\frac{\color{blue}{{z}^{2}}}{\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}}}\right) \]
      5. add-sqr-sqrt30.3%

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

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

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

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

Alternative 3: 99.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 4: 57.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 20:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+79}:\\ \;\;\;\;\sqrt{{y}^{2} \cdot \left(z \cdot 2\right)}\\ \mathbf{elif}\;t \leq 2.85 \cdot 10^{+230}:\\ \;\;\;\;{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{0.3333333333333333} \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot \left(0.5 \cdot {x}^{2}\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t 20.0)
   (* (- (* x 0.5) y) (sqrt (* z 2.0)))
   (if (<= t 3.8e+79)
     (sqrt (* (pow y 2.0) (* z 2.0)))
     (if (<= t 2.85e+230)
       (* (pow (pow (* z 2.0) 1.5) 0.3333333333333333) (- y))
       (sqrt (* z (* 0.5 (pow x 2.0))))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 20.0) {
		tmp = ((x * 0.5) - y) * sqrt((z * 2.0));
	} else if (t <= 3.8e+79) {
		tmp = sqrt((pow(y, 2.0) * (z * 2.0)));
	} else if (t <= 2.85e+230) {
		tmp = pow(pow((z * 2.0), 1.5), 0.3333333333333333) * -y;
	} else {
		tmp = sqrt((z * (0.5 * pow(x, 2.0))));
	}
	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 <= 20.0d0) then
        tmp = ((x * 0.5d0) - y) * sqrt((z * 2.0d0))
    else if (t <= 3.8d+79) then
        tmp = sqrt(((y ** 2.0d0) * (z * 2.0d0)))
    else if (t <= 2.85d+230) then
        tmp = (((z * 2.0d0) ** 1.5d0) ** 0.3333333333333333d0) * -y
    else
        tmp = sqrt((z * (0.5d0 * (x ** 2.0d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 20.0) {
		tmp = ((x * 0.5) - y) * Math.sqrt((z * 2.0));
	} else if (t <= 3.8e+79) {
		tmp = Math.sqrt((Math.pow(y, 2.0) * (z * 2.0)));
	} else if (t <= 2.85e+230) {
		tmp = Math.pow(Math.pow((z * 2.0), 1.5), 0.3333333333333333) * -y;
	} else {
		tmp = Math.sqrt((z * (0.5 * Math.pow(x, 2.0))));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= 20.0:
		tmp = ((x * 0.5) - y) * math.sqrt((z * 2.0))
	elif t <= 3.8e+79:
		tmp = math.sqrt((math.pow(y, 2.0) * (z * 2.0)))
	elif t <= 2.85e+230:
		tmp = math.pow(math.pow((z * 2.0), 1.5), 0.3333333333333333) * -y
	else:
		tmp = math.sqrt((z * (0.5 * math.pow(x, 2.0))))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 20.0)
		tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0)));
	elseif (t <= 3.8e+79)
		tmp = sqrt(Float64((y ^ 2.0) * Float64(z * 2.0)));
	elseif (t <= 2.85e+230)
		tmp = Float64(((Float64(z * 2.0) ^ 1.5) ^ 0.3333333333333333) * Float64(-y));
	else
		tmp = sqrt(Float64(z * Float64(0.5 * (x ^ 2.0))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= 20.0)
		tmp = ((x * 0.5) - y) * sqrt((z * 2.0));
	elseif (t <= 3.8e+79)
		tmp = sqrt(((y ^ 2.0) * (z * 2.0)));
	elseif (t <= 2.85e+230)
		tmp = (((z * 2.0) ^ 1.5) ^ 0.3333333333333333) * -y;
	else
		tmp = sqrt((z * (0.5 * (x ^ 2.0))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, 20.0], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e+79], N[Sqrt[N[(N[Power[y, 2.0], $MachinePrecision] * N[(z * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 2.85e+230], N[(N[Power[N[Power[N[(z * 2.0), $MachinePrecision], 1.5], $MachinePrecision], 0.3333333333333333], $MachinePrecision] * (-y)), $MachinePrecision], N[Sqrt[N[(z * N[(0.5 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 20:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{{y}^{2} \cdot \left(z \cdot 2\right)}\\

\mathbf{elif}\;t \leq 2.85 \cdot 10^{+230}:\\
\;\;\;\;{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{0.3333333333333333} \cdot \left(-y\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt{z \cdot \left(0.5 \cdot {x}^{2}\right)}\\


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

    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. exp-sqrt99.7%

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

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

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

    if 20 < t < 3.8000000000000002e79

    1. Initial program 94.1%

      \[\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. *-commutative94.1%

        \[\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. exp-sqrt100.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)} \]
    8. Step-by-step derivation
      1. expm1-log1p-u2.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)\right)\right)} \]
      2. expm1-udef2.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)\right)} - 1} \]
    9. Applied egg-rr1.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \sqrt{z \cdot 2}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def1.2%

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

        \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
    11. Simplified1.7%

      \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
    12. Step-by-step derivation
      1. add-sqr-sqrt1.0%

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{{y}^{2}}} \]
    13. Applied egg-rr53.7%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot z\right) \cdot {y}^{2}}} \]
    14. Step-by-step derivation
      1. *-commutative53.7%

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

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

    if 3.8000000000000002e79 < t < 2.8500000000000001e230

    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. exp-sqrt100.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(-\color{blue}{{\left(z \cdot 2\right)}^{0.5}}\right) \]
      4. metadata-eval9.1%

        \[\leadsto y \cdot \left(-{\left(z \cdot 2\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}}\right) \]
      5. pow-pow15.1%

        \[\leadsto y \cdot \left(-\color{blue}{{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{0.3333333333333333}}\right) \]
    9. Applied egg-rr15.1%

      \[\leadsto y \cdot \left(-\color{blue}{{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{0.3333333333333333}}\right) \]

    if 2.8500000000000001e230 < 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. exp-sqrt100.0%

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt0.9%

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

        \[\leadsto \color{blue}{\sqrt{\left(0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right) \cdot \left(0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)}} \]
      3. *-commutative7.7%

        \[\leadsto \sqrt{\color{blue}{\left(\left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right) \cdot 0.5\right)} \cdot \left(0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \]
      4. *-commutative7.7%

        \[\leadsto \sqrt{\left(\left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right) \cdot 0.5\right) \cdot \color{blue}{\left(\left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right) \cdot 0.5\right)}} \]
      5. swap-sqr7.7%

        \[\leadsto \sqrt{\color{blue}{\left(\left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right) \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right) \cdot \left(0.5 \cdot 0.5\right)}} \]
      6. *-commutative7.7%

        \[\leadsto \sqrt{\left(\color{blue}{\left(\sqrt{z} \cdot \left(x \cdot \sqrt{2}\right)\right)} \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      7. *-commutative7.7%

        \[\leadsto \sqrt{\left(\left(\sqrt{z} \cdot \left(x \cdot \sqrt{2}\right)\right) \cdot \color{blue}{\left(\sqrt{z} \cdot \left(x \cdot \sqrt{2}\right)\right)}\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      8. swap-sqr19.7%

        \[\leadsto \sqrt{\color{blue}{\left(\left(\sqrt{z} \cdot \sqrt{z}\right) \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \left(x \cdot \sqrt{2}\right)\right)\right)} \cdot \left(0.5 \cdot 0.5\right)} \]
      9. add-sqr-sqrt19.7%

        \[\leadsto \sqrt{\left(\color{blue}{z} \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \left(x \cdot \sqrt{2}\right)\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      10. *-commutative19.7%

        \[\leadsto \sqrt{\left(z \cdot \left(\color{blue}{\left(\sqrt{2} \cdot x\right)} \cdot \left(x \cdot \sqrt{2}\right)\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      11. *-commutative19.7%

        \[\leadsto \sqrt{\left(z \cdot \left(\left(\sqrt{2} \cdot x\right) \cdot \color{blue}{\left(\sqrt{2} \cdot x\right)}\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      12. swap-sqr19.7%

        \[\leadsto \sqrt{\left(z \cdot \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(x \cdot x\right)\right)}\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      13. rem-square-sqrt19.7%

        \[\leadsto \sqrt{\left(z \cdot \left(\color{blue}{2} \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      14. pow219.7%

        \[\leadsto \sqrt{\left(z \cdot \left(2 \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      15. metadata-eval19.7%

        \[\leadsto \sqrt{\left(z \cdot \left(2 \cdot {x}^{2}\right)\right) \cdot \color{blue}{0.25}} \]
    7. Applied egg-rr19.7%

      \[\leadsto \color{blue}{\sqrt{\left(z \cdot \left(2 \cdot {x}^{2}\right)\right) \cdot 0.25}} \]
    8. Step-by-step derivation
      1. associate-*l*19.7%

        \[\leadsto \sqrt{\color{blue}{z \cdot \left(\left(2 \cdot {x}^{2}\right) \cdot 0.25\right)}} \]
      2. *-commutative19.7%

        \[\leadsto \sqrt{z \cdot \left(\color{blue}{\left({x}^{2} \cdot 2\right)} \cdot 0.25\right)} \]
      3. associate-*l*19.7%

        \[\leadsto \sqrt{z \cdot \color{blue}{\left({x}^{2} \cdot \left(2 \cdot 0.25\right)\right)}} \]
      4. metadata-eval19.7%

        \[\leadsto \sqrt{z \cdot \left({x}^{2} \cdot \color{blue}{0.5}\right)} \]
    9. Simplified19.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 20:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+79}:\\ \;\;\;\;\sqrt{{y}^{2} \cdot \left(z \cdot 2\right)}\\ \mathbf{elif}\;t \leq 2.85 \cdot 10^{+230}:\\ \;\;\;\;{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{0.3333333333333333} \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot \left(0.5 \cdot {x}^{2}\right)}\\ \end{array} \]

Alternative 5: 59.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 27:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\ \mathbf{elif}\;t \leq 6.3 \cdot 10^{+78}:\\ \;\;\;\;\sqrt{{y}^{2} \cdot \left(z \cdot 2\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(z \cdot 2\right)}^{3}\right)}^{0.16666666666666666} \cdot \left(-y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t 27.0)
   (* (- (* x 0.5) y) (sqrt (* z 2.0)))
   (if (<= t 6.3e+78)
     (sqrt (* (pow y 2.0) (* z 2.0)))
     (* (pow (pow (* z 2.0) 3.0) 0.16666666666666666) (- y)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 27.0) {
		tmp = ((x * 0.5) - y) * sqrt((z * 2.0));
	} else if (t <= 6.3e+78) {
		tmp = sqrt((pow(y, 2.0) * (z * 2.0)));
	} else {
		tmp = pow(pow((z * 2.0), 3.0), 0.16666666666666666) * -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) :: tmp
    if (t <= 27.0d0) then
        tmp = ((x * 0.5d0) - y) * sqrt((z * 2.0d0))
    else if (t <= 6.3d+78) then
        tmp = sqrt(((y ** 2.0d0) * (z * 2.0d0)))
    else
        tmp = (((z * 2.0d0) ** 3.0d0) ** 0.16666666666666666d0) * -y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 27.0) {
		tmp = ((x * 0.5) - y) * Math.sqrt((z * 2.0));
	} else if (t <= 6.3e+78) {
		tmp = Math.sqrt((Math.pow(y, 2.0) * (z * 2.0)));
	} else {
		tmp = Math.pow(Math.pow((z * 2.0), 3.0), 0.16666666666666666) * -y;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= 27.0:
		tmp = ((x * 0.5) - y) * math.sqrt((z * 2.0))
	elif t <= 6.3e+78:
		tmp = math.sqrt((math.pow(y, 2.0) * (z * 2.0)))
	else:
		tmp = math.pow(math.pow((z * 2.0), 3.0), 0.16666666666666666) * -y
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 27.0)
		tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0)));
	elseif (t <= 6.3e+78)
		tmp = sqrt(Float64((y ^ 2.0) * Float64(z * 2.0)));
	else
		tmp = Float64(((Float64(z * 2.0) ^ 3.0) ^ 0.16666666666666666) * Float64(-y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= 27.0)
		tmp = ((x * 0.5) - y) * sqrt((z * 2.0));
	elseif (t <= 6.3e+78)
		tmp = sqrt(((y ^ 2.0) * (z * 2.0)));
	else
		tmp = (((z * 2.0) ^ 3.0) ^ 0.16666666666666666) * -y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, 27.0], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.3e+78], N[Sqrt[N[(N[Power[y, 2.0], $MachinePrecision] * N[(z * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Power[N[Power[N[(z * 2.0), $MachinePrecision], 3.0], $MachinePrecision], 0.16666666666666666], $MachinePrecision] * (-y)), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 27:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\

\mathbf{elif}\;t \leq 6.3 \cdot 10^{+78}:\\
\;\;\;\;\sqrt{{y}^{2} \cdot \left(z \cdot 2\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left({\left(z \cdot 2\right)}^{3}\right)}^{0.16666666666666666} \cdot \left(-y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 27

    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. exp-sqrt99.7%

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

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

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

    if 27 < t < 6.3000000000000002e78

    1. Initial program 94.1%

      \[\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. *-commutative94.1%

        \[\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. exp-sqrt100.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)} \]
    8. Step-by-step derivation
      1. expm1-log1p-u2.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)\right)\right)} \]
      2. expm1-udef2.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)\right)} - 1} \]
    9. Applied egg-rr1.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \sqrt{z \cdot 2}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def1.2%

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

        \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
    11. Simplified1.7%

      \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
    12. Step-by-step derivation
      1. add-sqr-sqrt1.0%

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{{y}^{2}}} \]
    13. Applied egg-rr53.7%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot z\right) \cdot {y}^{2}}} \]
    14. Step-by-step derivation
      1. *-commutative53.7%

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

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

    if 6.3000000000000002e78 < 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. exp-sqrt100.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(-\color{blue}{{\left(z \cdot 2\right)}^{0.5}}\right) \]
      4. metadata-eval6.7%

        \[\leadsto y \cdot \left(-{\left(z \cdot 2\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}}\right) \]
      5. pow-pow12.7%

        \[\leadsto y \cdot \left(-\color{blue}{{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{0.3333333333333333}}\right) \]
      6. sqr-pow12.7%

        \[\leadsto y \cdot \left(-\color{blue}{{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{\left(\frac{0.3333333333333333}{2}\right)} \cdot {\left({\left(z \cdot 2\right)}^{1.5}\right)}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \]
      7. pow-prod-down20.7%

        \[\leadsto y \cdot \left(-\color{blue}{{\left({\left(z \cdot 2\right)}^{1.5} \cdot {\left(z \cdot 2\right)}^{1.5}\right)}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \]
      8. *-commutative20.7%

        \[\leadsto y \cdot \left(-{\left({\color{blue}{\left(2 \cdot z\right)}}^{1.5} \cdot {\left(z \cdot 2\right)}^{1.5}\right)}^{\left(\frac{0.3333333333333333}{2}\right)}\right) \]
      9. *-commutative20.7%

        \[\leadsto y \cdot \left(-{\left({\left(2 \cdot z\right)}^{1.5} \cdot {\color{blue}{\left(2 \cdot z\right)}}^{1.5}\right)}^{\left(\frac{0.3333333333333333}{2}\right)}\right) \]
      10. pow-prod-up20.7%

        \[\leadsto y \cdot \left(-{\color{blue}{\left({\left(2 \cdot z\right)}^{\left(1.5 + 1.5\right)}\right)}}^{\left(\frac{0.3333333333333333}{2}\right)}\right) \]
      11. *-commutative20.7%

        \[\leadsto y \cdot \left(-{\left({\color{blue}{\left(z \cdot 2\right)}}^{\left(1.5 + 1.5\right)}\right)}^{\left(\frac{0.3333333333333333}{2}\right)}\right) \]
      12. metadata-eval20.7%

        \[\leadsto y \cdot \left(-{\left({\left(z \cdot 2\right)}^{\color{blue}{3}}\right)}^{\left(\frac{0.3333333333333333}{2}\right)}\right) \]
      13. metadata-eval20.7%

        \[\leadsto y \cdot \left(-{\left({\left(z \cdot 2\right)}^{3}\right)}^{\color{blue}{0.16666666666666666}}\right) \]
    9. Applied egg-rr20.7%

      \[\leadsto y \cdot \left(-\color{blue}{{\left({\left(z \cdot 2\right)}^{3}\right)}^{0.16666666666666666}}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 27:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\ \mathbf{elif}\;t \leq 6.3 \cdot 10^{+78}:\\ \;\;\;\;\sqrt{{y}^{2} \cdot \left(z \cdot 2\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(z \cdot 2\right)}^{3}\right)}^{0.16666666666666666} \cdot \left(-y\right)\\ \end{array} \]

Alternative 6: 57.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.85 \cdot 10^{+72}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{z \cdot \left(0.5 \cdot {x}^{2}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.8500000000000001e72

    1. Initial program 99.3%

      \[\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.3%

        \[\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. exp-sqrt99.8%

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

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

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

    if 1.8500000000000001e72 < 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. exp-sqrt100.0%

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt1.0%

        \[\leadsto \color{blue}{\sqrt{0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \cdot \sqrt{0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)}} \]
      2. sqrt-unprod11.4%

        \[\leadsto \color{blue}{\sqrt{\left(0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right) \cdot \left(0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)}} \]
      3. *-commutative11.4%

        \[\leadsto \sqrt{\color{blue}{\left(\left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right) \cdot 0.5\right)} \cdot \left(0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \]
      4. *-commutative11.4%

        \[\leadsto \sqrt{\left(\left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right) \cdot 0.5\right) \cdot \color{blue}{\left(\left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right) \cdot 0.5\right)}} \]
      5. swap-sqr11.4%

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

        \[\leadsto \sqrt{\left(\color{blue}{\left(\sqrt{z} \cdot \left(x \cdot \sqrt{2}\right)\right)} \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      7. *-commutative11.4%

        \[\leadsto \sqrt{\left(\left(\sqrt{z} \cdot \left(x \cdot \sqrt{2}\right)\right) \cdot \color{blue}{\left(\sqrt{z} \cdot \left(x \cdot \sqrt{2}\right)\right)}\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      8. swap-sqr17.3%

        \[\leadsto \sqrt{\color{blue}{\left(\left(\sqrt{z} \cdot \sqrt{z}\right) \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \left(x \cdot \sqrt{2}\right)\right)\right)} \cdot \left(0.5 \cdot 0.5\right)} \]
      9. add-sqr-sqrt17.3%

        \[\leadsto \sqrt{\left(\color{blue}{z} \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \left(x \cdot \sqrt{2}\right)\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      10. *-commutative17.3%

        \[\leadsto \sqrt{\left(z \cdot \left(\color{blue}{\left(\sqrt{2} \cdot x\right)} \cdot \left(x \cdot \sqrt{2}\right)\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      11. *-commutative17.3%

        \[\leadsto \sqrt{\left(z \cdot \left(\left(\sqrt{2} \cdot x\right) \cdot \color{blue}{\left(\sqrt{2} \cdot x\right)}\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      12. swap-sqr17.3%

        \[\leadsto \sqrt{\left(z \cdot \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(x \cdot x\right)\right)}\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      13. rem-square-sqrt17.3%

        \[\leadsto \sqrt{\left(z \cdot \left(\color{blue}{2} \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      14. pow217.3%

        \[\leadsto \sqrt{\left(z \cdot \left(2 \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \left(0.5 \cdot 0.5\right)} \]
      15. metadata-eval17.3%

        \[\leadsto \sqrt{\left(z \cdot \left(2 \cdot {x}^{2}\right)\right) \cdot \color{blue}{0.25}} \]
    7. Applied egg-rr17.3%

      \[\leadsto \color{blue}{\sqrt{\left(z \cdot \left(2 \cdot {x}^{2}\right)\right) \cdot 0.25}} \]
    8. Step-by-step derivation
      1. associate-*l*17.3%

        \[\leadsto \sqrt{\color{blue}{z \cdot \left(\left(2 \cdot {x}^{2}\right) \cdot 0.25\right)}} \]
      2. *-commutative17.3%

        \[\leadsto \sqrt{z \cdot \left(\color{blue}{\left({x}^{2} \cdot 2\right)} \cdot 0.25\right)} \]
      3. associate-*l*17.3%

        \[\leadsto \sqrt{z \cdot \color{blue}{\left({x}^{2} \cdot \left(2 \cdot 0.25\right)\right)}} \]
      4. metadata-eval17.3%

        \[\leadsto \sqrt{z \cdot \left({x}^{2} \cdot \color{blue}{0.5}\right)} \]
    9. Simplified17.3%

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

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

Alternative 7: 57.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 14.6:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{{y}^{2} \cdot \left(z \cdot 2\right)}\\


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

    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. exp-sqrt99.7%

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

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

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

    if 14.5999999999999996 < t

    1. Initial program 98.4%

      \[\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. *-commutative98.4%

        \[\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. exp-sqrt100.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)\right)\right)} \]
      2. expm1-udef3.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)\right)} - 1} \]
    9. Applied egg-rr1.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \sqrt{z \cdot 2}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def1.0%

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

        \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
    11. Simplified1.3%

      \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
    12. Step-by-step derivation
      1. add-sqr-sqrt0.7%

        \[\leadsto \color{blue}{\sqrt{y \cdot \sqrt{z \cdot 2}} \cdot \sqrt{y \cdot \sqrt{z \cdot 2}}} \]
      2. sqrt-unprod13.9%

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot z\right)} \cdot \left(y \cdot y\right)} \]
      8. pow219.9%

        \[\leadsto \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{{y}^{2}}} \]
    13. Applied egg-rr19.9%

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

        \[\leadsto \sqrt{\color{blue}{{y}^{2} \cdot \left(2 \cdot z\right)}} \]
    15. Simplified19.9%

      \[\leadsto \color{blue}{\sqrt{{y}^{2} \cdot \left(2 \cdot z\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.1%

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

Alternative 8: 42.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{z \cdot 2}\\ \mathbf{if}\;y \leq -3.8 \cdot 10^{+16} \lor \neg \left(y \leq 1.85 \cdot 10^{-38}\right):\\ \;\;\;\;y \cdot \left(-t_1\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot t_1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (sqrt (* z 2.0))))
   (if (or (<= y -3.8e+16) (not (<= y 1.85e-38)))
     (* y (- t_1))
     (* 0.5 (* x t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = sqrt((z * 2.0));
	double tmp;
	if ((y <= -3.8e+16) || !(y <= 1.85e-38)) {
		tmp = y * -t_1;
	} else {
		tmp = 0.5 * (x * 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) :: tmp
    t_1 = sqrt((z * 2.0d0))
    if ((y <= (-3.8d+16)) .or. (.not. (y <= 1.85d-38))) then
        tmp = y * -t_1
    else
        tmp = 0.5d0 * (x * t_1)
    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 ((y <= -3.8e+16) || !(y <= 1.85e-38)) {
		tmp = y * -t_1;
	} else {
		tmp = 0.5 * (x * t_1);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = math.sqrt((z * 2.0))
	tmp = 0
	if (y <= -3.8e+16) or not (y <= 1.85e-38):
		tmp = y * -t_1
	else:
		tmp = 0.5 * (x * t_1)
	return tmp
function code(x, y, z, t)
	t_1 = sqrt(Float64(z * 2.0))
	tmp = 0.0
	if ((y <= -3.8e+16) || !(y <= 1.85e-38))
		tmp = Float64(y * Float64(-t_1));
	else
		tmp = Float64(0.5 * Float64(x * t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = sqrt((z * 2.0));
	tmp = 0.0;
	if ((y <= -3.8e+16) || ~((y <= 1.85e-38)))
		tmp = y * -t_1;
	else
		tmp = 0.5 * (x * t_1);
	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[y, -3.8e+16], N[Not[LessEqual[y, 1.85e-38]], $MachinePrecision]], N[(y * (-t$95$1)), $MachinePrecision], N[(0.5 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+16} \lor \neg \left(y \leq 1.85 \cdot 10^{-38}\right):\\
\;\;\;\;y \cdot \left(-t_1\right)\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot t_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.8e16 or 1.85e-38 < y

    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. exp-sqrt99.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{0 - y \cdot \sqrt{2 \cdot z}} \]
      4. *-commutative43.6%

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

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

        \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
      2. *-commutative43.6%

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

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

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

    if -3.8e16 < y < 1.85e-38

    1. Initial program 99.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. *-commutative99.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*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. exp-sqrt99.8%

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \]
    6. Step-by-step derivation
      1. expm1-log1p-u29.6%

        \[\leadsto 0.5 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \]
      2. expm1-udef18.7%

        \[\leadsto 0.5 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} - 1\right)} \]
      3. *-commutative18.7%

        \[\leadsto 0.5 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\sqrt{z} \cdot \left(x \cdot \sqrt{2}\right)}\right)} - 1\right) \]
      4. *-commutative18.7%

        \[\leadsto 0.5 \cdot \left(e^{\mathsf{log1p}\left(\sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot x\right)}\right)} - 1\right) \]
      5. associate-*r*18.7%

        \[\leadsto 0.5 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{2}\right) \cdot x}\right)} - 1\right) \]
      6. sqrt-prod18.7%

        \[\leadsto 0.5 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\sqrt{z \cdot 2}} \cdot x\right)} - 1\right) \]
      7. *-commutative18.7%

        \[\leadsto 0.5 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{x \cdot \sqrt{z \cdot 2}}\right)} - 1\right) \]
      8. *-commutative18.7%

        \[\leadsto 0.5 \cdot \left(e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{2 \cdot z}}\right)} - 1\right) \]
    7. Applied egg-rr18.7%

      \[\leadsto 0.5 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \sqrt{2 \cdot z}\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def29.7%

        \[\leadsto 0.5 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \sqrt{2 \cdot z}\right)\right)} \]
      2. expm1-log1p44.6%

        \[\leadsto 0.5 \cdot \color{blue}{\left(x \cdot \sqrt{2 \cdot z}\right)} \]
    9. Simplified44.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+16} \lor \neg \left(y \leq 1.85 \cdot 10^{-38}\right):\\ \;\;\;\;y \cdot \left(-\sqrt{z \cdot 2}\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \sqrt{z \cdot 2}\right)\\ \end{array} \]

Alternative 9: 56.8% accurate, 2.0× speedup?

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

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

    \[\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.4%

      \[\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. exp-sqrt99.8%

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

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

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

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

Alternative 10: 29.2% accurate, 2.0× speedup?

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

\\
y \cdot \left(-\sqrt{z \cdot 2}\right)
\end{array}
Derivation
  1. Initial program 99.4%

    \[\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.4%

      \[\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. exp-sqrt99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 2.6% accurate, 2.0× speedup?

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

\\
y \cdot \sqrt{z \cdot 2}
\end{array}
Derivation
  1. Initial program 99.4%

    \[\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.4%

      \[\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. exp-sqrt99.8%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)} \]
  8. Step-by-step derivation
    1. expm1-log1p-u16.5%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \left(-\sqrt{2} \cdot \sqrt{z}\right)\right)} - 1} \]
  9. Applied egg-rr2.4%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \sqrt{z \cdot 2}\right)} - 1} \]
  10. Step-by-step derivation
    1. expm1-def2.5%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \sqrt{z \cdot 2}\right)\right)} \]
    2. expm1-log1p2.8%

      \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
  11. Simplified2.8%

    \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
  12. Final simplification2.8%

    \[\leadsto y \cdot \sqrt{z \cdot 2} \]

Developer target: 99.4% 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 2023322 
(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))))