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

Percentage Accurate: 99.5% → 99.7%
Time: 16.0s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 99.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 0.7× speedup?

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

    \[\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. remove-double-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.4% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {\left(z \cdot \left(2 \cdot \mathsf{fma}\left(t, t, 1\right)\right)\right)}^{0.5}\\


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot {2}^{\color{blue}{\left(2 \cdot 0.25\right)}}\right) \]
      6. pow-sqr99.0%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
      7. unswap-sqr99.0%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      10. exp-sum94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      11. distribute-rgt-in94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      12. +-commutative94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      13. *-commutative94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      14. exp-prod94.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      15. exp-sum94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      16. rem-exp-log94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      17. rem-exp-log99.4%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(\color{blue}{e^{\log z \cdot 0.25}} \cdot {2}^{0.25}\right)\right) \]
      20. exp-to-pow94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right)\right) \]
      21. exp-sum94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}}\right) \]
      22. distribute-rgt-in94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}}\right) \]
    11. Simplified99.7%

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

    if 9.9999999999999998e-20 < (*.f64 t t) < 2.0000000000000001e266

    1. Initial program 98.4%

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

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

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

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

    if 2.0000000000000001e266 < (*.f64 t t)

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 92.3% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot {2}^{\color{blue}{\left(2 \cdot 0.25\right)}}\right) \]
      6. pow-sqr99.0%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
      7. unswap-sqr99.0%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      10. exp-sum94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      11. distribute-rgt-in94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      12. +-commutative94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      13. *-commutative94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      14. exp-prod94.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      15. exp-sum94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      16. rem-exp-log94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      17. rem-exp-log99.4%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(\color{blue}{e^{\log z \cdot 0.25}} \cdot {2}^{0.25}\right)\right) \]
      20. exp-to-pow94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right)\right) \]
      21. exp-sum94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}}\right) \]
      22. distribute-rgt-in94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}}\right) \]
    11. Simplified99.7%

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

    if 9.9999999999999998e-20 < (*.f64 t t) < 2.0000000000000001e266

    1. Initial program 98.4%

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

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

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

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

    if 2.0000000000000001e266 < (*.f64 t t)

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.6% 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{z \cdot 2}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+154}:\\ \;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \cdot \left(x \cdot 0.5\right)\\ \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 (* z 2.0)))
     (if (<= t 4e+154)
       (* (* t (* t_1 (sqrt 2.0))) (sqrt z))
       (* (sqrt (* (* z 2.0) (fma t t 1.0))) (* x 0.5))))))
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((z * 2.0));
	} else if (t <= 4e+154) {
		tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
	} else {
		tmp = sqrt(((z * 2.0) * fma(t, t, 1.0))) * (x * 0.5);
	}
	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(z * 2.0)));
	elseif (t <= 4e+154)
		tmp = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z));
	else
		tmp = Float64(sqrt(Float64(Float64(z * 2.0) * fma(t, t, 1.0))) * Float64(x * 0.5));
	end
	return 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[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+154], N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
      7. unswap-sqr71.4%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      10. exp-sum68.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      11. distribute-rgt-in68.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      12. +-commutative68.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      13. *-commutative68.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      14. exp-prod68.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      15. exp-sum68.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      16. rem-exp-log68.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      17. rem-exp-log71.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(2 \cdot \color{blue}{z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      18. *-commutative71.6%

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(\color{blue}{e^{\log z \cdot 0.25}} \cdot {2}^{0.25}\right)\right) \]
      20. exp-to-pow68.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right)\right) \]
      21. exp-sum68.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}}\right) \]
      22. distribute-rgt-in68.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}}\right) \]
    11. Simplified71.8%

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

    if 1 < t < 4.00000000000000015e154

    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. remove-double-neg100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000015e154 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 66.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 2.6 \cdot 10^{+30}:\\
\;\;\;\;t\_1 \cdot \sqrt{z \cdot 2}\\

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

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


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

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
      7. unswap-sqr70.4%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      10. exp-sum67.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      11. distribute-rgt-in67.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      12. +-commutative67.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      13. *-commutative67.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      14. exp-prod67.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      15. exp-sum67.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      16. rem-exp-log67.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      17. rem-exp-log70.7%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(\color{blue}{e^{\log z \cdot 0.25}} \cdot {2}^{0.25}\right)\right) \]
      20. exp-to-pow67.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right)\right) \]
      21. exp-sum67.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}}\right) \]
      22. distribute-rgt-in67.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}}\right) \]
    11. Simplified70.8%

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

    if 2.59999999999999988e30 < t < 9.7999999999999999e69

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.7999999999999999e69 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 65.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
      7. unswap-sqr70.4%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      10. exp-sum67.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      11. distribute-rgt-in67.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      12. +-commutative67.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      13. *-commutative67.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      14. exp-prod67.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      15. exp-sum67.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      16. rem-exp-log67.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      17. rem-exp-log70.7%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(\color{blue}{e^{\log z \cdot 0.25}} \cdot {2}^{0.25}\right)\right) \]
      20. exp-to-pow67.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right)\right) \]
      21. exp-sum67.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}}\right) \]
      22. distribute-rgt-in67.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}}\right) \]
    11. Simplified70.8%

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

    if 2.3e30 < t < 1.4000000000000001e127

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4000000000000001e127 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 86.1% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot t\_1\right)\right)\\


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot {2}^{\color{blue}{\left(2 \cdot 0.25\right)}}\right) \]
      6. pow-sqr99.0%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
      7. unswap-sqr99.0%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      10. exp-sum94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      11. distribute-rgt-in94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      12. +-commutative94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      13. *-commutative94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      14. exp-prod94.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      15. exp-sum94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      16. rem-exp-log94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      17. rem-exp-log99.4%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(\color{blue}{e^{\log z \cdot 0.25}} \cdot {2}^{0.25}\right)\right) \]
      20. exp-to-pow94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right)\right) \]
      21. exp-sum94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}}\right) \]
      22. distribute-rgt-in94.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}}\right) \]
    11. Simplified99.7%

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

    if 9.9999999999999998e-20 < (*.f64 t t)

    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. Add Preprocessing
    3. Taylor expanded in x around inf 75.9%

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

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

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

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

Alternative 8: 74.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.25 \cdot 10^{+118}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \mathsf{hypot}\left(1, t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \cdot \left(x \cdot 0.5\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t 1.25e+118)
   (* (- (* x 0.5) y) (* (sqrt (* z 2.0)) (hypot 1.0 t)))
   (* (sqrt (* (* z 2.0) (fma t t 1.0))) (* x 0.5))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 1.25e+118) {
		tmp = ((x * 0.5) - y) * (sqrt((z * 2.0)) * hypot(1.0, t));
	} else {
		tmp = sqrt(((z * 2.0) * fma(t, t, 1.0))) * (x * 0.5);
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 1.25e+118)
		tmp = Float64(Float64(Float64(x * 0.5) - y) * Float64(sqrt(Float64(z * 2.0)) * hypot(1.0, t)));
	else
		tmp = Float64(sqrt(Float64(Float64(z * 2.0) * fma(t, t, 1.0))) * Float64(x * 0.5));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.25e+118], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    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. remove-double-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.24999999999999993e118 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 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}
Derivation
  1. Initial program 99.5%

    \[\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. Add Preprocessing

Alternative 10: 43.8% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;x \leq -3 \cdot 10^{+59} \lor \neg \left(x \leq 1.1 \cdot 10^{+24}\right):\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3e59 or 1.10000000000000001e24 < x

    1. Initial program 99.9%

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

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

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

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

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

    if -3e59 < x < 1.10000000000000001e24

    1. Initial program 99.1%

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

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

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

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

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z} \cdot {2}^{\color{blue}{\left(2 \cdot 0.25\right)}}\right) \]
      6. pow-sqr43.0%

        \[\leadsto -y \cdot \left(\sqrt{z} \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
      7. unpow1/243.0%

        \[\leadsto -y \cdot \left(\color{blue}{{z}^{0.5}} \cdot \left({2}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      8. metadata-eval43.0%

        \[\leadsto -y \cdot \left({z}^{\color{blue}{\left(2 \cdot 0.25\right)}} \cdot \left({2}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      9. pow-sqr43.0%

        \[\leadsto -y \cdot \left(\color{blue}{\left({z}^{0.25} \cdot {z}^{0.25}\right)} \cdot \left({2}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      10. unswap-sqr43.0%

        \[\leadsto -y \cdot \color{blue}{\left(\left({z}^{0.25} \cdot {2}^{0.25}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)} \]
      11. exp-to-pow41.3%

        \[\leadsto -y \cdot \left(\left(\color{blue}{e^{\log z \cdot 0.25}} \cdot {2}^{0.25}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      12. exp-to-pow41.3%

        \[\leadsto -y \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      13. exp-sum41.2%

        \[\leadsto -y \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      14. distribute-rgt-in41.2%

        \[\leadsto -y \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      15. +-commutative41.2%

        \[\leadsto -y \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      16. *-commutative41.2%

        \[\leadsto -y \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      17. exp-prod41.2%

        \[\leadsto -y \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      18. exp-sum41.3%

        \[\leadsto -y \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      19. rem-exp-log41.3%

        \[\leadsto -y \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      20. rem-exp-log43.1%

        \[\leadsto -y \cdot \left({\left(2 \cdot \color{blue}{z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      21. *-commutative43.1%

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

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

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

Alternative 11: 65.4% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
      7. unswap-sqr71.4%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      10. exp-sum68.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      11. distribute-rgt-in68.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      12. +-commutative68.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      13. *-commutative68.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      14. exp-prod68.5%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      15. exp-sum68.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      16. rem-exp-log68.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      17. rem-exp-log71.6%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(2 \cdot \color{blue}{z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
      18. *-commutative71.6%

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(\color{blue}{e^{\log z \cdot 0.25}} \cdot {2}^{0.25}\right)\right) \]
      20. exp-to-pow68.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right)\right) \]
      21. exp-sum68.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}}\right) \]
      22. distribute-rgt-in68.4%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}}\right) \]
    11. Simplified71.8%

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

    if 1 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 56.9% accurate, 2.0× speedup?

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

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

    \[\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. remove-double-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot \color{blue}{{2}^{0.5}}\right) \]
    5. metadata-eval53.7%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot {2}^{\color{blue}{\left(2 \cdot 0.25\right)}}\right) \]
    6. pow-sqr53.6%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
    7. unswap-sqr53.6%

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    10. exp-sum51.5%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    11. distribute-rgt-in51.5%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    12. +-commutative51.5%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    13. *-commutative51.5%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    14. exp-prod51.5%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    15. exp-sum51.5%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    16. rem-exp-log51.5%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    17. rem-exp-log53.7%

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right)\right) \]
    21. exp-sum51.5%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}}\right) \]
    22. distribute-rgt-in51.5%

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}}\right) \]
  11. Simplified53.9%

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

Alternative 13: 30.5% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

      \[\leadsto -y \cdot \left(\sqrt{z} \cdot {2}^{\color{blue}{\left(2 \cdot 0.25\right)}}\right) \]
    6. pow-sqr29.9%

      \[\leadsto -y \cdot \left(\sqrt{z} \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
    7. unpow1/229.9%

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

      \[\leadsto -y \cdot \left({z}^{\color{blue}{\left(2 \cdot 0.25\right)}} \cdot \left({2}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    9. pow-sqr29.9%

      \[\leadsto -y \cdot \left(\color{blue}{\left({z}^{0.25} \cdot {z}^{0.25}\right)} \cdot \left({2}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    10. unswap-sqr29.9%

      \[\leadsto -y \cdot \color{blue}{\left(\left({z}^{0.25} \cdot {2}^{0.25}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)} \]
    11. exp-to-pow28.7%

      \[\leadsto -y \cdot \left(\left(\color{blue}{e^{\log z \cdot 0.25}} \cdot {2}^{0.25}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    12. exp-to-pow28.7%

      \[\leadsto -y \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    13. exp-sum28.7%

      \[\leadsto -y \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    14. distribute-rgt-in28.7%

      \[\leadsto -y \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    15. +-commutative28.7%

      \[\leadsto -y \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    16. *-commutative28.7%

      \[\leadsto -y \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    17. exp-prod28.7%

      \[\leadsto -y \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    18. exp-sum28.7%

      \[\leadsto -y \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    19. rem-exp-log28.7%

      \[\leadsto -y \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    20. rem-exp-log29.9%

      \[\leadsto -y \cdot \left({\left(2 \cdot \color{blue}{z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    21. *-commutative29.9%

      \[\leadsto -y \cdot \left({\color{blue}{\left(z \cdot 2\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
  6. Simplified30.0%

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

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

Alternative 14: 2.5% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

      \[\leadsto -y \cdot \left(\sqrt{z} \cdot {2}^{\color{blue}{\left(2 \cdot 0.25\right)}}\right) \]
    6. pow-sqr29.9%

      \[\leadsto -y \cdot \left(\sqrt{z} \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right) \]
    7. unpow1/229.9%

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

      \[\leadsto -y \cdot \left({z}^{\color{blue}{\left(2 \cdot 0.25\right)}} \cdot \left({2}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    9. pow-sqr29.9%

      \[\leadsto -y \cdot \left(\color{blue}{\left({z}^{0.25} \cdot {z}^{0.25}\right)} \cdot \left({2}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    10. unswap-sqr29.9%

      \[\leadsto -y \cdot \color{blue}{\left(\left({z}^{0.25} \cdot {2}^{0.25}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)} \]
    11. exp-to-pow28.7%

      \[\leadsto -y \cdot \left(\left(\color{blue}{e^{\log z \cdot 0.25}} \cdot {2}^{0.25}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    12. exp-to-pow28.7%

      \[\leadsto -y \cdot \left(\left(e^{\log z \cdot 0.25} \cdot \color{blue}{e^{\log 2 \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    13. exp-sum28.7%

      \[\leadsto -y \cdot \left(\color{blue}{e^{\log z \cdot 0.25 + \log 2 \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    14. distribute-rgt-in28.7%

      \[\leadsto -y \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log z + \log 2\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    15. +-commutative28.7%

      \[\leadsto -y \cdot \left(e^{0.25 \cdot \color{blue}{\left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    16. *-commutative28.7%

      \[\leadsto -y \cdot \left(e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    17. exp-prod28.7%

      \[\leadsto -y \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    18. exp-sum28.7%

      \[\leadsto -y \cdot \left({\color{blue}{\left(e^{\log 2} \cdot e^{\log z}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    19. rem-exp-log28.7%

      \[\leadsto -y \cdot \left({\left(\color{blue}{2} \cdot e^{\log z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    20. rem-exp-log29.9%

      \[\leadsto -y \cdot \left({\left(2 \cdot \color{blue}{z}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
    21. *-commutative29.9%

      \[\leadsto -y \cdot \left({\color{blue}{\left(z \cdot 2\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right) \]
  6. Simplified30.0%

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

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

      \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(0 + \left(-y\right)\right)} \]
    3. add-sqr-sqrt16.6%

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

      \[\leadsto \sqrt{z \cdot 2} \cdot \left(0 + \color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}\right) \]
    5. sqr-neg16.2%

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

      \[\leadsto \sqrt{z \cdot 2} \cdot \left(0 + \color{blue}{\sqrt{y} \cdot \sqrt{y}}\right) \]
    7. add-sqr-sqrt2.1%

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

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

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

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

    \[\leadsto y \cdot \sqrt{z \cdot 2} \]
  12. Add Preprocessing

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

  :alt
  (! :herbie-platform default (* (* (- (* x 1/2) y) (sqrt (* z 2))) (pow (exp 1) (/ (* t t) 2))))

  (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))