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

Percentage Accurate: 99.5% → 99.8%
Time: 15.3s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 99.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.7× speedup?

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

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

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Step-by-step derivation
    1. associate-*l*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.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. Step-by-step derivation
    1. pow199.9%

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

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

      \[\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. Step-by-step derivation
    1. pow299.8%

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

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

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

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

Alternative 2: 99.7% accurate, 0.7× speedup?

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

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

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Step-by-step derivation
    1. associate-*l*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.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. Step-by-step derivation
    1. pow199.9%

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

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

      \[\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{\left(2 \cdot z\right) \cdot e^{{t}^{2}}} \]
  10. Add Preprocessing

Alternative 3: 61.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 2700:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+148}:\\ \;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+243}:\\ \;\;\;\;\sqrt{z} \cdot \left(t \cdot \left(\sqrt{2} \cdot \left(-y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(t \cdot \left(x \cdot \left(\sqrt{2} \cdot \sqrt{z}\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 2700.0)
     (* t_1 (sqrt (* 2.0 z)))
     (if (<= t 2.25e+148)
       (sqrt (* 2.0 (* z (* t_1 t_1))))
       (if (<= t 2.1e+243)
         (* (sqrt z) (* t (* (sqrt 2.0) (- y))))
         (* 0.5 (* t (* x (* (sqrt 2.0) (sqrt z))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 2700.0) {
		tmp = t_1 * sqrt((2.0 * z));
	} else if (t <= 2.25e+148) {
		tmp = sqrt((2.0 * (z * (t_1 * t_1))));
	} else if (t <= 2.1e+243) {
		tmp = sqrt(z) * (t * (sqrt(2.0) * -y));
	} else {
		tmp = 0.5 * (t * (x * (sqrt(2.0) * sqrt(z))));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * 0.5d0) - y
    if (t <= 2700.0d0) then
        tmp = t_1 * sqrt((2.0d0 * z))
    else if (t <= 2.25d+148) then
        tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
    else if (t <= 2.1d+243) then
        tmp = sqrt(z) * (t * (sqrt(2.0d0) * -y))
    else
        tmp = 0.5d0 * (t * (x * (sqrt(2.0d0) * sqrt(z))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 2700.0) {
		tmp = t_1 * Math.sqrt((2.0 * z));
	} else if (t <= 2.25e+148) {
		tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
	} else if (t <= 2.1e+243) {
		tmp = Math.sqrt(z) * (t * (Math.sqrt(2.0) * -y));
	} else {
		tmp = 0.5 * (t * (x * (Math.sqrt(2.0) * Math.sqrt(z))));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	tmp = 0
	if t <= 2700.0:
		tmp = t_1 * math.sqrt((2.0 * z))
	elif t <= 2.25e+148:
		tmp = math.sqrt((2.0 * (z * (t_1 * t_1))))
	elif t <= 2.1e+243:
		tmp = math.sqrt(z) * (t * (math.sqrt(2.0) * -y))
	else:
		tmp = 0.5 * (t * (x * (math.sqrt(2.0) * math.sqrt(z))))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 2700.0)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	elseif (t <= 2.25e+148)
		tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1))));
	elseif (t <= 2.1e+243)
		tmp = Float64(sqrt(z) * Float64(t * Float64(sqrt(2.0) * Float64(-y))));
	else
		tmp = Float64(0.5 * Float64(t * Float64(x * Float64(sqrt(2.0) * sqrt(z)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x * 0.5) - y;
	tmp = 0.0;
	if (t <= 2700.0)
		tmp = t_1 * sqrt((2.0 * z));
	elseif (t <= 2.25e+148)
		tmp = sqrt((2.0 * (z * (t_1 * t_1))));
	elseif (t <= 2.1e+243)
		tmp = sqrt(z) * (t * (sqrt(2.0) * -y));
	else
		tmp = 0.5 * (t * (x * (sqrt(2.0) * sqrt(z))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 2700.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e+148], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 2.1e+243], N[(N[Sqrt[z], $MachinePrecision] * N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(t * N[(x * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+148}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\

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

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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.9%

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

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

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

    if 2700 < t < 2.24999999999999997e148

    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 19.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.24999999999999997e148 < t < 2.0999999999999999e243

    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 100.0%

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

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

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

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

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

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

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

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

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

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

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

    if 2.0999999999999999e243 < t

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 61.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 6800:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{+147}:\\ \;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+243}:\\ \;\;\;\;\sqrt{z} \cdot \left(t \cdot \left(\sqrt{2} \cdot \left(-y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(\sqrt{z} \cdot \left(t \cdot \left(x \cdot \sqrt{2}\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 6800.0)
     (* t_1 (sqrt (* 2.0 z)))
     (if (<= t 9.6e+147)
       (sqrt (* 2.0 (* z (* t_1 t_1))))
       (if (<= t 1.02e+243)
         (* (sqrt z) (* t (* (sqrt 2.0) (- y))))
         (* 0.5 (* (sqrt z) (* t (* x (sqrt 2.0))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 6800.0) {
		tmp = t_1 * sqrt((2.0 * z));
	} else if (t <= 9.6e+147) {
		tmp = sqrt((2.0 * (z * (t_1 * t_1))));
	} else if (t <= 1.02e+243) {
		tmp = sqrt(z) * (t * (sqrt(2.0) * -y));
	} else {
		tmp = 0.5 * (sqrt(z) * (t * (x * sqrt(2.0))));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * 0.5d0) - y
    if (t <= 6800.0d0) then
        tmp = t_1 * sqrt((2.0d0 * z))
    else if (t <= 9.6d+147) then
        tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
    else if (t <= 1.02d+243) then
        tmp = sqrt(z) * (t * (sqrt(2.0d0) * -y))
    else
        tmp = 0.5d0 * (sqrt(z) * (t * (x * sqrt(2.0d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 6800.0) {
		tmp = t_1 * Math.sqrt((2.0 * z));
	} else if (t <= 9.6e+147) {
		tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
	} else if (t <= 1.02e+243) {
		tmp = Math.sqrt(z) * (t * (Math.sqrt(2.0) * -y));
	} else {
		tmp = 0.5 * (Math.sqrt(z) * (t * (x * Math.sqrt(2.0))));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	tmp = 0
	if t <= 6800.0:
		tmp = t_1 * math.sqrt((2.0 * z))
	elif t <= 9.6e+147:
		tmp = math.sqrt((2.0 * (z * (t_1 * t_1))))
	elif t <= 1.02e+243:
		tmp = math.sqrt(z) * (t * (math.sqrt(2.0) * -y))
	else:
		tmp = 0.5 * (math.sqrt(z) * (t * (x * math.sqrt(2.0))))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 6800.0)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	elseif (t <= 9.6e+147)
		tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1))));
	elseif (t <= 1.02e+243)
		tmp = Float64(sqrt(z) * Float64(t * Float64(sqrt(2.0) * Float64(-y))));
	else
		tmp = Float64(0.5 * Float64(sqrt(z) * Float64(t * Float64(x * sqrt(2.0)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x * 0.5) - y;
	tmp = 0.0;
	if (t <= 6800.0)
		tmp = t_1 * sqrt((2.0 * z));
	elseif (t <= 9.6e+147)
		tmp = sqrt((2.0 * (z * (t_1 * t_1))));
	elseif (t <= 1.02e+243)
		tmp = sqrt(z) * (t * (sqrt(2.0) * -y));
	else
		tmp = 0.5 * (sqrt(z) * (t * (x * sqrt(2.0))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 6800.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e+147], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.02e+243], N[(N[Sqrt[z], $MachinePrecision] * N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(N[Sqrt[z], $MachinePrecision] * N[(t * N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 9.6 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\

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

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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.9%

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

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

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

    if 6800 < t < 9.60000000000000007e147

    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 19.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.60000000000000007e147 < t < 1.01999999999999999e243

    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 100.0%

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

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

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

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

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

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

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

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

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

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

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

    if 1.01999999999999999e243 < t

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 64.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 5600:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+137}:\\ \;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\sqrt{2} \cdot \left(t\_1 \cdot \sqrt{z}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 5600.0)
     (* t_1 (sqrt (* 2.0 z)))
     (if (<= t 2.5e+137)
       (sqrt (* 2.0 (* z (* t_1 t_1))))
       (* t (* (sqrt 2.0) (* t_1 (sqrt z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 5600.0) {
		tmp = t_1 * sqrt((2.0 * z));
	} else if (t <= 2.5e+137) {
		tmp = sqrt((2.0 * (z * (t_1 * t_1))));
	} else {
		tmp = t * (sqrt(2.0) * (t_1 * sqrt(z)));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * 0.5d0) - y
    if (t <= 5600.0d0) then
        tmp = t_1 * sqrt((2.0d0 * z))
    else if (t <= 2.5d+137) then
        tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
    else
        tmp = t * (sqrt(2.0d0) * (t_1 * sqrt(z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 5600.0) {
		tmp = t_1 * Math.sqrt((2.0 * z));
	} else if (t <= 2.5e+137) {
		tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
	} else {
		tmp = t * (Math.sqrt(2.0) * (t_1 * Math.sqrt(z)));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	tmp = 0
	if t <= 5600.0:
		tmp = t_1 * math.sqrt((2.0 * z))
	elif t <= 2.5e+137:
		tmp = math.sqrt((2.0 * (z * (t_1 * t_1))))
	else:
		tmp = t * (math.sqrt(2.0) * (t_1 * math.sqrt(z)))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 5600.0)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	elseif (t <= 2.5e+137)
		tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1))));
	else
		tmp = Float64(t * Float64(sqrt(2.0) * Float64(t_1 * sqrt(z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x * 0.5) - y;
	tmp = 0.0;
	if (t <= 5600.0)
		tmp = t_1 * sqrt((2.0 * z));
	elseif (t <= 2.5e+137)
		tmp = sqrt((2.0 * (z * (t_1 * t_1))));
	else
		tmp = t * (sqrt(2.0) * (t_1 * sqrt(z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 5600.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+137], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$1 * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+137}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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.9%

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

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

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

    if 5600 < t < 2.5000000000000001e137

    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 20.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right)\right)}} \]
      12. rem-square-sqrt33.6%

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

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

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

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

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

    if 2.5000000000000001e137 < t

    1. Initial program 94.1%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 65.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 4400:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+137}:\\ \;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(t\_1 \cdot \left(t \cdot \sqrt{z}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 4400.0)
     (* t_1 (sqrt (* 2.0 z)))
     (if (<= t 4.6e+137)
       (sqrt (* 2.0 (* z (* t_1 t_1))))
       (* (sqrt 2.0) (* t_1 (* t (sqrt z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 4400.0) {
		tmp = t_1 * sqrt((2.0 * z));
	} else if (t <= 4.6e+137) {
		tmp = sqrt((2.0 * (z * (t_1 * t_1))));
	} else {
		tmp = sqrt(2.0) * (t_1 * (t * sqrt(z)));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * 0.5d0) - y
    if (t <= 4400.0d0) then
        tmp = t_1 * sqrt((2.0d0 * z))
    else if (t <= 4.6d+137) then
        tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
    else
        tmp = sqrt(2.0d0) * (t_1 * (t * sqrt(z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 4400.0) {
		tmp = t_1 * Math.sqrt((2.0 * z));
	} else if (t <= 4.6e+137) {
		tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
	} else {
		tmp = Math.sqrt(2.0) * (t_1 * (t * Math.sqrt(z)));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	tmp = 0
	if t <= 4400.0:
		tmp = t_1 * math.sqrt((2.0 * z))
	elif t <= 4.6e+137:
		tmp = math.sqrt((2.0 * (z * (t_1 * t_1))))
	else:
		tmp = math.sqrt(2.0) * (t_1 * (t * math.sqrt(z)))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 4400.0)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	elseif (t <= 4.6e+137)
		tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1))));
	else
		tmp = Float64(sqrt(2.0) * Float64(t_1 * Float64(t * sqrt(z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x * 0.5) - y;
	tmp = 0.0;
	if (t <= 4400.0)
		tmp = t_1 * sqrt((2.0 * z));
	elseif (t <= 4.6e+137)
		tmp = sqrt((2.0 * (z * (t_1 * t_1))));
	else
		tmp = sqrt(2.0) * (t_1 * (t * sqrt(z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 4400.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e+137], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$1 * N[(t * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+137}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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.9%

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

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

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

    if 4400 < t < 4.59999999999999999e137

    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 20.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right)\right)}} \]
      12. rem-square-sqrt33.6%

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

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

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

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

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

    if 4.59999999999999999e137 < t

    1. Initial program 94.1%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 61.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 3900:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+147}:\\ \;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z} \cdot \left(t \cdot \left(\sqrt{2} \cdot \left(-y\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 3900.0)
     (* t_1 (sqrt (* 2.0 z)))
     (if (<= t 2.05e+147)
       (sqrt (* 2.0 (* z (* t_1 t_1))))
       (* (sqrt z) (* t (* (sqrt 2.0) (- y))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 3900.0) {
		tmp = t_1 * sqrt((2.0 * z));
	} else if (t <= 2.05e+147) {
		tmp = sqrt((2.0 * (z * (t_1 * t_1))));
	} else {
		tmp = sqrt(z) * (t * (sqrt(2.0) * -y));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * 0.5d0) - y
    if (t <= 3900.0d0) then
        tmp = t_1 * sqrt((2.0d0 * z))
    else if (t <= 2.05d+147) then
        tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
    else
        tmp = sqrt(z) * (t * (sqrt(2.0d0) * -y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 3900.0) {
		tmp = t_1 * Math.sqrt((2.0 * z));
	} else if (t <= 2.05e+147) {
		tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
	} else {
		tmp = Math.sqrt(z) * (t * (Math.sqrt(2.0) * -y));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	tmp = 0
	if t <= 3900.0:
		tmp = t_1 * math.sqrt((2.0 * z))
	elif t <= 2.05e+147:
		tmp = math.sqrt((2.0 * (z * (t_1 * t_1))))
	else:
		tmp = math.sqrt(z) * (t * (math.sqrt(2.0) * -y))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 3900.0)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	elseif (t <= 2.05e+147)
		tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1))));
	else
		tmp = Float64(sqrt(z) * Float64(t * Float64(sqrt(2.0) * Float64(-y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x * 0.5) - y;
	tmp = 0.0;
	if (t <= 3900.0)
		tmp = t_1 * sqrt((2.0 * z));
	elseif (t <= 2.05e+147)
		tmp = sqrt((2.0 * (z * (t_1 * t_1))));
	else
		tmp = sqrt(z) * (t * (sqrt(2.0) * -y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 3900.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e+147], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[z], $MachinePrecision] * N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 2.05 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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.9%

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

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

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

    if 3900 < t < 2.04999999999999983e147

    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 19.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.04999999999999983e147 < t

    1. Initial program 93.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*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 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 80.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right) \cdot \left(x \cdot 0.5\right) + \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right) \cdot \left(-y\right)} \]
    17. Applied egg-rr73.4%

      \[\leadsto \color{blue}{\left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right) \cdot \left(x \cdot 0.5\right) + \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right) \cdot \left(-y\right)} \]
    18. Step-by-step derivation
      1. associate-*l*74.8%

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

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

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

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

        \[\leadsto \sqrt{2 \cdot z} \cdot \left(\mathsf{hypot}\left(1, t\right) \cdot \left(\color{blue}{0.5 \cdot x} + \left(-y\right)\right)\right) \]
      6. sub-neg78.5%

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

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

    if 1900 < t

    1. Initial program 96.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*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 72.3%

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

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

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

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

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

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

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

Alternative 9: 66.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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.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.9%

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

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

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

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

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

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

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

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

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

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

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

    if 1 < t

    1. Initial program 96.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-prod100.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 99.5% accurate, 1.0× speedup?

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

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

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Add Preprocessing
  3. Final simplification98.7%

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

Alternative 11: 84.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\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(Float64(2.0 * z) * fma(t, t, 1.0))))
end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}
\end{array}
Derivation
  1. Initial program 98.7%

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Step-by-step derivation
    1. associate-*l*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.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. Step-by-step derivation
    1. pow199.9%

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

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

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

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

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

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

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

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

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

Alternative 12: 76.2% accurate, 1.0× speedup?

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

\\
\sqrt{2 \cdot z} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \mathsf{hypot}\left(1, t\right)\right)
\end{array}
Derivation
  1. Initial program 98.7%

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Step-by-step derivation
    1. associate-*l*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.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. Step-by-step derivation
    1. pow199.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right)} \]
  16. Step-by-step derivation
    1. *-commutative70.3%

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

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

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

    \[\leadsto \color{blue}{\left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right) \cdot \left(x \cdot 0.5\right) + \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right) \cdot \left(-y\right)} \]
  18. Step-by-step derivation
    1. associate-*l*67.0%

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

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot z} \cdot \left(\mathsf{hypot}\left(1, t\right) \cdot \left(x \cdot 0.5\right) + \mathsf{hypot}\left(1, t\right) \cdot \left(-y\right)\right)} \]
    4. distribute-lft-out72.8%

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

      \[\leadsto \sqrt{2 \cdot z} \cdot \left(\mathsf{hypot}\left(1, t\right) \cdot \left(\color{blue}{0.5 \cdot x} + \left(-y\right)\right)\right) \]
    6. sub-neg72.8%

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

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

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

Alternative 13: 60.6% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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.9%

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

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

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

    if 6.5e5 < t

    1. Initial program 96.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*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 17.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right)\right)}} \]
      12. rem-square-sqrt25.8%

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

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

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

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

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

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

Alternative 14: 39.4% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.9%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. 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. Step-by-step derivation
      1. pow199.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left({y}^{2} \cdot z + \left(-\color{blue}{\left(x \cdot y\right) \cdot z}\right)\right)} \]
      4. distribute-lft-neg-in52.2%

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

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

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

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

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

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

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

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

    if -1.0199999999999999e27 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 57.8% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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.9%

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

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

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

    if 1.95e23 < t

    1. Initial program 96.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*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 15.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right)\right)}} \]
      12. rem-square-sqrt23.2%

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left({y}^{2} \cdot z + \left(-\color{blue}{\left(x \cdot y\right) \cdot z}\right)\right)} \]
      4. distribute-lft-neg-in12.8%

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

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

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

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

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

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

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

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

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

Alternative 16: 30.5% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 99.5% accurate, 0.7× speedup?

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

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

Reproduce

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