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

Percentage Accurate: 99.4% → 99.8%
Time: 17.5s
Alternatives: 11
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.7× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{{t}^{2}} \cdot \left(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. 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. *-commutative99.8%

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

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

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

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

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

Alternative 2: 70.3% accurate, 1.0× 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{elif}\;t \leq 2.5 \cdot 10^{+62}:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \sqrt{z \cdot \left(2 \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)
     (if (<= t 2.5e+62)
       (* t_2 (* t_1 t))
       (* t_1 (sqrt (* z (* 2.0 (pow t 2.0)))))))))
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 if (t <= 2.5e+62) {
		tmp = t_2 * (t_1 * t);
	} else {
		tmp = t_1 * sqrt((z * (2.0 * 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) :: 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 if (t <= 2.5d+62) then
        tmp = t_2 * (t_1 * t)
    else
        tmp = t_1 * sqrt((z * (2.0d0 * (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 t_2 = Math.sqrt((2.0 * z));
	double tmp;
	if (t <= 1.0) {
		tmp = t_1 * t_2;
	} else if (t <= 2.5e+62) {
		tmp = t_2 * (t_1 * t);
	} else {
		tmp = t_1 * Math.sqrt((z * (2.0 * Math.pow(t, 2.0))));
	}
	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
	elif t <= 2.5e+62:
		tmp = t_2 * (t_1 * t)
	else:
		tmp = t_1 * math.sqrt((z * (2.0 * math.pow(t, 2.0))))
	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);
	elseif (t <= 2.5e+62)
		tmp = Float64(t_2 * Float64(t_1 * t));
	else
		tmp = Float64(t_1 * sqrt(Float64(z * Float64(2.0 * (t ^ 2.0)))));
	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;
	elseif (t <= 2.5e+62)
		tmp = t_2 * (t_1 * t);
	else
		tmp = t_1 * sqrt((z * (2.0 * (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]}, 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], If[LessEqual[t, 2.5e+62], N[(t$95$2 * N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(z * N[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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{elif}\;t \leq 2.5 \cdot 10^{+62}:\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 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.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1 < t < 2.50000000000000014e62

    1. Initial program 100.0%

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

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. 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. *-commutative100.0%

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\color{blue}{2 \cdot \left(z + z \cdot {t}^{2}\right)}} \]
    12. Taylor expanded in t around inf 4.6%

      \[\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*4.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot z} \cdot \left(t \cdot \mathsf{fma}\left(x, 0.5, -y\right)\right)} \]
      5. *-commutative15.4%

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

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

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

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

    if 2.50000000000000014e62 < t

    1. Initial program 96.0%

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

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. 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. *-commutative100.0%

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\color{blue}{2 \cdot \left(z + z \cdot {t}^{2}\right)}} \]
    12. Taylor expanded in t around inf 43.6%

      \[\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*43.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 78.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ t_2 := \sqrt{2 \cdot z}\\ \mathbf{if}\;t \leq 4.2 \cdot 10^{+33}:\\ \;\;\;\;t\_1 \cdot \left(t\_2 \cdot \mathsf{hypot}\left(1, t\right)\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+63}:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \sqrt{z \cdot \left(2 \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 4.2e+33)
     (* t_1 (* t_2 (hypot 1.0 t)))
     (if (<= t 2.2e+63)
       (* t_2 (* t_1 t))
       (* t_1 (sqrt (* z (* 2.0 (pow t 2.0)))))))))
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 <= 4.2e+33) {
		tmp = t_1 * (t_2 * hypot(1.0, t));
	} else if (t <= 2.2e+63) {
		tmp = t_2 * (t_1 * t);
	} else {
		tmp = t_1 * sqrt((z * (2.0 * 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 t_2 = Math.sqrt((2.0 * z));
	double tmp;
	if (t <= 4.2e+33) {
		tmp = t_1 * (t_2 * Math.hypot(1.0, t));
	} else if (t <= 2.2e+63) {
		tmp = t_2 * (t_1 * t);
	} else {
		tmp = t_1 * Math.sqrt((z * (2.0 * Math.pow(t, 2.0))));
	}
	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 <= 4.2e+33:
		tmp = t_1 * (t_2 * math.hypot(1.0, t))
	elif t <= 2.2e+63:
		tmp = t_2 * (t_1 * t)
	else:
		tmp = t_1 * math.sqrt((z * (2.0 * math.pow(t, 2.0))))
	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 <= 4.2e+33)
		tmp = Float64(t_1 * Float64(t_2 * hypot(1.0, t)));
	elseif (t <= 2.2e+63)
		tmp = Float64(t_2 * Float64(t_1 * t));
	else
		tmp = Float64(t_1 * sqrt(Float64(z * Float64(2.0 * (t ^ 2.0)))));
	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 <= 4.2e+33)
		tmp = t_1 * (t_2 * hypot(1.0, t));
	elseif (t <= 2.2e+63)
		tmp = t_2 * (t_1 * t);
	else
		tmp = t_1 * sqrt((z * (2.0 * (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]}, Block[{t$95$2 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 4.2e+33], N[(t$95$1 * N[(t$95$2 * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+63], N[(t$95$2 * N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(z * N[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 4.2 \cdot 10^{+33}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \mathsf{hypot}\left(1, t\right)\right)\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+63}:\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot t\right)\\

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


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

    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. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    17. Step-by-step derivation
      1. *-commutative81.7%

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

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

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

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

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

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

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

    if 4.2000000000000001e33 < t < 2.1999999999999999e63

    1. Initial program 100.0%

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

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. 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. *-commutative100.0%

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\color{blue}{2 \cdot \left(z + z \cdot {t}^{2}\right)}} \]
    12. Taylor expanded in t around inf 5.5%

      \[\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*5.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot z} \cdot \left(t \cdot \mathsf{fma}\left(x, 0.5, -y\right)\right)} \]
      5. *-commutative25.8%

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

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

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

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

    if 2.1999999999999999e63 < t

    1. Initial program 96.0%

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

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. 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. *-commutative100.0%

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\color{blue}{2 \cdot \left(z + z \cdot {t}^{2}\right)}} \]
    12. Taylor expanded in t around inf 43.6%

      \[\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*43.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 99.4% accurate, 1.0× speedup?

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

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

Alternative 5: 84.5% accurate, 1.0× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z + {t}^{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. 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. *-commutative99.8%

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

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

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

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

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

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

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

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

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

Alternative 6: 84.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z \cdot \mathsf{fma}\left(t, t, 1\right)\right)} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (* (- (* x 0.5) y) (sqrt (* 2.0 (* z (fma t t 1.0))))))
double code(double x, double y, double z, double t) {
	return ((x * 0.5) - y) * sqrt((2.0 * (z * fma(t, t, 1.0))));
}
function code(x, y, z, t)
	return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * Float64(z * fma(t, t, 1.0)))))
end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(z * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z \cdot \mathsf{fma}\left(t, t, 1\right)\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. 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. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z \cdot \mathsf{fma}\left(t, t, 1\right)\right)} \]
  16. Add Preprocessing

Alternative 7: 64.1% 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.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1 < t

    1. Initial program 97.0%

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

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. 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. *-commutative100.0%

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\color{blue}{2 \cdot \left(z + z \cdot {t}^{2}\right)}} \]
    12. Taylor expanded in t around inf 33.7%

      \[\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*33.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t \cdot \sqrt{2 \cdot z}\right) \cdot \color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \]
      3. associate-*l*32.3%

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\sqrt{z \cdot 2} \cdot \left(0.5 \cdot x - y\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.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 8: 66.1% 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\_2 \cdot \left(t\_1 \cdot t\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_2 (* t_1 t)))))
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_2 * (t_1 * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: 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_2 * (t_1 * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double t_2 = Math.sqrt((2.0 * z));
	double tmp;
	if (t <= 1.0) {
		tmp = t_1 * t_2;
	} else {
		tmp = t_2 * (t_1 * t);
	}
	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_2 * (t_1 * t)
	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_2 * Float64(t_1 * t));
	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_2 * (t_1 * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.0], N[(t$95$1 * t$95$2), $MachinePrecision], N[(t$95$2 * N[(t$95$1 * t), $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\_2 \cdot \left(t\_1 \cdot t\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.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1 < t

    1. Initial program 97.0%

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

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{{\left(e^{t}\right)}^{t}}\right)} \]
    4. 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. *-commutative100.0%

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\color{blue}{2 \cdot \left(z + z \cdot {t}^{2}\right)}} \]
    12. Taylor expanded in t around inf 33.7%

      \[\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*33.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 38.1% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+31}:\\ \;\;\;\;\sqrt{z \cdot \left(2 \cdot \left(y \cdot \left(y - x\right)\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 -3e+31)
   (sqrt (* z (* 2.0 (* y (- y x)))))
   (* (sqrt (* 2.0 z)) (* x 0.5))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -3e+31) {
		tmp = sqrt((z * (2.0 * (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 <= (-3d+31)) then
        tmp = sqrt((z * (2.0d0 * (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 <= -3e+31) {
		tmp = Math.sqrt((z * (2.0 * (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 <= -3e+31:
		tmp = math.sqrt((z * (2.0 * (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 <= -3e+31)
		tmp = sqrt(Float64(z * Float64(2.0 * 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 <= -3e+31)
		tmp = sqrt((z * (2.0 * (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, -3e+31], N[Sqrt[N[(z * N[(2.0 * N[(y * N[(y - x), $MachinePrecision]), $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 -3 \cdot 10^{+31}:\\
\;\;\;\;\sqrt{z \cdot \left(2 \cdot \left(y \cdot \left(y - x\right)\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.99999999999999989e31

    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. *-commutative99.6%

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{{\left(2 \cdot z\right)}^{0.5}} \]
      2. exp-to-pow60.9%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{e^{\log \left(2 \cdot z\right) \cdot 0.5}} \]
      3. add-sqr-sqrt56.6%

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right) \cdot \color{blue}{\left(e^{\log \left(2 \cdot z\right) \cdot 0.5} \cdot \left(x \cdot 0.5 - y\right)\right)}} \]
      10. exp-to-pow52.3%

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

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

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

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

        \[\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)} \]
    11. Applied egg-rr44.4%

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

        \[\leadsto \sqrt{\color{blue}{z \cdot \left(2 \cdot {\left(\mathsf{fma}\left(0.5, x, -y\right)\right)}^{2}\right)}} \]
      2. fma-neg44.4%

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

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

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

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

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

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

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

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

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

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

    if -2.99999999999999989e31 < 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.9%

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

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

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

      \[\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. Taylor expanded in t around 0 55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 57.3% accurate, 2.0× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \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. 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. *-commutative99.8%

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

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

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

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

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

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

Alternative 11: 30.5% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \sqrt{2 \cdot z} \cdot \left(x \cdot 0.5\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (* (sqrt (* 2.0 z)) (* x 0.5)))
double code(double x, double y, double z, double t) {
	return sqrt((2.0 * z)) * (x * 0.5);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = sqrt((2.0d0 * z)) * (x * 0.5d0)
end function
public static double code(double x, double y, double z, double t) {
	return Math.sqrt((2.0 * z)) * (x * 0.5);
}
def code(x, y, z, t):
	return math.sqrt((2.0 * z)) * (x * 0.5)
function code(x, y, z, t)
	return Float64(sqrt(Float64(2.0 * z)) * Float64(x * 0.5))
end
function tmp = code(x, y, z, t)
	tmp = sqrt((2.0 * z)) * (x * 0.5);
end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt{2 \cdot z} \cdot \left(x \cdot 0.5\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. 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. Taylor expanded in t around 0 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{2 \cdot z} \cdot \left(x \cdot 0.5\right) \]
  12. Add Preprocessing

Developer target: 99.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot {\left(e^{1}\right)}^{\left(\frac{t \cdot t}{2}\right)} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
	return (((x * 0.5) - y) * sqrt((z * 2.0))) * pow(exp(1.0), ((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * (exp(1.0d0) ** ((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
	return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.pow(Math.exp(1.0), ((t * t) / 2.0));
}
def code(x, y, z, t):
	return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.pow(math.exp(1.0), ((t * t) / 2.0))
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * (exp(1.0) ^ Float64(Float64(t * t) / 2.0)))
end
function tmp = code(x, y, z, t)
	tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * (exp(1.0) ^ ((t * t) / 2.0));
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Exp[1.0], $MachinePrecision], N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Reproduce

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