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

Percentage Accurate: 99.4% → 99.5%
Time: 19.2s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 99.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.5% accurate, 0.7× speedup?

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

\\
{\left(e^{t\_m}\right)}^{\left(0.5 \cdot t\_m\right)} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right)
\end{array}
Derivation
  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. Step-by-step derivation
    1. exp-sqrt99.8%

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 72.9% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ t_2 := \sqrt{z \cdot 2}\\ \mathbf{if}\;t\_m \leq 6.5 \cdot 10^{-31}:\\ \;\;\;\;t\_1 \cdot t\_2\\ \mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+74}:\\ \;\;\;\;t\_1 \cdot \sqrt[3]{{\left(z \cdot 2\right)}^{1.5}}\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \left(t\_2 \cdot t\_m\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (x y z t_m)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* z 2.0))))
   (if (<= t_m 6.5e-31)
     (* t_1 t_2)
     (if (<= t_m 1.05e+74)
       (* t_1 (cbrt (pow (* z 2.0) 1.5)))
       (* t_1 (* t_2 t_m))))))
t_m = fabs(t);
double code(double x, double y, double z, double t_m) {
	double t_1 = (x * 0.5) - y;
	double t_2 = sqrt((z * 2.0));
	double tmp;
	if (t_m <= 6.5e-31) {
		tmp = t_1 * t_2;
	} else if (t_m <= 1.05e+74) {
		tmp = t_1 * cbrt(pow((z * 2.0), 1.5));
	} else {
		tmp = t_1 * (t_2 * t_m);
	}
	return tmp;
}
t_m = Math.abs(t);
public static double code(double x, double y, double z, double t_m) {
	double t_1 = (x * 0.5) - y;
	double t_2 = Math.sqrt((z * 2.0));
	double tmp;
	if (t_m <= 6.5e-31) {
		tmp = t_1 * t_2;
	} else if (t_m <= 1.05e+74) {
		tmp = t_1 * Math.cbrt(Math.pow((z * 2.0), 1.5));
	} else {
		tmp = t_1 * (t_2 * t_m);
	}
	return tmp;
}
t_m = abs(t)
function code(x, y, z, t_m)
	t_1 = Float64(Float64(x * 0.5) - y)
	t_2 = sqrt(Float64(z * 2.0))
	tmp = 0.0
	if (t_m <= 6.5e-31)
		tmp = Float64(t_1 * t_2);
	elseif (t_m <= 1.05e+74)
		tmp = Float64(t_1 * cbrt((Float64(z * 2.0) ^ 1.5)));
	else
		tmp = Float64(t_1 * Float64(t_2 * t_m));
	end
	return tmp
end
t_m = N[Abs[t], $MachinePrecision]
code[x_, y_, z_, t$95$m_] := 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$95$m, 6.5e-31], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+74], N[(t$95$1 * N[Power[N[Power[N[(z * 2.0), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$2 * t$95$m), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_m = \left|t\right|

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

\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+74}:\\
\;\;\;\;t\_1 \cdot \sqrt[3]{{\left(z \cdot 2\right)}^{1.5}}\\

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


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

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

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

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

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

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

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

    if 6.49999999999999967e-31 < t < 1.0499999999999999e74

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0499999999999999e74 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 85.1% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

    if 1 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 85.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4000000000000001e24 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 76.1% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(t\_m \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. *-commutative99.8%

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

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

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

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

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

    if 1 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 simplification67.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: 99.4% accurate, 1.0× speedup?

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

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

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

Alternative 8: 85.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 41.7% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+107}:\\
\;\;\;\;\left(y \cdot t\_1\right) \cdot \left(-t\_m\right)\\

\mathbf{elif}\;y \leq -2.4 \cdot 10^{+24} \lor \neg \left(y \leq 8 \cdot 10^{+83}\right):\\
\;\;\;\;y \cdot \left(-t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.6999999999999998e107

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)} \]
      3. distribute-rgt-neg-in34.0%

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

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

        \[\leadsto t \cdot \left(-y \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{2}\right)}\right) \]
      6. distribute-lft-neg-in34.0%

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

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

        \[\leadsto t \cdot \left(\left(-y\right) \cdot \left(\color{blue}{e^{\log z \cdot 0.5}} \cdot \sqrt{2}\right)\right) \]
      9. unpow1/234.0%

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

        \[\leadsto t \cdot \left(\left(-y\right) \cdot \left(e^{\log z \cdot 0.5} \cdot \color{blue}{e^{\log 2 \cdot 0.5}}\right)\right) \]
      11. exp-sum34.0%

        \[\leadsto t \cdot \left(\left(-y\right) \cdot \color{blue}{e^{\log z \cdot 0.5 + \log 2 \cdot 0.5}}\right) \]
      12. distribute-rgt-in34.0%

        \[\leadsto t \cdot \left(\left(-y\right) \cdot e^{\color{blue}{0.5 \cdot \left(\log z + \log 2\right)}}\right) \]
      13. log-prod34.0%

        \[\leadsto t \cdot \left(\left(-y\right) \cdot e^{0.5 \cdot \color{blue}{\log \left(z \cdot 2\right)}}\right) \]
      14. log-pow34.0%

        \[\leadsto t \cdot \left(\left(-y\right) \cdot e^{\color{blue}{\log \left({\left(z \cdot 2\right)}^{0.5}\right)}}\right) \]
      15. unpow1/234.0%

        \[\leadsto t \cdot \left(\left(-y\right) \cdot e^{\log \color{blue}{\left(\sqrt{z \cdot 2}\right)}}\right) \]
      16. rem-exp-log34.0%

        \[\leadsto t \cdot \left(\left(-y\right) \cdot \color{blue}{\sqrt{z \cdot 2}}\right) \]
      17. distribute-lft-neg-out34.0%

        \[\leadsto t \cdot \color{blue}{\left(-y \cdot \sqrt{z \cdot 2}\right)} \]
      18. distribute-rgt-neg-in34.0%

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

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

    if -1.6999999999999998e107 < y < -2.4000000000000001e24 or 8.00000000000000025e83 < y

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-y \cdot \sqrt{2}\right)} \cdot \sqrt{z} \]
      3. distribute-lft-neg-out52.7%

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(-y\right) \cdot \sqrt{z}\right) \cdot \sqrt{2}} \]
      2. distribute-lft-neg-out52.7%

        \[\leadsto \color{blue}{\left(-y \cdot \sqrt{z}\right)} \cdot \sqrt{2} \]
      3. distribute-lft-neg-out52.7%

        \[\leadsto \color{blue}{-\left(y \cdot \sqrt{z}\right) \cdot \sqrt{2}} \]
      4. add-sqr-sqrt43.9%

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(-y\right) \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)} \]
      10. add-sqr-sqrt0.2%

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

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

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

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

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

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

        \[\leadsto -y \cdot \sqrt{\color{blue}{2 \cdot z}} \]
    10. Applied egg-rr53.0%

      \[\leadsto \color{blue}{-y \cdot \sqrt{2 \cdot z}} \]
    11. Step-by-step derivation
      1. *-commutative53.0%

        \[\leadsto -\color{blue}{\sqrt{2 \cdot z} \cdot y} \]
      2. distribute-rgt-neg-in53.0%

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

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

    if -2.4000000000000001e24 < y < 8.00000000000000025e83

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot \left(\color{blue}{e^{\log z \cdot 0.5}} \cdot \sqrt{2}\right)\right) \]
      5. unpow1/239.6%

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

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot e^{0.5 \cdot \color{blue}{\log \left(z \cdot 2\right)}}\right) \]
      10. log-pow39.7%

        \[\leadsto 0.5 \cdot \left(x \cdot e^{\color{blue}{\log \left({\left(z \cdot 2\right)}^{0.5}\right)}}\right) \]
      11. unpow1/239.7%

        \[\leadsto 0.5 \cdot \left(x \cdot e^{\log \color{blue}{\left(\sqrt{z \cdot 2}\right)}}\right) \]
      12. rem-exp-log41.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+107}:\\ \;\;\;\;\left(y \cdot \sqrt{z \cdot 2}\right) \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{+24} \lor \neg \left(y \leq 8 \cdot 10^{+83}\right):\\ \;\;\;\;y \cdot \left(-\sqrt{z \cdot 2}\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \sqrt{z \cdot 2}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 43.2% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+63} \lor \neg \left(x \leq 4.3 \cdot 10^{+110}\right):\\
\;\;\;\;0.5 \cdot \left(x \cdot t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.0500000000000001e63 or 4.30000000000000007e110 < 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. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot \left(\color{blue}{e^{\log z \cdot 0.5}} \cdot \sqrt{2}\right)\right) \]
      5. unpow1/248.8%

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot e^{\color{blue}{\log \left({\left(z \cdot 2\right)}^{0.5}\right)}}\right) \]
      11. unpow1/249.0%

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

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

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

    if -1.0500000000000001e63 < x < 4.30000000000000007e110

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-y \cdot \sqrt{2}\right)} \cdot \sqrt{z} \]
      3. distribute-lft-neg-out40.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-y \cdot \sqrt{z}\right)} \cdot \sqrt{2} \]
      3. distribute-lft-neg-out40.8%

        \[\leadsto \color{blue}{-\left(y \cdot \sqrt{z}\right) \cdot \sqrt{2}} \]
      4. add-sqr-sqrt22.5%

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(-y\right) \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)} \]
      10. add-sqr-sqrt1.5%

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

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

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

        \[\leadsto -\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \left(\sqrt{z} \cdot \sqrt{2}\right) \]
      14. add-sqr-sqrt40.8%

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

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

        \[\leadsto -y \cdot \sqrt{\color{blue}{2 \cdot z}} \]
    10. Applied egg-rr40.9%

      \[\leadsto \color{blue}{-y \cdot \sqrt{2 \cdot z}} \]
    11. Step-by-step derivation
      1. *-commutative40.9%

        \[\leadsto -\color{blue}{\sqrt{2 \cdot z} \cdot y} \]
      2. distribute-rgt-neg-in40.9%

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

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

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

Alternative 11: 41.0% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
t_2 := x \cdot t\_1\\
\mathbf{if}\;x \leq -4 \cdot 10^{+63}:\\
\;\;\;\;0.5 \cdot \left(t\_m \cdot t\_2\right)\\

\mathbf{elif}\;x \leq 1.44 \cdot 10^{+110}:\\
\;\;\;\;y \cdot \left(-t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.00000000000000023e63

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot \left(\color{blue}{{z}^{0.5}} \cdot \sqrt{2}\right)\right)\right) \]
      5. exp-to-pow32.3%

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

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot \left(e^{\log z \cdot 0.5} \cdot \color{blue}{{2}^{0.5}}\right)\right)\right) \]
      7. exp-to-pow32.3%

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

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot \color{blue}{e^{\log z \cdot 0.5 + \log 2 \cdot 0.5}}\right)\right) \]
      9. distribute-rgt-in32.3%

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot e^{\color{blue}{0.5 \cdot \left(\log z + \log 2\right)}}\right)\right) \]
      10. log-prod32.3%

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot e^{0.5 \cdot \color{blue}{\log \left(z \cdot 2\right)}}\right)\right) \]
      11. log-pow32.3%

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot e^{\color{blue}{\log \left({\left(z \cdot 2\right)}^{0.5}\right)}}\right)\right) \]
      12. unpow1/232.3%

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot e^{\log \color{blue}{\left(\sqrt{z \cdot 2}\right)}}\right)\right) \]
      13. rem-exp-log32.3%

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

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

    if -4.00000000000000023e63 < x < 1.44e110

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-y \cdot \sqrt{2}\right)} \cdot \sqrt{z} \]
      3. distribute-lft-neg-out40.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-y \cdot \sqrt{z}\right)} \cdot \sqrt{2} \]
      3. distribute-lft-neg-out40.8%

        \[\leadsto \color{blue}{-\left(y \cdot \sqrt{z}\right) \cdot \sqrt{2}} \]
      4. add-sqr-sqrt22.5%

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(-y\right) \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)} \]
      10. add-sqr-sqrt1.5%

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

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

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

        \[\leadsto -\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \left(\sqrt{z} \cdot \sqrt{2}\right) \]
      14. add-sqr-sqrt40.8%

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

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

        \[\leadsto -y \cdot \sqrt{\color{blue}{2 \cdot z}} \]
    10. Applied egg-rr40.9%

      \[\leadsto \color{blue}{-y \cdot \sqrt{2 \cdot z}} \]
    11. Step-by-step derivation
      1. *-commutative40.9%

        \[\leadsto -\color{blue}{\sqrt{2 \cdot z} \cdot y} \]
      2. distribute-rgt-neg-in40.9%

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

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

    if 1.44e110 < 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. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot \left(\color{blue}{e^{\log z \cdot 0.5}} \cdot \sqrt{2}\right)\right) \]
      5. unpow1/255.2%

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot e^{\color{blue}{\log \left({\left(z \cdot 2\right)}^{0.5}\right)}}\right) \]
      11. unpow1/255.5%

        \[\leadsto 0.5 \cdot \left(x \cdot e^{\log \color{blue}{\left(\sqrt{z \cdot 2}\right)}}\right) \]
      12. rem-exp-log58.1%

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

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

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

Alternative 12: 73.4% accurate, 1.9× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ t_2 := \sqrt{z \cdot 2}\\ \mathbf{if}\;t\_m \leq 1:\\ \;\;\;\;t\_1 \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \left(t\_2 \cdot t\_m\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (x y z t_m)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* z 2.0))))
   (if (<= t_m 1.0) (* t_1 t_2) (* t_1 (* t_2 t_m)))))
t_m = fabs(t);
double code(double x, double y, double z, double t_m) {
	double t_1 = (x * 0.5) - y;
	double t_2 = sqrt((z * 2.0));
	double tmp;
	if (t_m <= 1.0) {
		tmp = t_1 * t_2;
	} else {
		tmp = t_1 * (t_2 * t_m);
	}
	return tmp;
}
t_m = abs(t)
real(8) function code(x, y, z, t_m)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    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_m <= 1.0d0) then
        tmp = t_1 * t_2
    else
        tmp = t_1 * (t_2 * t_m)
    end if
    code = tmp
end function
t_m = Math.abs(t);
public static double code(double x, double y, double z, double t_m) {
	double t_1 = (x * 0.5) - y;
	double t_2 = Math.sqrt((z * 2.0));
	double tmp;
	if (t_m <= 1.0) {
		tmp = t_1 * t_2;
	} else {
		tmp = t_1 * (t_2 * t_m);
	}
	return tmp;
}
t_m = math.fabs(t)
def code(x, y, z, t_m):
	t_1 = (x * 0.5) - y
	t_2 = math.sqrt((z * 2.0))
	tmp = 0
	if t_m <= 1.0:
		tmp = t_1 * t_2
	else:
		tmp = t_1 * (t_2 * t_m)
	return tmp
t_m = abs(t)
function code(x, y, z, t_m)
	t_1 = Float64(Float64(x * 0.5) - y)
	t_2 = sqrt(Float64(z * 2.0))
	tmp = 0.0
	if (t_m <= 1.0)
		tmp = Float64(t_1 * t_2);
	else
		tmp = Float64(t_1 * Float64(t_2 * t_m));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(x, y, z, t_m)
	t_1 = (x * 0.5) - y;
	t_2 = sqrt((z * 2.0));
	tmp = 0.0;
	if (t_m <= 1.0)
		tmp = t_1 * t_2;
	else
		tmp = t_1 * (t_2 * t_m);
	end
	tmp_2 = tmp;
end
t_m = N[Abs[t], $MachinePrecision]
code[x_, y_, z_, t$95$m_] := 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$95$m, 1.0], N[(t$95$1 * t$95$2), $MachinePrecision], N[(t$95$1 * N[(t$95$2 * t$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

    if 1 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 63.3% accurate, 1.9× speedup?

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

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

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


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

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

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

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

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

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

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

    if 1.1499999999999999e89 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot \left(\color{blue}{{z}^{0.5}} \cdot \sqrt{2}\right)\right)\right) \]
      5. exp-to-pow33.3%

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

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot \left(e^{\log z \cdot 0.5} \cdot \color{blue}{{2}^{0.5}}\right)\right)\right) \]
      7. exp-to-pow33.3%

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

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot \color{blue}{e^{\log z \cdot 0.5 + \log 2 \cdot 0.5}}\right)\right) \]
      9. distribute-rgt-in33.3%

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot e^{\color{blue}{0.5 \cdot \left(\log z + \log 2\right)}}\right)\right) \]
      10. log-prod33.3%

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot e^{0.5 \cdot \color{blue}{\log \left(z \cdot 2\right)}}\right)\right) \]
      11. log-pow33.3%

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot e^{\color{blue}{\log \left({\left(z \cdot 2\right)}^{0.5}\right)}}\right)\right) \]
      12. unpow1/233.3%

        \[\leadsto 0.5 \cdot \left(t \cdot \left(x \cdot e^{\log \color{blue}{\left(\sqrt{z \cdot 2}\right)}}\right)\right) \]
      13. rem-exp-log33.3%

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

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

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

Alternative 14: 29.8% accurate, 2.0× speedup?

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

\\
y \cdot \left(-\sqrt{z \cdot 2}\right)
\end{array}
Derivation
  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. *-commutative99.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-y \cdot \sqrt{2}\right)} \cdot \sqrt{z} \]
    3. distribute-lft-neg-out27.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-y \cdot \sqrt{z}\right)} \cdot \sqrt{2} \]
    3. distribute-lft-neg-out27.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \left(\sqrt{z} \cdot \sqrt{2}\right) \]
    14. add-sqr-sqrt27.8%

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

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

      \[\leadsto -y \cdot \sqrt{\color{blue}{2 \cdot z}} \]
  10. Applied egg-rr27.9%

    \[\leadsto \color{blue}{-y \cdot \sqrt{2 \cdot z}} \]
  11. Step-by-step derivation
    1. *-commutative27.9%

      \[\leadsto -\color{blue}{\sqrt{2 \cdot z} \cdot y} \]
    2. distribute-rgt-neg-in27.9%

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

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

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

Alternative 15: 2.3% accurate, 2.0× speedup?

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

\\
y \cdot \sqrt{z \cdot 2}
\end{array}
Derivation
  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. *-commutative99.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-y \cdot \sqrt{2}\right)} \cdot \sqrt{z} \]
    3. distribute-lft-neg-out27.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2} \cdot \left(\left(-y\right) \cdot \sqrt{z}\right)\right)\right)} \]
    2. expm1-udef11.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{2} \cdot \left(\left(-y\right) \cdot \sqrt{z}\right)\right)} - 1} \]
    3. *-commutative11.0%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\left(-y\right) \cdot \sqrt{z}\right) \cdot \sqrt{2}}\right)} - 1 \]
    4. associate-*l*11.0%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(-y\right) \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)}\right)} - 1 \]
    5. add-sqr-sqrt9.5%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)\right)} - 1 \]
    6. sqrt-unprod15.1%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)\right)} - 1 \]
    7. sqr-neg15.1%

      \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{y \cdot y}} \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)\right)} - 1 \]
    8. sqrt-unprod1.2%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)\right)} - 1 \]
    9. add-sqr-sqrt2.3%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{y} \cdot \left(\sqrt{z} \cdot \sqrt{2}\right)\right)} - 1 \]
    10. sqrt-prod2.3%

      \[\leadsto e^{\mathsf{log1p}\left(y \cdot \color{blue}{\sqrt{z \cdot 2}}\right)} - 1 \]
    11. *-commutative2.3%

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

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \sqrt{2 \cdot z}\right)} - 1} \]
  11. Step-by-step derivation
    1. expm1-def2.2%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \sqrt{2 \cdot z}\right)\right)} \]
    2. expm1-log1p2.8%

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

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

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

Developer target: 99.4% accurate, 0.7× speedup?

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

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

Reproduce

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

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

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