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

Percentage Accurate: 99.4% → 99.8%
Time: 16.2s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 92.3% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 t t) < 0.0050000000000000001 or 4.9999999999999997e303 < (*.f64 t t)

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0050000000000000001 < (*.f64 t t) < 4.9999999999999997e303

    1. Initial program 98.1%

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

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

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

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

        \[\leadsto \left(-1 \cdot {\left(\sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot y\right)}\right)}^{1}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      4. associate-*r*67.2%

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

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

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

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

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

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

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

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

Alternative 4: 66.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 3.1 \cdot 10^{+161} \lor \neg \left(t \leq 2.9 \cdot 10^{+215}\right):\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1 < t < 3.10000000000000007e161 or 2.8999999999999999e215 < t

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt{\left(2 \cdot z\right) \cdot e^{{t}^{2}}}} \]
    9. Taylor expanded in t around 0 64.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. Step-by-step derivation
      1. +-commutative42.4%

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

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

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

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

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

    if 3.10000000000000007e161 < t < 2.8999999999999999e215

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. associate-*l*75.0%

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

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

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

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

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

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

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

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{{t}^{2} \cdot \frac{1}{2}}} \]
      10. metadata-eval75.0%

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{0.5 \cdot {t}^{2}}} \]
      12. *-un-lft-identity75.0%

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
      16. *-un-lft-identity87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 60.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 2.35 \cdot 10^{+219} \lor \neg \left(t \leq 1.7 \cdot 10^{+230}\right):\\
\;\;\;\;\sqrt{z} \cdot \left(\left(-y\right) \cdot \left(t \cdot \sqrt{2}\right)\right)\\

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


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

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8000000000000001e115 < t < 2.35000000000000007e219 or 1.69999999999999993e230 < t

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. associate-*l*84.4%

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

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

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

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

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

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

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

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{{t}^{2} \cdot \frac{1}{2}}} \]
      10. metadata-eval84.4%

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{0.5 \cdot {t}^{2}}} \]
      12. *-un-lft-identity84.4%

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
      16. *-un-lft-identity87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.35000000000000007e219 < t < 1.69999999999999993e230

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. associate-*l*20.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{0.5 \cdot {t}^{2}}} \]
      12. *-un-lft-identity20.0%

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
      16. *-un-lft-identity20.0%

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{\sqrt{e^{{t}^{2}}}}\right) \]
    5. Applied egg-rr20.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\mathsf{fma}\left(t, t, 1\right) \cdot 2\right) \cdot z} \cdot \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \]
      5. add-sqr-sqrt80.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 79.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.14000000000000001 < t < 2.9999999999999999e215

    1. Initial program 97.0%

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

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

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

        \[\leadsto \left(-1 \cdot {\color{blue}{\left(\sqrt{z} \cdot \left(y \cdot \sqrt{2}\right)\right)}}^{1}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      3. *-commutative65.6%

        \[\leadsto \left(-1 \cdot {\left(\sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot y\right)}\right)}^{1}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      4. associate-*r*65.6%

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

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

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

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

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

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

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

    if 2.9999999999999999e215 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 0.14:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right)\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+215}:\\ \;\;\;\;\left(y \cdot \sqrt{2 \cdot z}\right) \cdot \left(-e^{\frac{t \cdot t}{2}}\right)\\ \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: 64.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+215}:\\
\;\;\;\;\sqrt{z \cdot \left(2 \cdot \mathsf{fma}\left(t, t, 1\right)\right)} \cdot \left(-y\right)\\

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


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

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.0999999999999998e73 < t < 2.8e215

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. associate-*l*70.0%

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

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

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

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

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

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

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

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{{t}^{2} \cdot \frac{1}{2}}} \]
      10. metadata-eval70.0%

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{0.5 \cdot {t}^{2}}} \]
      12. *-un-lft-identity70.0%

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
      16. *-un-lft-identity75.0%

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{\sqrt{e^{{t}^{2}}}}\right) \]
    5. Applied egg-rr75.0%

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

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

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

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

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

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

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

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

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

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

    if 2.8e215 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 73.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 2.05 \cdot 10^{+215}:\\
\;\;\;\;\sqrt{z \cdot \left(2 \cdot \mathsf{fma}\left(t, t, 1\right)\right)} \cdot \left(-y\right)\\

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


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

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 82.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. +-commutative44.1%

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

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

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

      \[\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. Step-by-step derivation
      1. sqrt-prod81.0%

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

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

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

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

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

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

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

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

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

    if 5.1000000000000001e160 < t < 2.0500000000000002e215

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. associate-*l*75.0%

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

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

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

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

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

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

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

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{{t}^{2} \cdot \frac{1}{2}}} \]
      10. metadata-eval75.0%

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{0.5 \cdot {t}^{2}}} \]
      12. *-un-lft-identity75.0%

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
      16. *-un-lft-identity87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0500000000000002e215 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.1 \cdot 10^{+160}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right)\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+215}:\\ \;\;\;\;\sqrt{z \cdot \left(2 \cdot \mathsf{fma}\left(t, t, 1\right)\right)} \cdot \left(-y\right)\\ \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 9: 65.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.1999999999999998e73 < t

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. associate-*l*70.5%

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

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

        \[\leadsto -\color{blue}{\left(\sqrt{z} \cdot \left(y \cdot \sqrt{2}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      4. *-commutative70.5%

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

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

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

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

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{{t}^{2} \cdot \frac{1}{2}}} \]
      10. metadata-eval70.5%

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{0.5 \cdot {t}^{2}}} \]
      12. *-un-lft-identity70.5%

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
      16. *-un-lft-identity72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 99.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 11: 59.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3e112 < t

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. associate-*l*75.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{0.5 \cdot {t}^{2}}} \]
      12. *-un-lft-identity75.7%

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
      16. *-un-lft-identity78.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 60.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.35e114 < t

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. associate-*l*75.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{0.5 \cdot {t}^{2}}} \]
      12. *-un-lft-identity75.7%

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
      16. *-un-lft-identity78.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 42.7% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+53} \lor \neg \left(x \leq 5.5 \cdot 10^{-100}\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 < -4.5000000000000002e53 or 5.50000000000000011e-100 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5000000000000002e53 < x < 5.50000000000000011e-100

    1. Initial program 99.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. associate-*l*79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
      16. *-un-lft-identity82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 56.7% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 29.0% accurate, 2.0× speedup?

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

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

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

    \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
  4. Step-by-step derivation
    1. associate-*l*57.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{0.5 \cdot {t}^{2}}} \]
    12. *-un-lft-identity57.8%

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

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

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

      \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
    16. *-un-lft-identity59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 2.3% accurate, 2.0× speedup?

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

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

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

    \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(y \cdot \sqrt{2}\right) \cdot \sqrt{z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
  4. Step-by-step derivation
    1. associate-*l*57.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -\left(y \cdot \sqrt{z \cdot 2}\right) \cdot e^{\color{blue}{0.5 \cdot {t}^{2}}} \]
    12. *-un-lft-identity57.8%

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

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

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

      \[\leadsto -y \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{e^{1 \cdot \left(0.5 \cdot {t}^{2}\right)}}\right) \]
    16. *-un-lft-identity59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto y \cdot \sqrt{2 \cdot z} \]
  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 2024067 
(FPCore (x y z t)
  :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
  :precision binary64

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

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