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

Percentage Accurate: 99.4% → 99.7%
Time: 14.3s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \cdot t \leq 5 \cdot 10^{+307}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{z \cdot 2} \cdot \left(-y\right)\right)\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999982e-6 < (*.f64 t t) < 5e307

    1. Initial program 98.4%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt51.6%

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

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

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

      \[\leadsto \left(\color{blue}{\left(-1 \cdot y\right)} \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    6. Step-by-step derivation
      1. neg-mul-182.8%

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

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

    if 5e307 < (*.f64 t t)

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 92.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \cdot t \leq 5 \cdot 10^{+307}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(t\_2 \cdot \left(-y\right)\right)\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000036e-18 < (*.f64 t t) < 5e307

    1. Initial program 98.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. Step-by-step derivation
      1. add-sqr-sqrt50.7%

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

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

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

      \[\leadsto \left(\color{blue}{\left(-1 \cdot y\right)} \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    6. Step-by-step derivation
      1. neg-mul-181.8%

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

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

    if 5e307 < (*.f64 t t)

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 59.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ t_2 := \sqrt{z \cdot 2}\\ \mathbf{if}\;t \leq 880:\\ \;\;\;\;t\_1 \cdot t\_2\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+220}:\\ \;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot {t\_1}^{2}}\\ \mathbf{else}:\\ \;\;\;\;t\_2 \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 (- (* x 0.5) y)) (t_2 (sqrt (* z 2.0))))
   (if (<= t 880.0)
     (* t_1 t_2)
     (if (<= t 5.2e+220)
       (sqrt (* (* z 2.0) (pow t_1 2.0)))
       (* t_2 (* x (- 0.5 (/ y x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double t_2 = sqrt((z * 2.0));
	double tmp;
	if (t <= 880.0) {
		tmp = t_1 * t_2;
	} else if (t <= 5.2e+220) {
		tmp = sqrt(((z * 2.0) * pow(t_1, 2.0)));
	} else {
		tmp = t_2 * (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) :: t_2
    real(8) :: tmp
    t_1 = (x * 0.5d0) - y
    t_2 = sqrt((z * 2.0d0))
    if (t <= 880.0d0) then
        tmp = t_1 * t_2
    else if (t <= 5.2d+220) then
        tmp = sqrt(((z * 2.0d0) * (t_1 ** 2.0d0)))
    else
        tmp = t_2 * (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 = (x * 0.5) - y;
	double t_2 = Math.sqrt((z * 2.0));
	double tmp;
	if (t <= 880.0) {
		tmp = t_1 * t_2;
	} else if (t <= 5.2e+220) {
		tmp = Math.sqrt(((z * 2.0) * Math.pow(t_1, 2.0)));
	} else {
		tmp = t_2 * (x * (0.5 - (y / x)));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	t_2 = math.sqrt((z * 2.0))
	tmp = 0
	if t <= 880.0:
		tmp = t_1 * t_2
	elif t <= 5.2e+220:
		tmp = math.sqrt(((z * 2.0) * math.pow(t_1, 2.0)))
	else:
		tmp = t_2 * (x * (0.5 - (y / x)))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	t_2 = sqrt(Float64(z * 2.0))
	tmp = 0.0
	if (t <= 880.0)
		tmp = Float64(t_1 * t_2);
	elseif (t <= 5.2e+220)
		tmp = sqrt(Float64(Float64(z * 2.0) * (t_1 ^ 2.0)));
	else
		tmp = Float64(t_2 * Float64(x * Float64(0.5 - Float64(y / x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x * 0.5) - y;
	t_2 = sqrt((z * 2.0));
	tmp = 0.0;
	if (t <= 880.0)
		tmp = t_1 * t_2;
	elseif (t <= 5.2e+220)
		tmp = sqrt(((z * 2.0) * (t_1 ^ 2.0)));
	else
		tmp = t_2 * (x * (0.5 - (y / x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 880.0], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[t, 5.2e+220], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$2 * N[(x * N[(0.5 - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 880 < t < 5.19999999999999988e220

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z \cdot e^{{t}^{2}}}\right) + \left(-y \cdot \color{blue}{\left(\sqrt{z \cdot e^{{t}^{2}}} \cdot \sqrt{2}\right)}\right) \]
      5. distribute-lft-neg-in63.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.19999999999999988e220 < 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 16.1%

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

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

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

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

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

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

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

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

        \[\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 \]
      5. unsub-neg28.0%

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

      \[\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 3 regimes into one program.
  4. Final simplification57.5%

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

Alternative 5: 85.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000036e-18 < (*.f64 t t)

    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. Step-by-step derivation
      1. add-sqr-sqrt51.8%

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

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

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

      \[\leadsto \left(\color{blue}{\left(-1 \cdot y\right)} \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    6. Step-by-step derivation
      1. neg-mul-180.9%

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

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

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

Alternative 6: 66.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 59.9% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0015 < t

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(\left(x \cdot \sqrt{2}\right) \cdot \sqrt{z \cdot e^{{t}^{2}}}\right) + \left(-y \cdot \color{blue}{\left(\sqrt{z \cdot e^{{t}^{2}}} \cdot \sqrt{2}\right)}\right) \]
      5. distribute-lft-neg-in60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 99.4% accurate, 1.0× speedup?

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

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

Alternative 9: 43.6% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1300 or 2.75000000000000013e-81 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot \left(\left({z}^{0.25} \cdot {2}^{0.25}\right) \cdot \color{blue}{\left({2}^{0.25} \cdot {z}^{0.25}\right)}\right)\right) \]
      11. exp-to-pow47.6%

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot \left(\left({z}^{0.25} \cdot {2}^{0.25}\right) \cdot e^{\color{blue}{0.25 \cdot \left(\log 2 + \log z\right)}}\right)\right) \]
      15. *-commutative46.1%

        \[\leadsto 0.5 \cdot \left(x \cdot \left(\left({z}^{0.25} \cdot {2}^{0.25}\right) \cdot e^{\color{blue}{\left(\log 2 + \log z\right) \cdot 0.25}}\right)\right) \]
      16. exp-prod46.1%

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

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

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

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

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

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

    if -1300 < x < 2.75000000000000013e-81

    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -y \cdot \color{blue}{\left(\left({z}^{0.25} \cdot {2}^{0.25}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)} \]
      11. *-commutative41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 59.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{z \cdot 2}\\ \mathbf{if}\;t \leq 0.0015:\\ \;\;\;\;\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 (* z 2.0))))
   (if (<= t 0.0015) (* (- (* 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((z * 2.0));
	double tmp;
	if (t <= 0.0015) {
		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((z * 2.0d0))
    if (t <= 0.0015d0) 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((z * 2.0));
	double tmp;
	if (t <= 0.0015) {
		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((z * 2.0))
	tmp = 0
	if t <= 0.0015:
		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(z * 2.0))
	tmp = 0.0
	if (t <= 0.0015)
		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((z * 2.0));
	tmp = 0.0;
	if (t <= 0.0015)
		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[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 0.0015], 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{z \cdot 2}\\
\mathbf{if}\;t \leq 0.0015:\\
\;\;\;\;\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 < 0.0015

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0015 < t

    1. Initial program 98.5%

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

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

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

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

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

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

        \[\leadsto \left(\left(x \cdot \left(-1 \cdot \frac{y}{x} + \color{blue}{\sqrt{0.5} \cdot \sqrt{0.5}}\right)\right) \cdot \sqrt{z \cdot 2}\right) \cdot 1 \]
      2. rem-square-sqrt26.4%

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

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

        \[\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 \]
      5. unsub-neg26.4%

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

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

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

Alternative 11: 57.3% accurate, 1.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;y \cdot \left(-\frac{{\left(z \cdot 2\right)}^{1.5}}{z \cdot 2}\right)\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000004e40 < t

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{{0}^{3} - {\left(\sqrt{z \cdot 2}\right)}^{3}}{0 \cdot 0 + \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2} + 0 \cdot \sqrt{z \cdot 2}\right)}} \]
      3. metadata-eval20.0%

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

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

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

        \[\leadsto y \cdot \frac{0 - \color{blue}{{\left(z \cdot 2\right)}^{1}} \cdot \sqrt{z \cdot 2}}{0 \cdot 0 + \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2} + 0 \cdot \sqrt{z \cdot 2}\right)} \]
      7. pow1/220.0%

        \[\leadsto y \cdot \frac{0 - {\left(z \cdot 2\right)}^{1} \cdot \color{blue}{{\left(z \cdot 2\right)}^{0.5}}}{0 \cdot 0 + \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2} + 0 \cdot \sqrt{z \cdot 2}\right)} \]
      8. pow-prod-up20.0%

        \[\leadsto y \cdot \frac{0 - \color{blue}{{\left(z \cdot 2\right)}^{\left(1 + 0.5\right)}}}{0 \cdot 0 + \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2} + 0 \cdot \sqrt{z \cdot 2}\right)} \]
      9. metadata-eval20.0%

        \[\leadsto y \cdot \frac{0 - {\left(z \cdot 2\right)}^{\color{blue}{1.5}}}{0 \cdot 0 + \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2} + 0 \cdot \sqrt{z \cdot 2}\right)} \]
      10. metadata-eval20.0%

        \[\leadsto y \cdot \frac{0 - {\left(z \cdot 2\right)}^{1.5}}{\color{blue}{0} + \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2} + 0 \cdot \sqrt{z \cdot 2}\right)} \]
      11. add-sqr-sqrt20.0%

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

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

        \[\leadsto y \cdot \frac{\color{blue}{-{\left(z \cdot 2\right)}^{1.5}}}{0 + \left(z \cdot 2 + 0 \cdot \sqrt{z \cdot 2}\right)} \]
      2. *-commutative20.0%

        \[\leadsto y \cdot \frac{-{\color{blue}{\left(2 \cdot z\right)}}^{1.5}}{0 + \left(z \cdot 2 + 0 \cdot \sqrt{z \cdot 2}\right)} \]
      3. +-lft-identity20.0%

        \[\leadsto y \cdot \frac{-{\left(2 \cdot z\right)}^{1.5}}{\color{blue}{z \cdot 2 + 0 \cdot \sqrt{z \cdot 2}}} \]
      4. mul0-lft20.0%

        \[\leadsto y \cdot \frac{-{\left(2 \cdot z\right)}^{1.5}}{z \cdot 2 + \color{blue}{0}} \]
      5. +-rgt-identity20.0%

        \[\leadsto y \cdot \frac{-{\left(2 \cdot z\right)}^{1.5}}{\color{blue}{z \cdot 2}} \]
      6. *-commutative20.0%

        \[\leadsto y \cdot \frac{-{\left(2 \cdot z\right)}^{1.5}}{\color{blue}{2 \cdot z}} \]
    10. Simplified20.0%

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

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

Alternative 12: 56.8% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 29.7% accurate, 2.0× speedup?

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

\\
\sqrt{z \cdot 2} \cdot \left(-y\right)
\end{array}
Derivation
  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. Add Preprocessing
  3. Taylor expanded in t around 0 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 2.3% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \sqrt{\color{blue}{\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}}} \]
    4. add-sqr-sqrt2.6%

      \[\leadsto y \cdot \sqrt{\color{blue}{z \cdot 2}} \]
  8. Applied egg-rr2.6%

    \[\leadsto y \cdot \color{blue}{\sqrt{z \cdot 2}} \]
  9. Add Preprocessing

Developer Target 1: 99.4% accurate, 0.7× speedup?

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

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

Reproduce

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

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

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