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

Percentage Accurate: 99.3% → 99.8%
Time: 17.1s
Alternatives: 10
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 10 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.3% 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, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 43.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 3.8 \cdot 10^{-98}:\\
\;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\

\mathbf{elif}\;y \leq 2.8 \cdot 10^{-20} \lor \neg \left(y \leq 9.5 \cdot 10^{+28}\right):\\
\;\;\;\;y \cdot \left(-\sqrt{z \cdot 2}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.5000000000000002e56

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \color{blue}{\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right)}\right)} \]
      13. swap-sqr63.0%

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

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

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

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

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

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

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

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

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

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

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

    if -5.5000000000000002e56 < y < 3.8000000000000003e-98

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right) \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)}} \]
      10. rem-square-sqrt24.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{z \cdot \left(0.5 \cdot \color{blue}{{x}^{2}}\right)} \]
    12. Simplified20.4%

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

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 0.5} \cdot \sqrt{{x}^{2}}} \]
      3. *-commutative18.7%

        \[\leadsto \sqrt{\color{blue}{0.5 \cdot z}} \cdot \sqrt{{x}^{2}} \]
      4. unpow218.7%

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \sqrt{\color{blue}{x \cdot x}} \]
      5. sqrt-prod20.6%

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

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \color{blue}{x} \]
    14. Applied egg-rr43.1%

      \[\leadsto \color{blue}{\sqrt{0.5 \cdot z} \cdot x} \]

    if 3.8000000000000003e-98 < y < 2.8000000000000003e-20 or 9.49999999999999927e28 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -y \cdot \sqrt{\color{blue}{z \cdot 2}} \]
    12. Applied egg-rr48.2%

      \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
    13. Step-by-step derivation
      1. distribute-rgt-neg-in48.2%

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

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

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

    if 2.8000000000000003e-20 < y < 9.49999999999999927e28

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+56}:\\ \;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(y \cdot \left(y - x\right)\right)\right)}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-98}:\\ \;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-20} \lor \neg \left(y \leq 9.5 \cdot 10^{+28}\right):\\ \;\;\;\;y \cdot \left(-\sqrt{z \cdot 2}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \sqrt{0.5}\right) \cdot \sqrt{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 44.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\

\mathbf{elif}\;x \leq 10^{-62}:\\
\;\;\;\;y \cdot \left(-\sqrt{z \cdot 2}\right)\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 0.5} \cdot \sqrt{{x}^{2}}} \]
      3. *-commutative2.0%

        \[\leadsto \sqrt{\color{blue}{0.5 \cdot z}} \cdot \sqrt{{x}^{2}} \]
      4. unpow22.0%

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \sqrt{\color{blue}{x \cdot x}} \]
      5. sqrt-prod0.0%

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

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \color{blue}{x} \]
    14. Applied egg-rr47.4%

      \[\leadsto \color{blue}{\sqrt{0.5 \cdot z} \cdot x} \]

    if -1.6e14 < x < 1e-62

    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. Step-by-step derivation
      1. *-commutative98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
    13. Step-by-step derivation
      1. distribute-rgt-neg-in40.9%

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

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

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

    if 1e-62 < x

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right) \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)}} \]
      10. rem-square-sqrt58.8%

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

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

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

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

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

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

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

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

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

Alternative 4: 56.9% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2e8 < t < 1.40000000000000001e239

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.40000000000000001e239 < 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. *-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \color{blue}{\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right)}\right)} \]
      13. swap-sqr8.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 44.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -45000000000000:\\
\;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\

\mathbf{elif}\;x \leq 1.25 \cdot 10^{-62}:\\
\;\;\;\;y \cdot \left(-\sqrt{z \cdot 2}\right)\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 0.5} \cdot \sqrt{{x}^{2}}} \]
      3. *-commutative2.0%

        \[\leadsto \sqrt{\color{blue}{0.5 \cdot z}} \cdot \sqrt{{x}^{2}} \]
      4. unpow22.0%

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \sqrt{\color{blue}{x \cdot x}} \]
      5. sqrt-prod0.0%

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

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \color{blue}{x} \]
    14. Applied egg-rr47.4%

      \[\leadsto \color{blue}{\sqrt{0.5 \cdot z} \cdot x} \]

    if -4.5e13 < x < 1.25e-62

    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. Step-by-step derivation
      1. *-commutative98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
    13. Step-by-step derivation
      1. distribute-rgt-neg-in40.9%

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

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

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

    if 1.25e-62 < x

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right) \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)}} \]
      10. rem-square-sqrt58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 59.4% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e5 < t

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right) \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)}} \]
      10. rem-square-sqrt20.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 43.6% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+56}:\\ \;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(y \cdot \left(y - x\right)\right)\right)}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-96} \lor \neg \left(y \leq 5.3 \cdot 10^{-20}\right) \land y \leq 1.56 \cdot 10^{+29}:\\ \;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-\sqrt{z \cdot 2}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -4.8e+56)
   (sqrt (* 2.0 (* z (* y (- y x)))))
   (if (or (<= y 1.25e-96) (and (not (<= y 5.3e-20)) (<= y 1.56e+29)))
     (* x (sqrt (* 0.5 z)))
     (* y (- (sqrt (* z 2.0)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4.8e+56) {
		tmp = sqrt((2.0 * (z * (y * (y - x)))));
	} else if ((y <= 1.25e-96) || (!(y <= 5.3e-20) && (y <= 1.56e+29))) {
		tmp = x * sqrt((0.5 * z));
	} else {
		tmp = y * -sqrt((z * 2.0));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-4.8d+56)) then
        tmp = sqrt((2.0d0 * (z * (y * (y - x)))))
    else if ((y <= 1.25d-96) .or. (.not. (y <= 5.3d-20)) .and. (y <= 1.56d+29)) then
        tmp = x * sqrt((0.5d0 * z))
    else
        tmp = y * -sqrt((z * 2.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4.8e+56) {
		tmp = Math.sqrt((2.0 * (z * (y * (y - x)))));
	} else if ((y <= 1.25e-96) || (!(y <= 5.3e-20) && (y <= 1.56e+29))) {
		tmp = x * Math.sqrt((0.5 * z));
	} else {
		tmp = y * -Math.sqrt((z * 2.0));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -4.8e+56:
		tmp = math.sqrt((2.0 * (z * (y * (y - x)))))
	elif (y <= 1.25e-96) or (not (y <= 5.3e-20) and (y <= 1.56e+29)):
		tmp = x * math.sqrt((0.5 * z))
	else:
		tmp = y * -math.sqrt((z * 2.0))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -4.8e+56)
		tmp = sqrt(Float64(2.0 * Float64(z * Float64(y * Float64(y - x)))));
	elseif ((y <= 1.25e-96) || (!(y <= 5.3e-20) && (y <= 1.56e+29)))
		tmp = Float64(x * sqrt(Float64(0.5 * z)));
	else
		tmp = Float64(y * Float64(-sqrt(Float64(z * 2.0))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -4.8e+56)
		tmp = sqrt((2.0 * (z * (y * (y - x)))));
	elseif ((y <= 1.25e-96) || (~((y <= 5.3e-20)) && (y <= 1.56e+29)))
		tmp = x * sqrt((0.5 * z));
	else
		tmp = y * -sqrt((z * 2.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.8e+56], N[Sqrt[N[(2.0 * N[(z * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[y, 1.25e-96], And[N[Not[LessEqual[y, 5.3e-20]], $MachinePrecision], LessEqual[y, 1.56e+29]]], N[(x * N[Sqrt[N[(0.5 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * (-N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-96} \lor \neg \left(y \leq 5.3 \cdot 10^{-20}\right) \land y \leq 1.56 \cdot 10^{+29}:\\
\;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \color{blue}{\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right)}\right)} \]
      13. swap-sqr63.0%

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

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000027e56 < y < 1.24999999999999999e-96 or 5.3000000000000002e-20 < y < 1.5599999999999999e29

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right) \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)}} \]
      10. rem-square-sqrt24.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{z \cdot \left(0.5 \cdot \color{blue}{{x}^{2}}\right)} \]
    12. Simplified20.3%

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

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 0.5} \cdot \sqrt{{x}^{2}}} \]
      3. *-commutative18.7%

        \[\leadsto \sqrt{\color{blue}{0.5 \cdot z}} \cdot \sqrt{{x}^{2}} \]
      4. unpow218.7%

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \sqrt{\color{blue}{x \cdot x}} \]
      5. sqrt-prod19.7%

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

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \color{blue}{x} \]
    14. Applied egg-rr43.3%

      \[\leadsto \color{blue}{\sqrt{0.5 \cdot z} \cdot x} \]

    if 1.24999999999999999e-96 < y < 5.3000000000000002e-20 or 1.5599999999999999e29 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -y \cdot \sqrt{\color{blue}{z \cdot 2}} \]
    12. Applied egg-rr48.2%

      \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
    13. Step-by-step derivation
      1. distribute-rgt-neg-in48.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+56}:\\ \;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(y \cdot \left(y - x\right)\right)\right)}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-96} \lor \neg \left(y \leq 5.3 \cdot 10^{-20}\right) \land y \leq 1.56 \cdot 10^{+29}:\\ \;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-\sqrt{z \cdot 2}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 42.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -10000000000000 \lor \neg \left(x \leq 3.7 \cdot 10^{+146}\right):\\
\;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1e13 or 3.70000000000000004e146 < x

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right) \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)}} \]
      10. rem-square-sqrt24.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 0.5} \cdot \sqrt{{x}^{2}}} \]
      3. *-commutative25.1%

        \[\leadsto \sqrt{\color{blue}{0.5 \cdot z}} \cdot \sqrt{{x}^{2}} \]
      4. unpow225.1%

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \sqrt{\color{blue}{x \cdot x}} \]
      5. sqrt-prod19.2%

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

        \[\leadsto \sqrt{0.5 \cdot z} \cdot \color{blue}{x} \]
    14. Applied egg-rr50.6%

      \[\leadsto \color{blue}{\sqrt{0.5 \cdot z} \cdot x} \]

    if -1e13 < x < 3.70000000000000004e146

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -y \cdot \sqrt{\color{blue}{z \cdot 2}} \]
    12. Applied egg-rr37.4%

      \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
    13. Step-by-step derivation
      1. distribute-rgt-neg-in37.4%

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

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

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

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

Alternative 9: 2.3% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \sqrt{\color{blue}{2 \cdot z}} \]
  14. Simplified1.7%

    \[\leadsto \color{blue}{y \cdot \sqrt{2 \cdot z}} \]
  15. Final simplification1.7%

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

Alternative 10: 29.7% accurate, 2.0× speedup?

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

\\
x \cdot \sqrt{0.5 \cdot z}
\end{array}
Derivation
  1. Initial program 99.1%

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

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{2} \cdot \left(\color{blue}{x \cdot 0.5} - y\right)\right) \cdot \sqrt{z} \]
    3. fma-neg52.4%

      \[\leadsto \left(\sqrt{2} \cdot \color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)}\right) \cdot \sqrt{z} \]
    4. associate-*l*52.4%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot \sqrt{z}\right)} \]
    5. fma-neg52.4%

      \[\leadsto \sqrt{2} \cdot \left(\color{blue}{\left(x \cdot 0.5 - y\right)} \cdot \sqrt{z}\right) \]
    6. *-commutative52.4%

      \[\leadsto \sqrt{2} \cdot \left(\left(\color{blue}{0.5 \cdot x} - y\right) \cdot \sqrt{z}\right) \]
  7. Simplified52.4%

    \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)} \]
  8. Step-by-step derivation
    1. associate-*r*52.4%

      \[\leadsto \color{blue}{\left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \sqrt{z}} \]
    2. *-commutative52.4%

      \[\leadsto \color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)} \]
    3. add-sqr-sqrt22.1%

      \[\leadsto \color{blue}{\sqrt{\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)} \cdot \sqrt{\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)}} \]
    4. sqrt-unprod27.0%

      \[\leadsto \color{blue}{\sqrt{\left(\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)\right) \cdot \left(\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)\right)}} \]
    5. *-commutative27.0%

      \[\leadsto \sqrt{\color{blue}{\left(\left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \sqrt{z}\right)} \cdot \left(\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)\right)} \]
    6. associate-*r*27.0%

      \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)} \cdot \left(\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right)\right)} \]
    7. *-commutative27.0%

      \[\leadsto \sqrt{\left(\sqrt{2} \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right) \cdot \color{blue}{\left(\left(\sqrt{2} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \sqrt{z}\right)}} \]
    8. associate-*r*27.0%

      \[\leadsto \sqrt{\left(\sqrt{2} \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)}} \]
    9. swap-sqr27.0%

      \[\leadsto \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right) \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)}} \]
    10. rem-square-sqrt27.1%

      \[\leadsto \sqrt{\color{blue}{2} \cdot \left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right) \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)} \]
    11. *-commutative27.1%

      \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right)} \cdot \left(\left(0.5 \cdot x - y\right) \cdot \sqrt{z}\right)\right)} \]
    12. *-commutative27.1%

      \[\leadsto \sqrt{2 \cdot \left(\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right) \cdot \color{blue}{\left(\sqrt{z} \cdot \left(0.5 \cdot x - y\right)\right)}\right)} \]
    13. swap-sqr27.4%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(\sqrt{z} \cdot \sqrt{z}\right) \cdot \left(\left(0.5 \cdot x - y\right) \cdot \left(0.5 \cdot x - y\right)\right)\right)}} \]
    14. add-sqr-sqrt27.4%

      \[\leadsto \sqrt{2 \cdot \left(\color{blue}{z} \cdot \left(\left(0.5 \cdot x - y\right) \cdot \left(0.5 \cdot x - y\right)\right)\right)} \]
    15. unpow227.4%

      \[\leadsto \sqrt{2 \cdot \left(z \cdot \color{blue}{{\left(0.5 \cdot x - y\right)}^{2}}\right)} \]
  9. Applied egg-rr27.4%

    \[\leadsto \color{blue}{\sqrt{2 \cdot \left(z \cdot {\left(\mathsf{fma}\left(0.5, x, -y\right)\right)}^{2}\right)}} \]
  10. Taylor expanded in x around inf 17.9%

    \[\leadsto \sqrt{\color{blue}{0.5 \cdot \left({x}^{2} \cdot z\right)}} \]
  11. Step-by-step derivation
    1. associate-*r*17.9%

      \[\leadsto \sqrt{\color{blue}{\left(0.5 \cdot {x}^{2}\right) \cdot z}} \]
    2. unpow217.9%

      \[\leadsto \sqrt{\left(0.5 \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot z} \]
    3. associate-*l*17.9%

      \[\leadsto \sqrt{\color{blue}{\left(\left(0.5 \cdot x\right) \cdot x\right)} \cdot z} \]
    4. *-commutative17.9%

      \[\leadsto \sqrt{\color{blue}{z \cdot \left(\left(0.5 \cdot x\right) \cdot x\right)}} \]
    5. associate-*l*17.9%

      \[\leadsto \sqrt{z \cdot \color{blue}{\left(0.5 \cdot \left(x \cdot x\right)\right)}} \]
    6. unpow217.9%

      \[\leadsto \sqrt{z \cdot \left(0.5 \cdot \color{blue}{{x}^{2}}\right)} \]
  12. Simplified17.9%

    \[\leadsto \sqrt{\color{blue}{z \cdot \left(0.5 \cdot {x}^{2}\right)}} \]
  13. Step-by-step derivation
    1. associate-*r*17.9%

      \[\leadsto \sqrt{\color{blue}{\left(z \cdot 0.5\right) \cdot {x}^{2}}} \]
    2. sqrt-prod15.6%

      \[\leadsto \color{blue}{\sqrt{z \cdot 0.5} \cdot \sqrt{{x}^{2}}} \]
    3. *-commutative15.6%

      \[\leadsto \sqrt{\color{blue}{0.5 \cdot z}} \cdot \sqrt{{x}^{2}} \]
    4. unpow215.6%

      \[\leadsto \sqrt{0.5 \cdot z} \cdot \sqrt{\color{blue}{x \cdot x}} \]
    5. sqrt-prod13.1%

      \[\leadsto \sqrt{0.5 \cdot z} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \]
    6. add-sqr-sqrt27.6%

      \[\leadsto \sqrt{0.5 \cdot z} \cdot \color{blue}{x} \]
  14. Applied egg-rr27.6%

    \[\leadsto \color{blue}{\sqrt{0.5 \cdot z} \cdot x} \]
  15. Final simplification27.6%

    \[\leadsto x \cdot \sqrt{0.5 \cdot z} \]
  16. Add Preprocessing

Developer target: 99.3% 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 2024026 
(FPCore (x y z t)
  :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
  :precision binary64

  :herbie-target
  (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0)))

  (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))