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

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot {\left(e^{t}\right)}^{t}}
\end{array}
Derivation
  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. 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. Add Preprocessing
  5. Step-by-step derivation
    1. pow199.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.7× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot e^{{t}^{2}}}
\end{array}
Derivation
  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. 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. Add Preprocessing
  5. Step-by-step derivation
    1. pow199.8%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \cdot t \leq 0.0001:\\ \;\;\;\;t\_1 \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\ \mathbf{elif}\;t \cdot t \leq 10^{+268}:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= (* t t) 0.0001)
     (* t_1 (sqrt (* (* 2.0 z) (fma t t 1.0))))
     (if (<= (* t t) 1e+268)
       (* (exp (/ (* t t) 2.0)) (* 0.5 (* x (sqrt (* 2.0 z)))))
       (* t_1 (sqrt (* (* 2.0 z) (pow t 2.0))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if ((t * t) <= 0.0001) {
		tmp = t_1 * sqrt(((2.0 * z) * fma(t, t, 1.0)));
	} else if ((t * t) <= 1e+268) {
		tmp = exp(((t * t) / 2.0)) * (0.5 * (x * sqrt((2.0 * z))));
	} else {
		tmp = t_1 * sqrt(((2.0 * z) * pow(t, 2.0)));
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (Float64(t * t) <= 0.0001)
		tmp = Float64(t_1 * sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))));
	elseif (Float64(t * t) <= 1e+268)
		tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(0.5 * Float64(x * sqrt(Float64(2.0 * z)))));
	else
		tmp = Float64(t_1 * sqrt(Float64(Float64(2.0 * z) * (t ^ 2.0))));
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 0.0001], N[(t$95$1 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 1e+268], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(0.5 * N[(x * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 0.0001:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\

\mathbf{elif}\;t \cdot t \leq 10^{+268}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 t t) < 1.00000000000000005e-4

    1. Initial program 99.6%

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

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

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. pow199.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    11. Simplified99.3%

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

    if 1.00000000000000005e-4 < (*.f64 t t) < 9.9999999999999997e267

    1. Initial program 98.2%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 75.9%

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

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

        \[\leadsto \left(0.5 \cdot {\color{blue}{\left(x \cdot \left(\sqrt{2} \cdot \sqrt{z}\right)\right)}}^{1}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      3. *-commutative75.9%

        \[\leadsto \left(0.5 \cdot {\left(x \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{2}\right)}\right)}^{1}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      4. sqrt-unprod75.9%

        \[\leadsto \left(0.5 \cdot {\left(x \cdot \color{blue}{\sqrt{z \cdot 2}}\right)}^{1}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      5. *-commutative75.9%

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

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

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

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

    if 9.9999999999999997e267 < (*.f64 t t)

    1. Initial program 98.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. 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. Add Preprocessing
    5. Step-by-step derivation
      1. pow1100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    11. Simplified96.3%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    12. Taylor expanded in t around inf 96.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot t \leq 0.0001:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\ \mathbf{elif}\;t \cdot t \leq 10^{+268}:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 91.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{2 \cdot z}\\ t_2 := x \cdot 0.5 - y\\ \mathbf{if}\;t \cdot t \leq 0.0001:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot \mathsf{hypot}\left(1, t\right)\right)\\ \mathbf{elif}\;t \cdot t \leq 10^{+268}:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot t\_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (sqrt (* 2.0 z))) (t_2 (- (* x 0.5) y)))
   (if (<= (* t t) 0.0001)
     (* t_2 (* t_1 (hypot 1.0 t)))
     (if (<= (* t t) 1e+268)
       (* (exp (/ (* t t) 2.0)) (* 0.5 (* x t_1)))
       (* t_2 (sqrt (* (* 2.0 z) (pow t 2.0))))))))
double code(double x, double y, double z, double t) {
	double t_1 = sqrt((2.0 * z));
	double t_2 = (x * 0.5) - y;
	double tmp;
	if ((t * t) <= 0.0001) {
		tmp = t_2 * (t_1 * hypot(1.0, t));
	} else if ((t * t) <= 1e+268) {
		tmp = exp(((t * t) / 2.0)) * (0.5 * (x * t_1));
	} else {
		tmp = t_2 * sqrt(((2.0 * z) * pow(t, 2.0)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = Math.sqrt((2.0 * z));
	double t_2 = (x * 0.5) - y;
	double tmp;
	if ((t * t) <= 0.0001) {
		tmp = t_2 * (t_1 * Math.hypot(1.0, t));
	} else if ((t * t) <= 1e+268) {
		tmp = Math.exp(((t * t) / 2.0)) * (0.5 * (x * t_1));
	} else {
		tmp = t_2 * Math.sqrt(((2.0 * z) * Math.pow(t, 2.0)));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = math.sqrt((2.0 * z))
	t_2 = (x * 0.5) - y
	tmp = 0
	if (t * t) <= 0.0001:
		tmp = t_2 * (t_1 * math.hypot(1.0, t))
	elif (t * t) <= 1e+268:
		tmp = math.exp(((t * t) / 2.0)) * (0.5 * (x * t_1))
	else:
		tmp = t_2 * math.sqrt(((2.0 * z) * math.pow(t, 2.0)))
	return tmp
function code(x, y, z, t)
	t_1 = sqrt(Float64(2.0 * z))
	t_2 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (Float64(t * t) <= 0.0001)
		tmp = Float64(t_2 * Float64(t_1 * hypot(1.0, t)));
	elseif (Float64(t * t) <= 1e+268)
		tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(0.5 * Float64(x * t_1)));
	else
		tmp = Float64(t_2 * sqrt(Float64(Float64(2.0 * z) * (t ^ 2.0))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = sqrt((2.0 * z));
	t_2 = (x * 0.5) - y;
	tmp = 0.0;
	if ((t * t) <= 0.0001)
		tmp = t_2 * (t_1 * hypot(1.0, t));
	elseif ((t * t) <= 1e+268)
		tmp = exp(((t * t) / 2.0)) * (0.5 * (x * t_1));
	else
		tmp = t_2 * sqrt(((2.0 * z) * (t ^ 2.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 0.0001], N[(t$95$2 * N[(t$95$1 * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 1e+268], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(0.5 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
t_2 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 0.0001:\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot \mathsf{hypot}\left(1, t\right)\right)\\

\mathbf{elif}\;t \cdot t \leq 10^{+268}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot t\_1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 t t) < 1.00000000000000005e-4

    1. Initial program 99.6%

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

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

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. pow199.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    11. Simplified99.3%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    12. Step-by-step derivation
      1. sqrt-prod99.2%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{2 \cdot z} \cdot \sqrt{\mathsf{fma}\left(t, t, 1\right)}\right)} \]
    13. Applied egg-rr99.2%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{2 \cdot z} \cdot \sqrt{\mathsf{fma}\left(t, t, 1\right)}\right)} \]
    14. Step-by-step derivation
      1. fma-undefine99.2%

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{2 \cdot z} \cdot \color{blue}{\mathsf{hypot}\left(1, t\right)}\right) \]
    15. Simplified99.3%

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

    if 1.00000000000000005e-4 < (*.f64 t t) < 9.9999999999999997e267

    1. Initial program 98.2%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 75.9%

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

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

        \[\leadsto \left(0.5 \cdot {\color{blue}{\left(x \cdot \left(\sqrt{2} \cdot \sqrt{z}\right)\right)}}^{1}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      3. *-commutative75.9%

        \[\leadsto \left(0.5 \cdot {\left(x \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{2}\right)}\right)}^{1}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      4. sqrt-unprod75.9%

        \[\leadsto \left(0.5 \cdot {\left(x \cdot \color{blue}{\sqrt{z \cdot 2}}\right)}^{1}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      5. *-commutative75.9%

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

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

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

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

    if 9.9999999999999997e267 < (*.f64 t t)

    1. Initial program 98.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. 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. Add Preprocessing
    5. Step-by-step derivation
      1. pow1100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    11. Simplified96.3%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    12. Taylor expanded in t around inf 96.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot t \leq 0.0001:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right)\\ \mathbf{elif}\;t \cdot t \leq 10^{+268}:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 77.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 10^{+87}:\\ \;\;\;\;t\_1 \cdot \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 1e+87)
     (* t_1 (* (sqrt (* 2.0 z)) (hypot 1.0 t)))
     (* t_1 (sqrt (* (* 2.0 z) (pow t 2.0)))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 1e+87) {
		tmp = t_1 * (sqrt((2.0 * z)) * hypot(1.0, t));
	} else {
		tmp = t_1 * sqrt(((2.0 * z) * pow(t, 2.0)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 1e+87) {
		tmp = t_1 * (Math.sqrt((2.0 * z)) * Math.hypot(1.0, t));
	} else {
		tmp = t_1 * Math.sqrt(((2.0 * z) * Math.pow(t, 2.0)));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	tmp = 0
	if t <= 1e+87:
		tmp = t_1 * (math.sqrt((2.0 * z)) * math.hypot(1.0, t))
	else:
		tmp = t_1 * math.sqrt(((2.0 * z) * math.pow(t, 2.0)))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 1e+87)
		tmp = Float64(t_1 * Float64(sqrt(Float64(2.0 * z)) * hypot(1.0, t)));
	else
		tmp = Float64(t_1 * sqrt(Float64(Float64(2.0 * z) * (t ^ 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 <= 1e+87)
		tmp = t_1 * (sqrt((2.0 * z)) * hypot(1.0, t));
	else
		tmp = t_1 * sqrt(((2.0 * z) * (t ^ 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, 1e+87], N[(t$95$1 * N[(N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision] * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 10^{+87}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right)\\

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


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

    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. 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. Add Preprocessing
    5. Step-by-step derivation
      1. pow199.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    11. Simplified84.0%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    12. Step-by-step derivation
      1. sqrt-prod82.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{2 \cdot z} \cdot \sqrt{\mathsf{fma}\left(t, t, 1\right)}\right)} \]
    13. Applied egg-rr82.6%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{2 \cdot z} \cdot \sqrt{\mathsf{fma}\left(t, t, 1\right)}\right)} \]
    14. Step-by-step derivation
      1. fma-undefine82.6%

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{2 \cdot z} \cdot \color{blue}{\mathsf{hypot}\left(1, t\right)}\right) \]
    15. Simplified77.0%

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

    if 9.9999999999999996e86 < t

    1. Initial program 96.2%

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. pow1100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    11. Simplified85.2%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    12. Taylor expanded in t around inf 85.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 10^{+87}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 70.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 1:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 1.0)
     (* t_1 (sqrt (* 2.0 z)))
     (* t_1 (sqrt (* (* 2.0 z) (pow t 2.0)))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 1.0) {
		tmp = t_1 * sqrt((2.0 * z));
	} else {
		tmp = t_1 * sqrt(((2.0 * z) * pow(t, 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 <= 1.0d0) then
        tmp = t_1 * sqrt((2.0d0 * z))
    else
        tmp = t_1 * sqrt(((2.0d0 * z) * (t ** 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 <= 1.0) {
		tmp = t_1 * Math.sqrt((2.0 * z));
	} else {
		tmp = t_1 * Math.sqrt(((2.0 * z) * Math.pow(t, 2.0)));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	tmp = 0
	if t <= 1.0:
		tmp = t_1 * math.sqrt((2.0 * z))
	else:
		tmp = t_1 * math.sqrt(((2.0 * z) * math.pow(t, 2.0)))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 1.0)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	else
		tmp = Float64(t_1 * sqrt(Float64(Float64(2.0 * z) * (t ^ 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 <= 1.0)
		tmp = t_1 * sqrt((2.0 * z));
	else
		tmp = t_1 * sqrt(((2.0 * z) * (t ^ 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, 1.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    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. associate-*l*99.7%

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

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. pow199.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1 < t

    1. Initial program 97.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. 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. Add Preprocessing
    5. Step-by-step derivation
      1. pow1100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    11. Simplified68.9%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    12. Taylor expanded in t around inf 68.9%

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

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

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

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

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

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

Alternative 7: 65.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 1:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 1.0)
     (* t_1 (sqrt (* 2.0 z)))
     (* (* t (* t_1 (sqrt 2.0))) (sqrt z)))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 1.0) {
		tmp = t_1 * sqrt((2.0 * z));
	} else {
		tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
	}
	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 <= 1.0d0) then
        tmp = t_1 * sqrt((2.0d0 * z))
    else
        tmp = (t * (t_1 * sqrt(2.0d0))) * sqrt(z)
    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 <= 1.0) {
		tmp = t_1 * Math.sqrt((2.0 * z));
	} else {
		tmp = (t * (t_1 * Math.sqrt(2.0))) * Math.sqrt(z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	tmp = 0
	if t <= 1.0:
		tmp = t_1 * math.sqrt((2.0 * z))
	else:
		tmp = (t * (t_1 * math.sqrt(2.0))) * math.sqrt(z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 1.0)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	else
		tmp = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x * 0.5) - y;
	tmp = 0.0;
	if (t <= 1.0)
		tmp = t_1 * sqrt((2.0 * z));
	else
		tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
	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, 1.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\


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

    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. associate-*l*99.7%

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

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. pow199.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1 < t

    1. Initial program 97.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. 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. Add Preprocessing
    5. Step-by-step derivation
      1. pow1100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    11. Simplified68.9%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    12. Taylor expanded in t around inf 51.3%

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

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

Alternative 8: 99.5% accurate, 1.0× speedup?

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

\\
e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\right)
\end{array}
Derivation
  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. Add Preprocessing
  3. Final simplification99.0%

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

Alternative 9: 64.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ t_2 := \sqrt{2 \cdot z}\\ \mathbf{if}\;t \leq 1:\\ \;\;\;\;t\_1 \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \left(t \cdot t\_2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* 2.0 z))))
   (if (<= t 1.0) (* t_1 t_2) (* t_1 (* t t_2)))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double t_2 = sqrt((2.0 * z));
	double tmp;
	if (t <= 1.0) {
		tmp = t_1 * t_2;
	} else {
		tmp = t_1 * (t * t_2);
	}
	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((2.0d0 * z))
    if (t <= 1.0d0) then
        tmp = t_1 * t_2
    else
        tmp = t_1 * (t * t_2)
    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((2.0 * z));
	double tmp;
	if (t <= 1.0) {
		tmp = t_1 * t_2;
	} else {
		tmp = t_1 * (t * t_2);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	t_2 = math.sqrt((2.0 * z))
	tmp = 0
	if t <= 1.0:
		tmp = t_1 * t_2
	else:
		tmp = t_1 * (t * t_2)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	t_2 = sqrt(Float64(2.0 * z))
	tmp = 0.0
	if (t <= 1.0)
		tmp = Float64(t_1 * t_2);
	else
		tmp = Float64(t_1 * Float64(t * t_2));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x * 0.5) - y;
	t_2 = sqrt((2.0 * z));
	tmp = 0.0;
	if (t <= 1.0)
		tmp = t_1 * t_2;
	else
		tmp = t_1 * (t * t_2);
	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[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.0], N[(t$95$1 * t$95$2), $MachinePrecision], N[(t$95$1 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(t \cdot t\_2\right)\\


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

    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. associate-*l*99.7%

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

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. pow199.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1 < t

    1. Initial program 97.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. 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. Add Preprocessing
    5. Step-by-step derivation
      1. pow1100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    11. Simplified68.9%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    12. Taylor expanded in t around inf 47.2%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\left(t \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \]
    13. Step-by-step derivation
      1. associate-*l*47.2%

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(t \cdot \left(\sqrt{2} \cdot \sqrt{z}\right)\right)} \]
    15. Step-by-step derivation
      1. sqrt-prod47.2%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(t \cdot \color{blue}{\sqrt{2 \cdot z}}\right) \]
      2. pow1/247.2%

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(t \cdot \color{blue}{{\left(2 \cdot z\right)}^{0.5}}\right) \]
    17. Step-by-step derivation
      1. unpow1/247.2%

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

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

Alternative 10: 63.6% accurate, 1.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t \cdot t\_1\\


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

    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. associate-*l*99.7%

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

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. pow199.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1 < t

    1. Initial program 97.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. 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. Add Preprocessing
    5. Step-by-step derivation
      1. pow1100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    11. Simplified68.9%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{\mathsf{fma}\left(t, t, 1\right)}} \]
    12. Taylor expanded in t around inf 47.2%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\left(t \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \]
    13. Step-by-step derivation
      1. associate-*l*47.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(x \cdot 0.5\right) \cdot \sqrt{2 \cdot z}\right) \cdot t} + \left(-y\right) \cdot \left(\sqrt{2 \cdot z} \cdot t\right) \]
      4. associate-*r*42.9%

        \[\leadsto \color{blue}{\left(x \cdot \left(0.5 \cdot \sqrt{2 \cdot z}\right)\right)} \cdot t + \left(-y\right) \cdot \left(\sqrt{2 \cdot z} \cdot t\right) \]
      5. associate-*r*43.0%

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

        \[\leadsto \color{blue}{t \cdot \left(x \cdot \left(0.5 \cdot \sqrt{2 \cdot z}\right) + \left(-y\right) \cdot \sqrt{2 \cdot z}\right)} \]
      7. associate-*r*47.2%

        \[\leadsto t \cdot \left(\color{blue}{\left(x \cdot 0.5\right) \cdot \sqrt{2 \cdot z}} + \left(-y\right) \cdot \sqrt{2 \cdot z}\right) \]
      8. distribute-rgt-in47.2%

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

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

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

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

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

Alternative 11: 55.2% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.7000000000000002e114

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{{\left(x \cdot 0.5 - y\right)}^{2}}} \]
      14. fma-neg63.7%

        \[\leadsto \sqrt{\left(2 \cdot z\right) \cdot {\color{blue}{\left(\mathsf{fma}\left(x, 0.5, -y\right)\right)}}^{2}} \]
    5. Applied egg-rr63.7%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot z\right) \cdot {\left(\mathsf{fma}\left(x, 0.5, -y\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. fma-neg63.7%

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot z\right) \cdot \left(\color{blue}{y \cdot y} - x \cdot y\right)} \]
      5. distribute-rgt-out--63.7%

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

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

    if -9.7000000000000002e114 < y

    1. Initial program 98.9%

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. pow199.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 37.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-19}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.80000000000000003e-19

    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. Add Preprocessing
    3. Taylor expanded in t around 0 50.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot z\right) \cdot \color{blue}{{\left(x \cdot 0.5 - y\right)}^{2}}} \]
      14. fma-neg52.7%

        \[\leadsto \sqrt{\left(2 \cdot z\right) \cdot {\color{blue}{\left(\mathsf{fma}\left(x, 0.5, -y\right)\right)}}^{2}} \]
    5. Applied egg-rr52.7%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot z\right) \cdot {\left(\mathsf{fma}\left(x, 0.5, -y\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. fma-neg52.7%

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot z\right) \cdot \left(\color{blue}{y \cdot y} - x \cdot y\right)} \]
      5. distribute-rgt-out--51.3%

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

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

    if -2.80000000000000003e-19 < y

    1. Initial program 98.7%

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

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

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \]
    5. Step-by-step derivation
      1. associate-*r*34.4%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{2} \cdot \left(0.5 \cdot x\right)\right) \cdot \sqrt{z}} \]
    7. Step-by-step derivation
      1. pow134.4%

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

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

        \[\leadsto {\left(\left(\color{blue}{\left(x \cdot 0.5\right)} \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)}^{1} \]
      4. associate-*l*34.4%

        \[\leadsto {\color{blue}{\left(\left(x \cdot 0.5\right) \cdot \left(\sqrt{2} \cdot \sqrt{z}\right)\right)}}^{1} \]
      5. sqrt-prod35.0%

        \[\leadsto {\left(\left(x \cdot 0.5\right) \cdot \color{blue}{\sqrt{2 \cdot z}}\right)}^{1} \]
    8. Applied egg-rr35.0%

      \[\leadsto \color{blue}{{\left(\left(x \cdot 0.5\right) \cdot \sqrt{2 \cdot z}\right)}^{1}} \]
    9. Step-by-step derivation
      1. unpow135.0%

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

        \[\leadsto \color{blue}{\left(0.5 \cdot x\right)} \cdot \sqrt{2 \cdot z} \]
    10. Simplified35.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{-19}:\\ \;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot z} \cdot \left(x \cdot 0.5\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 30.7% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.26 \cdot 10^{+48}:\\
\;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\

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


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

    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. Add Preprocessing
    3. Taylor expanded in t around 0 65.2%

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

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \]
    5. Step-by-step derivation
      1. associate-*r*35.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right) \cdot \left(\left(\sqrt{2} \cdot \left(0.5 \cdot x\right)\right) \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x\right)\right)\right)}} \]
      6. add-sqr-sqrt15.5%

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

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

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

        \[\leadsto \sqrt{z \cdot \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right)\right)\right)}} \]
      10. rem-square-sqrt15.5%

        \[\leadsto \sqrt{z \cdot \left(\color{blue}{2} \cdot \left(\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right)\right)\right)} \]
      11. pow215.5%

        \[\leadsto \sqrt{z \cdot \left(2 \cdot \color{blue}{{\left(x \cdot 0.5\right)}^{2}}\right)} \]
    8. Applied egg-rr15.5%

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

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

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

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

        \[\leadsto \sqrt{z \cdot \color{blue}{\left(\left(\left(x \cdot 0.5\right) \cdot \sqrt{2}\right) \cdot \left(\left(x \cdot 0.5\right) \cdot \sqrt{2}\right)\right)}} \]
      5. associate-*r*15.5%

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

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

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

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

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

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

        \[\leadsto \sqrt{z \cdot \left(\left(\color{blue}{0.25} \cdot \left(\sqrt{2} \cdot \sqrt{2}\right)\right) \cdot \left(x \cdot x\right)\right)} \]
      12. rem-square-sqrt15.5%

        \[\leadsto \sqrt{z \cdot \left(\left(0.25 \cdot \color{blue}{2}\right) \cdot \left(x \cdot x\right)\right)} \]
      13. metadata-eval15.5%

        \[\leadsto \sqrt{z \cdot \left(\color{blue}{0.5} \cdot \left(x \cdot x\right)\right)} \]
    10. Simplified15.5%

      \[\leadsto \color{blue}{\sqrt{z \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)}} \]
    11. Step-by-step derivation
      1. associate-*r*15.5%

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 0.5} \cdot \sqrt{x \cdot x}} \]
      3. *-commutative14.0%

        \[\leadsto \sqrt{\color{blue}{0.5 \cdot z}} \cdot \sqrt{x \cdot x} \]
      4. sqrt-prod16.3%

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \]
      5. add-sqr-sqrt36.0%

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \color{blue}{x} \]
    12. Applied egg-rr36.0%

      \[\leadsto \color{blue}{\sqrt{0.5 \cdot z} \cdot x} \]

    if 1.26000000000000001e48 < t

    1. Initial program 96.7%

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

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

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \]
    5. Step-by-step derivation
      1. associate-*r*8.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right) \cdot \left(\left(\sqrt{2} \cdot \left(0.5 \cdot x\right)\right) \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x\right)\right)\right)}} \]
      6. add-sqr-sqrt11.1%

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

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

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

        \[\leadsto \sqrt{z \cdot \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right)\right)\right)}} \]
      10. rem-square-sqrt11.1%

        \[\leadsto \sqrt{z \cdot \left(\color{blue}{2} \cdot \left(\left(x \cdot 0.5\right) \cdot \left(x \cdot 0.5\right)\right)\right)} \]
      11. pow211.1%

        \[\leadsto \sqrt{z \cdot \left(2 \cdot \color{blue}{{\left(x \cdot 0.5\right)}^{2}}\right)} \]
    8. Applied egg-rr11.1%

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

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

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

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

        \[\leadsto \sqrt{z \cdot \color{blue}{\left(\left(\left(x \cdot 0.5\right) \cdot \sqrt{2}\right) \cdot \left(\left(x \cdot 0.5\right) \cdot \sqrt{2}\right)\right)}} \]
      5. associate-*r*11.1%

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

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

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

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

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

        \[\leadsto \sqrt{z \cdot \left(\color{blue}{\left(\left(0.5 \cdot 0.5\right) \cdot \left(\sqrt{2} \cdot \sqrt{2}\right)\right)} \cdot \left(x \cdot x\right)\right)} \]
      11. metadata-eval11.1%

        \[\leadsto \sqrt{z \cdot \left(\left(\color{blue}{0.25} \cdot \left(\sqrt{2} \cdot \sqrt{2}\right)\right) \cdot \left(x \cdot x\right)\right)} \]
      12. rem-square-sqrt11.1%

        \[\leadsto \sqrt{z \cdot \left(\left(0.25 \cdot \color{blue}{2}\right) \cdot \left(x \cdot x\right)\right)} \]
      13. metadata-eval11.1%

        \[\leadsto \sqrt{z \cdot \left(\color{blue}{0.5} \cdot \left(x \cdot x\right)\right)} \]
    10. Simplified11.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.26 \cdot 10^{+48}:\\ \;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 28.9% accurate, 2.0× speedup?

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

\\
x \cdot \sqrt{0.5 \cdot z}
\end{array}
Derivation
  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. Add Preprocessing
  3. Taylor expanded in t around 0 53.3%

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

    \[\leadsto \color{blue}{0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \]
  5. Step-by-step derivation
    1. associate-*r*29.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\sqrt{z \cdot \left(2 \cdot {\left(x \cdot 0.5\right)}^{2}\right)}} \]
  9. Step-by-step derivation
    1. *-commutative14.4%

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

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

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

      \[\leadsto \sqrt{z \cdot \color{blue}{\left(\left(\left(x \cdot 0.5\right) \cdot \sqrt{2}\right) \cdot \left(\left(x \cdot 0.5\right) \cdot \sqrt{2}\right)\right)}} \]
    5. associate-*r*14.4%

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

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

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

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

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

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

      \[\leadsto \sqrt{z \cdot \left(\left(\color{blue}{0.25} \cdot \left(\sqrt{2} \cdot \sqrt{2}\right)\right) \cdot \left(x \cdot x\right)\right)} \]
    12. rem-square-sqrt14.4%

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

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

    \[\leadsto \color{blue}{\sqrt{z \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)}} \]
  11. Step-by-step derivation
    1. associate-*r*14.4%

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 0.5} \cdot \sqrt{x \cdot x}} \]
    3. *-commutative12.9%

      \[\leadsto \sqrt{\color{blue}{0.5 \cdot z}} \cdot \sqrt{x \cdot x} \]
    4. sqrt-prod13.2%

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

      \[\leadsto \sqrt{0.5 \cdot z} \cdot \color{blue}{x} \]
  12. Applied egg-rr29.3%

    \[\leadsto \color{blue}{\sqrt{0.5 \cdot z} \cdot x} \]
  13. Final simplification29.3%

    \[\leadsto x \cdot \sqrt{0.5 \cdot z} \]
  14. Add Preprocessing

Developer target: 99.5% 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 2024095 
(FPCore (x y z t)
  :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
  :precision binary64

  :alt
  (* (* (- (* 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))))