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

Percentage Accurate: 99.5% → 99.5%
Time: 11.0s
Alternatives: 9
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 9 alternatives:

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

Initial Program: 99.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 1.0× speedup?

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

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

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

Alternative 2: 79.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := e^{\frac{t \cdot t}{2}}\\
\mathbf{if}\;x \cdot 0.5 \leq -2 \cdot 10^{+82} \lor \neg \left(x \cdot 0.5 \leq 2 \cdot 10^{-8}\right):\\
\;\;\;\;t_1 \cdot \left(x \cdot \sqrt{0.5 \cdot z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x 1/2) < -1.9999999999999999e82 or 2e-8 < (*.f64 x 1/2)

    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. add-sqr-sqrt57.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\color{blue}{z} + \log \left(e^{z}\right)\right) \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      11. add-log-exp45.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e82 < (*.f64 x 1/2) < 2e-8

    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. Taylor expanded in x around 0 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot 0.5 \leq -2 \cdot 10^{+82} \lor \neg \left(x \cdot 0.5 \leq 2 \cdot 10^{-8}\right):\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(x \cdot \sqrt{0.5 \cdot z}\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(-\sqrt{z + z}\right)\right)\\ \end{array} \]

Alternative 3: 71.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := e^{\frac{t \cdot t}{2}}\\
\mathbf{if}\;y \leq -2.45 \cdot 10^{+39}:\\
\;\;\;\;t_1 \cdot \left(y \cdot \left(z \cdot -2\right)\right)\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{+74}:\\
\;\;\;\;t_1 \cdot \left(x \cdot \sqrt{0.5 \cdot z}\right)\\

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


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

    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. Taylor expanded in x around 0 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z + z}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. expm1-log1p0.4%

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      5. distribute-rgt-neg-out70.3%

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

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

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

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

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

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

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

        \[\leadsto \left(0 - \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      13. distribute-rgt-neg-out0.3%

        \[\leadsto \left(0 - \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      14. distribute-rgt-neg-out0.3%

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

        \[\leadsto \left(0 - \color{blue}{\sqrt{y \cdot \left(-\sqrt{z + z}\right)} \cdot \sqrt{y \cdot \left(-\sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      16. add-sqr-sqrt0.4%

        \[\leadsto \left(0 - \color{blue}{y \cdot \left(-\sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      17. add-sqr-sqrt0.0%

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

      \[\leadsto \color{blue}{\left(0 - y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    11. Step-by-step derivation
      1. neg-sub064.0%

        \[\leadsto \color{blue}{\left(-y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. distribute-rgt-neg-in64.0%

        \[\leadsto \color{blue}{\left(y \cdot \left(-\left(z + z\right)\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      3. count-264.0%

        \[\leadsto \left(y \cdot \left(-\color{blue}{2 \cdot z}\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      4. distribute-lft-neg-in64.0%

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

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

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

    if -2.44999999999999994e39 < y < 1.55000000000000011e74

    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. add-sqr-sqrt54.3%

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\log \left(e^{z}\right) + \log \left(e^{z}\right)\right)} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      10. add-log-exp27.9%

        \[\leadsto \sqrt{\left(\color{blue}{z} + \log \left(e^{z}\right)\right) \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(x \cdot 0.5 - y\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      11. add-log-exp42.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{0.5 \cdot z} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      4. add-sqr-sqrt77.5%

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

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

    if 1.55000000000000011e74 < y

    1. Initial program 99.9%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. *-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. flip--67.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{z + z} \cdot \left(\left(x \cdot x\right) \cdot 0.25 - y \cdot y\right)}{\color{blue}{\mathsf{fma}\left(x, 0.5, y\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
    3. Applied egg-rr67.0%

      \[\leadsto \color{blue}{\frac{\sqrt{z + z} \cdot \left(\left(x \cdot x\right) \cdot 0.25 - y \cdot y\right)}{\mathsf{fma}\left(x, 0.5, y\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. *-commutative67.0%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot x\right) \cdot 0.25 - y \cdot y\right) \cdot \sqrt{z + z}}}{\mathsf{fma}\left(x, 0.5, y\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. associate-/l*54.7%

        \[\leadsto \color{blue}{\frac{\left(x \cdot x\right) \cdot 0.25 - y \cdot y}{\frac{\mathsf{fma}\left(x, 0.5, y\right)}{\sqrt{z + z}}}} \cdot e^{\frac{t \cdot t}{2}} \]
    5. Simplified54.7%

      \[\leadsto \color{blue}{\frac{\left(x \cdot x\right) \cdot 0.25 - y \cdot y}{\frac{\mathsf{fma}\left(x, 0.5, y\right)}{\sqrt{z + z}}}} \cdot e^{\frac{t \cdot t}{2}} \]
    6. Taylor expanded in x around 0 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.45 \cdot 10^{+39}:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(z \cdot -2\right)\right)\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+74}:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(x \cdot \sqrt{0.5 \cdot z}\right)\\ \mathbf{else}:\\ \;\;\;\;-\sqrt{2 \cdot \left(\left(y \cdot \left(y \cdot z\right)\right) \cdot e^{t \cdot t}\right)}\\ \end{array} \]

Alternative 4: 68.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := e^{\frac{t \cdot t}{2}}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+39} \lor \neg \left(y \leq 9 \cdot 10^{+113}\right):\\
\;\;\;\;t_1 \cdot \left(y \cdot \left(z \cdot -2\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.6e39 or 9.0000000000000001e113 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z + z}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. expm1-log1p1.3%

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
      4. distribute-rgt-neg-out41.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(0 - \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      13. distribute-rgt-neg-out35.4%

        \[\leadsto \left(0 - \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      14. distribute-rgt-neg-out35.4%

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

        \[\leadsto \left(0 - \color{blue}{\sqrt{y \cdot \left(-\sqrt{z + z}\right)} \cdot \sqrt{y \cdot \left(-\sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      16. add-sqr-sqrt1.3%

        \[\leadsto \left(0 - \color{blue}{y \cdot \left(-\sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      17. add-sqr-sqrt0.0%

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

      \[\leadsto \color{blue}{\left(0 - y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    11. Step-by-step derivation
      1. neg-sub068.8%

        \[\leadsto \color{blue}{\left(-y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. distribute-rgt-neg-in68.8%

        \[\leadsto \color{blue}{\left(y \cdot \left(-\left(z + z\right)\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      3. count-268.8%

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

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

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

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

    if -2.6e39 < y < 9.0000000000000001e113

    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. add-sqr-sqrt53.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+39} \lor \neg \left(y \leq 9 \cdot 10^{+113}\right):\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(z \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(x \cdot \sqrt{0.5 \cdot z}\right)\\ \end{array} \]

Alternative 5: 62.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 t t) < 1.75e7

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{z + z} \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{0.25} - y \cdot y\right)}{x \cdot 0.5 + y} \cdot e^{\frac{t \cdot t}{2}} \]
      11. fma-def55.3%

        \[\leadsto \frac{\sqrt{z + z} \cdot \left(\left(x \cdot x\right) \cdot 0.25 - y \cdot y\right)}{\color{blue}{\mathsf{fma}\left(x, 0.5, y\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
    3. Applied egg-rr55.3%

      \[\leadsto \color{blue}{\frac{\sqrt{z + z} \cdot \left(\left(x \cdot x\right) \cdot 0.25 - y \cdot y\right)}{\mathsf{fma}\left(x, 0.5, y\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. *-commutative55.3%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot x\right) \cdot 0.25 - y \cdot y\right) \cdot \sqrt{z + z}}}{\mathsf{fma}\left(x, 0.5, y\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. associate-/l*60.4%

        \[\leadsto \color{blue}{\frac{\left(x \cdot x\right) \cdot 0.25 - y \cdot y}{\frac{\mathsf{fma}\left(x, 0.5, y\right)}{\sqrt{z + z}}}} \cdot e^{\frac{t \cdot t}{2}} \]
    5. Simplified60.4%

      \[\leadsto \color{blue}{\frac{\left(x \cdot x\right) \cdot 0.25 - y \cdot y}{\frac{\mathsf{fma}\left(x, 0.5, y\right)}{\sqrt{z + z}}}} \cdot e^{\frac{t \cdot t}{2}} \]
    6. Taylor expanded in x around 0 46.8%

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

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

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

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

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

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

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

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

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

    if 1.75e7 < (*.f64 t t)

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z + z}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. expm1-log1p16.4%

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
      4. distribute-rgt-neg-out49.2%

        \[\leadsto \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      5. distribute-rgt-neg-out49.2%

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

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

        \[\leadsto \color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      8. distribute-rgt-neg-out81.1%

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

        \[\leadsto \color{blue}{\left(0 - y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      10. add-sqr-sqrt37.7%

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

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

        \[\leadsto \left(0 - \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      13. distribute-rgt-neg-out34.4%

        \[\leadsto \left(0 - \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      14. distribute-rgt-neg-out34.4%

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

        \[\leadsto \left(0 - \color{blue}{\sqrt{y \cdot \left(-\sqrt{z + z}\right)} \cdot \sqrt{y \cdot \left(-\sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      16. add-sqr-sqrt16.4%

        \[\leadsto \left(0 - \color{blue}{y \cdot \left(-\sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      17. add-sqr-sqrt0.0%

        \[\leadsto \left(0 - y \cdot \color{blue}{\left(\sqrt{-\sqrt{z + z}} \cdot \sqrt{-\sqrt{z + z}}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    10. Applied egg-rr78.7%

      \[\leadsto \color{blue}{\left(0 - y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    11. Step-by-step derivation
      1. neg-sub078.7%

        \[\leadsto \color{blue}{\left(-y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. distribute-rgt-neg-in78.7%

        \[\leadsto \color{blue}{\left(y \cdot \left(-\left(z + z\right)\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      3. count-278.7%

        \[\leadsto \left(y \cdot \left(-\color{blue}{2 \cdot z}\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      4. distribute-lft-neg-in78.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot t \leq 17500000:\\ \;\;\;\;y \cdot \left(\sqrt{2} \cdot \left(-\sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-2 \cdot \left(z \cdot \sqrt{e^{t \cdot t}}\right)\right)\\ \end{array} \]

Alternative 6: 59.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 t t) < 1.75e7

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{z + z} \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{0.25} - y \cdot y\right)}{x \cdot 0.5 + y} \cdot e^{\frac{t \cdot t}{2}} \]
      11. fma-def55.3%

        \[\leadsto \frac{\sqrt{z + z} \cdot \left(\left(x \cdot x\right) \cdot 0.25 - y \cdot y\right)}{\color{blue}{\mathsf{fma}\left(x, 0.5, y\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
    3. Applied egg-rr55.3%

      \[\leadsto \color{blue}{\frac{\sqrt{z + z} \cdot \left(\left(x \cdot x\right) \cdot 0.25 - y \cdot y\right)}{\mathsf{fma}\left(x, 0.5, y\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
    4. Step-by-step derivation
      1. *-commutative55.3%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot x\right) \cdot 0.25 - y \cdot y\right) \cdot \sqrt{z + z}}}{\mathsf{fma}\left(x, 0.5, y\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. associate-/l*60.4%

        \[\leadsto \color{blue}{\frac{\left(x \cdot x\right) \cdot 0.25 - y \cdot y}{\frac{\mathsf{fma}\left(x, 0.5, y\right)}{\sqrt{z + z}}}} \cdot e^{\frac{t \cdot t}{2}} \]
    5. Simplified60.4%

      \[\leadsto \color{blue}{\frac{\left(x \cdot x\right) \cdot 0.25 - y \cdot y}{\frac{\mathsf{fma}\left(x, 0.5, y\right)}{\sqrt{z + z}}}} \cdot e^{\frac{t \cdot t}{2}} \]
    6. Taylor expanded in x around 0 46.8%

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

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

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

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

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

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

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

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

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

    if 1.75e7 < (*.f64 t t)

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z + z}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. expm1-log1p16.4%

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
      4. distribute-rgt-neg-out49.2%

        \[\leadsto \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      5. distribute-rgt-neg-out49.2%

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

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

        \[\leadsto \color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      8. distribute-rgt-neg-out81.1%

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

        \[\leadsto \color{blue}{\left(0 - y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      10. add-sqr-sqrt37.7%

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

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

        \[\leadsto \left(0 - \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      13. distribute-rgt-neg-out34.4%

        \[\leadsto \left(0 - \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      14. distribute-rgt-neg-out34.4%

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

        \[\leadsto \left(0 - \color{blue}{\sqrt{y \cdot \left(-\sqrt{z + z}\right)} \cdot \sqrt{y \cdot \left(-\sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      16. add-sqr-sqrt16.4%

        \[\leadsto \left(0 - \color{blue}{y \cdot \left(-\sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      17. add-sqr-sqrt0.0%

        \[\leadsto \left(0 - y \cdot \color{blue}{\left(\sqrt{-\sqrt{z + z}} \cdot \sqrt{-\sqrt{z + z}}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    10. Applied egg-rr78.7%

      \[\leadsto \color{blue}{\left(0 - y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    11. Step-by-step derivation
      1. neg-sub078.7%

        \[\leadsto \color{blue}{\left(-y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. distribute-rgt-neg-in78.7%

        \[\leadsto \color{blue}{\left(y \cdot \left(-\left(z + z\right)\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      3. count-278.7%

        \[\leadsto \left(y \cdot \left(-\color{blue}{2 \cdot z}\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      4. distribute-lft-neg-in78.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot t \leq 17500000:\\ \;\;\;\;y \cdot \left(\sqrt{2} \cdot \left(-\sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(z \cdot -2\right)\right)\\ \end{array} \]

Alternative 7: 40.5% accurate, 1.9× speedup?

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

\\
e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(z \cdot -2\right)\right)
\end{array}
Derivation
  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. Taylor expanded in x around 0 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(y \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z + z}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. expm1-log1p9.3%

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
    4. distribute-rgt-neg-out31.5%

      \[\leadsto \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    5. distribute-rgt-neg-out31.5%

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

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

      \[\leadsto \color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    8. distribute-rgt-neg-out63.3%

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

      \[\leadsto \color{blue}{\left(0 - y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    10. add-sqr-sqrt29.7%

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

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

      \[\leadsto \left(0 - \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    13. distribute-rgt-neg-out25.4%

      \[\leadsto \left(0 - \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    14. distribute-rgt-neg-out25.4%

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

      \[\leadsto \left(0 - \color{blue}{\sqrt{y \cdot \left(-\sqrt{z + z}\right)} \cdot \sqrt{y \cdot \left(-\sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    16. add-sqr-sqrt9.3%

      \[\leadsto \left(0 - \color{blue}{y \cdot \left(-\sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    17. add-sqr-sqrt0.0%

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

    \[\leadsto \color{blue}{\left(0 - y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
  11. Step-by-step derivation
    1. neg-sub044.5%

      \[\leadsto \color{blue}{\left(-y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    2. distribute-rgt-neg-in44.5%

      \[\leadsto \color{blue}{\left(y \cdot \left(-\left(z + z\right)\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    3. count-244.5%

      \[\leadsto \left(y \cdot \left(-\color{blue}{2 \cdot z}\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
    4. distribute-lft-neg-in44.5%

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

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

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

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

Alternative 8: 30.7% accurate, 23.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(y \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z + z}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. expm1-log1p9.3%

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
    4. distribute-rgt-neg-out31.5%

      \[\leadsto \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    5. distribute-rgt-neg-out31.5%

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

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

      \[\leadsto \color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    8. distribute-rgt-neg-out63.3%

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

      \[\leadsto \color{blue}{\left(0 - y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    10. add-sqr-sqrt29.7%

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

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

      \[\leadsto \left(0 - \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    13. distribute-rgt-neg-out25.4%

      \[\leadsto \left(0 - \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    14. distribute-rgt-neg-out25.4%

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

      \[\leadsto \left(0 - \color{blue}{\sqrt{y \cdot \left(-\sqrt{z + z}\right)} \cdot \sqrt{y \cdot \left(-\sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    16. add-sqr-sqrt9.3%

      \[\leadsto \left(0 - \color{blue}{y \cdot \left(-\sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    17. add-sqr-sqrt0.0%

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

    \[\leadsto \color{blue}{\left(0 - y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
  11. Step-by-step derivation
    1. neg-sub044.5%

      \[\leadsto \color{blue}{\left(-y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    2. distribute-rgt-neg-in44.5%

      \[\leadsto \color{blue}{\left(y \cdot \left(-\left(z + z\right)\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    3. count-244.5%

      \[\leadsto \left(y \cdot \left(-\color{blue}{2 \cdot z}\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
    4. distribute-lft-neg-in44.5%

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

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

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

    \[\leadsto \color{blue}{-2 \cdot \left(y \cdot z\right) + -1 \cdot \left({t}^{2} \cdot \left(y \cdot z\right)\right)} \]
  14. Step-by-step derivation
    1. associate-*r*32.5%

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

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

      \[\leadsto \left(y \cdot z\right) \cdot \left(-2 + \color{blue}{\left(-{t}^{2}\right)}\right) \]
    4. unsub-neg33.8%

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

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

    \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot \left(-2 - t \cdot t\right)} \]
  16. Final simplification33.8%

    \[\leadsto \left(y \cdot z\right) \cdot \left(-2 - t \cdot t\right) \]

Alternative 9: 13.7% accurate, 43.0× speedup?

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

\\
-2 \cdot \left(y \cdot z\right)
\end{array}
Derivation
  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. Taylor expanded in x around 0 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(y \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z + z}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. expm1-log1p9.3%

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
    4. distribute-rgt-neg-out31.5%

      \[\leadsto \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    5. distribute-rgt-neg-out31.5%

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

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

      \[\leadsto \color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    8. distribute-rgt-neg-out63.3%

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

      \[\leadsto \color{blue}{\left(0 - y \cdot \sqrt{z + z}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    10. add-sqr-sqrt29.7%

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

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

      \[\leadsto \left(0 - \sqrt{\color{blue}{\left(-y \cdot \sqrt{z + z}\right) \cdot \left(-y \cdot \sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    13. distribute-rgt-neg-out25.4%

      \[\leadsto \left(0 - \sqrt{\color{blue}{\left(y \cdot \left(-\sqrt{z + z}\right)\right)} \cdot \left(-y \cdot \sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    14. distribute-rgt-neg-out25.4%

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

      \[\leadsto \left(0 - \color{blue}{\sqrt{y \cdot \left(-\sqrt{z + z}\right)} \cdot \sqrt{y \cdot \left(-\sqrt{z + z}\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    16. add-sqr-sqrt9.3%

      \[\leadsto \left(0 - \color{blue}{y \cdot \left(-\sqrt{z + z}\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    17. add-sqr-sqrt0.0%

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

    \[\leadsto \color{blue}{\left(0 - y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
  11. Step-by-step derivation
    1. neg-sub044.5%

      \[\leadsto \color{blue}{\left(-y \cdot \left(z + z\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    2. distribute-rgt-neg-in44.5%

      \[\leadsto \color{blue}{\left(y \cdot \left(-\left(z + z\right)\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    3. count-244.5%

      \[\leadsto \left(y \cdot \left(-\color{blue}{2 \cdot z}\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
    4. distribute-lft-neg-in44.5%

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

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

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

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

    \[\leadsto -2 \cdot \left(y \cdot z\right) \]

Developer target: 99.5% accurate, 0.7× speedup?

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

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

Reproduce

?
herbie shell --seed 2023271 
(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))))