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

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

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

Initial Program: 99.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.7× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot e^{{t}^{2}}}
\end{array}
Derivation
  1. Initial program 99.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.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ t_2 := \left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\ t_3 := \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\ \mathbf{if}\;t \leq 0.00042:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+156}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+208}:\\ \;\;\;\;y \cdot \left(-t\_3\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+256}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3 \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))
        (t_2 (* (* t (* t_1 (sqrt 2.0))) (sqrt z)))
        (t_3 (sqrt (* (* 2.0 z) (fma t t 1.0)))))
   (if (<= t 0.00042)
     (* t_1 (sqrt (* 2.0 z)))
     (if (<= t 2.5e+156)
       t_2
       (if (<= t 3.2e+208)
         (* y (- t_3))
         (if (<= t 5e+256) t_2 (* t_3 (* x 0.5))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double t_2 = (t * (t_1 * sqrt(2.0))) * sqrt(z);
	double t_3 = sqrt(((2.0 * z) * fma(t, t, 1.0)));
	double tmp;
	if (t <= 0.00042) {
		tmp = t_1 * sqrt((2.0 * z));
	} else if (t <= 2.5e+156) {
		tmp = t_2;
	} else if (t <= 3.2e+208) {
		tmp = y * -t_3;
	} else if (t <= 5e+256) {
		tmp = t_2;
	} else {
		tmp = t_3 * (x * 0.5);
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	t_2 = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z))
	t_3 = sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0)))
	tmp = 0.0
	if (t <= 0.00042)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	elseif (t <= 2.5e+156)
		tmp = t_2;
	elseif (t <= 3.2e+208)
		tmp = Float64(y * Float64(-t_3));
	elseif (t <= 5e+256)
		tmp = t_2;
	else
		tmp = Float64(t_3 * 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]}, Block[{t$95$2 = N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 0.00042], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+156], t$95$2, If[LessEqual[t, 3.2e+208], N[(y * (-t$95$3)), $MachinePrecision], If[LessEqual[t, 5e+256], t$95$2, N[(t$95$3 * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+156}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+208}:\\
\;\;\;\;y \cdot \left(-t\_3\right)\\

\mathbf{elif}\;t \leq 5 \cdot 10^{+256}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000002e-4 < t < 2.49999999999999996e156 or 3.2000000000000001e208 < t < 5.00000000000000015e256

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.49999999999999996e156 < t < 3.2000000000000001e208

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot y\right)} \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \]
    13. Step-by-step derivation
      1. neg-mul-190.9%

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

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

    if 5.00000000000000015e256 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 92.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \cdot t \leq 2 \cdot 10^{-7} \lor \neg \left(t \cdot t \leq 10^{+253}\right):\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{2 \cdot z} \cdot \left(x \cdot 0.5\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= (* t t) 2e-7) (not (<= (* t t) 1e+253)))
   (* (- (* x 0.5) y) (sqrt (* (* 2.0 z) (fma t t 1.0))))
   (* (exp (/ (* t t) 2.0)) (* (sqrt (* 2.0 z)) (* x 0.5)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (((t * t) <= 2e-7) || !((t * t) <= 1e+253)) {
		tmp = ((x * 0.5) - y) * sqrt(((2.0 * z) * fma(t, t, 1.0)));
	} else {
		tmp = exp(((t * t) / 2.0)) * (sqrt((2.0 * z)) * (x * 0.5));
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if ((Float64(t * t) <= 2e-7) || !(Float64(t * t) <= 1e+253))
		tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))));
	else
		tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(sqrt(Float64(2.0 * z)) * Float64(x * 0.5)));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(t * t), $MachinePrecision], 2e-7], N[Not[LessEqual[N[(t * t), $MachinePrecision], 1e+253]], $MachinePrecision]], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \cdot t \leq 2 \cdot 10^{-7} \lor \neg \left(t \cdot t \leq 10^{+253}\right):\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 t t) < 1.9999999999999999e-7 or 9.9999999999999994e252 < (*.f64 t t)

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-7 < (*.f64 t t) < 9.9999999999999994e252

    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 x around inf 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 85.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{2 \cdot z}\\ \mathbf{if}\;t \cdot t \leq 2 \cdot 10^{-7}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\ \mathbf{elif}\;t \cdot t \leq \infty:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(t\_1 \cdot \left(x \cdot 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot z\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 (sqrt (* 2.0 z))))
   (if (<= (* t t) 2e-7)
     (* (- (* x 0.5) y) t_1)
     (if (<= (* t t) INFINITY)
       (* (exp (/ (* t t) 2.0)) (* t_1 (* x 0.5)))
       (* (sqrt (* (* 2.0 z) (fma t t 1.0))) (* x 0.5))))))
double code(double x, double y, double z, double t) {
	double t_1 = sqrt((2.0 * z));
	double tmp;
	if ((t * t) <= 2e-7) {
		tmp = ((x * 0.5) - y) * t_1;
	} else if ((t * t) <= ((double) INFINITY)) {
		tmp = exp(((t * t) / 2.0)) * (t_1 * (x * 0.5));
	} else {
		tmp = sqrt(((2.0 * z) * fma(t, t, 1.0))) * (x * 0.5);
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = sqrt(Float64(2.0 * z))
	tmp = 0.0
	if (Float64(t * t) <= 2e-7)
		tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1);
	elseif (Float64(t * t) <= Inf)
		tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(t_1 * Float64(x * 0.5)));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))) * Float64(x * 0.5));
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 2e-7], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], Infinity], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\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 (*.f64 t t) < 1.9999999999999999e-7

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-7 < (*.f64 t t) < +inf.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 t t)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 65.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 0.00042:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{+135}:\\ \;\;\;\;t \cdot \left(\sqrt{2} \cdot \left(t\_1 \cdot \sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot z\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 0.00042)
     (* t_1 (sqrt (* 2.0 z)))
     (if (<= t 6.4e+135)
       (* t (* (sqrt 2.0) (* t_1 (sqrt z))))
       (* (sqrt (* (* 2.0 z) (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 <= 0.00042) {
		tmp = t_1 * sqrt((2.0 * z));
	} else if (t <= 6.4e+135) {
		tmp = t * (sqrt(2.0) * (t_1 * sqrt(z)));
	} else {
		tmp = sqrt(((2.0 * z) * 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 <= 0.00042)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	elseif (t <= 6.4e+135)
		tmp = Float64(t * Float64(sqrt(2.0) * Float64(t_1 * sqrt(z))));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * z) * 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, 0.00042], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.4e+135], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$1 * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * z), $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 0.00042:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\

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

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\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 < 4.2000000000000002e-4

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000002e-4 < t < 6.3999999999999995e135

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.3999999999999995e135 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 65.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 0.00042:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+156}:\\ \;\;\;\;t \cdot \left(\sqrt{2} \cdot \left(t\_1 \cdot \sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-\sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 0.00042)
     (* t_1 (sqrt (* 2.0 z)))
     (if (<= t 2.5e+156)
       (* t (* (sqrt 2.0) (* t_1 (sqrt z))))
       (* y (- (sqrt (* (* 2.0 z) (fma t t 1.0)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 0.00042) {
		tmp = t_1 * sqrt((2.0 * z));
	} else if (t <= 2.5e+156) {
		tmp = t * (sqrt(2.0) * (t_1 * sqrt(z)));
	} else {
		tmp = y * -sqrt(((2.0 * z) * fma(t, t, 1.0)));
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 0.00042)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	elseif (t <= 2.5e+156)
		tmp = Float64(t * Float64(sqrt(2.0) * Float64(t_1 * sqrt(z))));
	else
		tmp = Float64(y * Float64(-sqrt(Float64(Float64(2.0 * z) * 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]}, If[LessEqual[t, 0.00042], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+156], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$1 * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * (-N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000002e-4 < t < 2.49999999999999996e156

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.49999999999999996e156 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot y\right)} \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \]
    13. Step-by-step derivation
      1. neg-mul-181.8%

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

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

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

Alternative 7: 65.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 9 \cdot 10^{+33}:\\ \;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+97}:\\ \;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {t\_1}^{2}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-\sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 9e+33)
     (* t_1 (sqrt (* 2.0 z)))
     (if (<= t 3.6e+97)
       (sqrt (* (* 2.0 z) (pow t_1 2.0)))
       (* y (- (sqrt (* (* 2.0 z) (fma t t 1.0)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 9e+33) {
		tmp = t_1 * sqrt((2.0 * z));
	} else if (t <= 3.6e+97) {
		tmp = sqrt(((2.0 * z) * pow(t_1, 2.0)));
	} else {
		tmp = y * -sqrt(((2.0 * z) * fma(t, t, 1.0)));
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 9e+33)
		tmp = Float64(t_1 * sqrt(Float64(2.0 * z)));
	elseif (t <= 3.6e+97)
		tmp = sqrt(Float64(Float64(2.0 * z) * (t_1 ^ 2.0)));
	else
		tmp = Float64(y * Float64(-sqrt(Float64(Float64(2.0 * z) * 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]}, If[LessEqual[t, 9e+33], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+97], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(y * (-N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000001e33 < t < 3.59999999999999966e97

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.59999999999999966e97 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot y\right)} \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \]
    13. Step-by-step derivation
      1. neg-mul-170.6%

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

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

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

Alternative 8: 99.5% accurate, 1.0× speedup?

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

\\
e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\right)
\end{array}
Derivation
  1. Initial program 99.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. Final simplification99.5%

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

Alternative 9: 58.9% accurate, 1.8× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(y \cdot \left(0.5 \cdot \frac{x}{y} + -1\right)\right)\\


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

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999954e-22 < t

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

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

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

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

Alternative 10: 42.4% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;y \leq 5.5 \cdot 10^{-156}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.79999999999999984e-29

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

        \[\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-sqr52.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-sqrt52.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. *-commutative52.4%

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999984e-29 < y < 5.4999999999999998e-156

    1. Initial program 98.8%

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

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

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

    if 5.4999999999999998e-156 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-y\right) \cdot {\color{blue}{\left(2 \cdot z\right)}}^{0.5} \]
    10. Applied egg-rr50.0%

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

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

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

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

Alternative 11: 59.2% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.4e-4 < 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. Add Preprocessing
    3. Taylor expanded in t around 0 14.1%

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

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

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

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

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

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

Alternative 12: 37.1% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 5.6000000000000002e125

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.6000000000000002e125 < 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. Step-by-step derivation
      1. associate-*l*99.9%

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

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

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

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

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

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

        \[\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-unprod51.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. *-commutative51.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. *-commutative51.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-sqr45.2%

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

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

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

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

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

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

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

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

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

Alternative 13: 56.8% accurate, 2.0× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}
\end{array}
Derivation
  1. Initial program 99.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.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 30.3% accurate, 2.0× speedup?

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

\\
\sqrt{2 \cdot z} \cdot \left(-y\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. Step-by-step derivation
    1. associate-*l*99.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-y\right)} \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \]
  8. Simplified33.4%

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

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

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

      \[\leadsto \left(-y\right) \cdot {\color{blue}{\left(2 \cdot z\right)}}^{0.5} \]
  10. Applied egg-rr33.5%

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

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

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

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

Alternative 15: 2.4% accurate, 2.0× speedup?

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

\\
y \cdot \sqrt{2 \cdot z}
\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.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-y\right)} \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \]
  8. Simplified33.4%

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

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

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

      \[\leadsto \left(-y\right) \cdot {\color{blue}{\left(2 \cdot z\right)}}^{0.5} \]
  10. Applied egg-rr33.5%

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{-y} \cdot \sqrt{-y}\right) \cdot \color{blue}{{\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}} \]
    5. sqrt-unprod15.0%

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

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

      \[\leadsto \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot {\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333} \]
    8. add-sqr-sqrt4.4%

      \[\leadsto \color{blue}{y} \cdot {\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333} \]
    9. pow14.4%

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

      \[\leadsto {\left(y \cdot \color{blue}{{\left(2 \cdot z\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}}\right)}^{1} \]
    11. metadata-eval2.2%

      \[\leadsto {\left(y \cdot {\left(2 \cdot z\right)}^{\color{blue}{0.5}}\right)}^{1} \]
    12. pow1/22.2%

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

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

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

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

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

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

Developer target: 99.5% accurate, 0.7× speedup?

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

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

Reproduce

?
herbie shell --seed 2024110 
(FPCore (x y z t)
  :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
  :precision binary64

  :alt
  (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0)))

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