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

Percentage Accurate: 99.4% → 98.9%
Time: 15.3s
Alternatives: 8
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 8 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 98.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
\left(\left(0.5 \cdot t_1\right) \cdot x - t_1 \cdot y\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.044999999999999998 < (*.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{\color{blue}{\left(0.25 + 0.25\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      16. pow-prod-up100.0%

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

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

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

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

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

      \[\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}} \]
    14. Step-by-step derivation
      1. mul-1-neg80.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-y\right) \cdot \color{blue}{\left(\left({2}^{0.25} \cdot {z}^{0.25}\right) \cdot \left({2}^{0.25} \cdot {z}^{0.25}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      11. exp-to-pow80.3%

        \[\leadsto \left(\left(-y\right) \cdot \left(\left(\color{blue}{e^{\log 2 \cdot 0.25}} \cdot {z}^{0.25}\right) \cdot \left({2}^{0.25} \cdot {z}^{0.25}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      12. exp-to-pow80.3%

        \[\leadsto \left(\left(-y\right) \cdot \left(\left(e^{\log 2 \cdot 0.25} \cdot \color{blue}{e^{\log z \cdot 0.25}}\right) \cdot \left({2}^{0.25} \cdot {z}^{0.25}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      13. exp-sum80.3%

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

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

        \[\leadsto \left(\left(-y\right) \cdot \left(e^{0.25 \cdot \color{blue}{\log \left(2 \cdot z\right)}} \cdot \left({2}^{0.25} \cdot {z}^{0.25}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      16. exp-to-pow80.3%

        \[\leadsto \left(\left(-y\right) \cdot \left(e^{0.25 \cdot \log \left(2 \cdot z\right)} \cdot \left(\color{blue}{e^{\log 2 \cdot 0.25}} \cdot {z}^{0.25}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      17. exp-to-pow80.3%

        \[\leadsto \left(\left(-y\right) \cdot \left(e^{0.25 \cdot \log \left(2 \cdot z\right)} \cdot \left(e^{\log 2 \cdot 0.25} \cdot \color{blue}{e^{\log z \cdot 0.25}}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      18. exp-sum80.3%

        \[\leadsto \left(\left(-y\right) \cdot \left(e^{0.25 \cdot \log \left(2 \cdot z\right)} \cdot \color{blue}{e^{\log 2 \cdot 0.25 + \log z \cdot 0.25}}\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      19. distribute-rgt-in80.3%

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

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

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

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

Alternative 3: 85.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(1 + \sqrt{2 \cdot z} \cdot \left(0.5 \cdot x - y\right)\right) - 1} \]
    9. Step-by-step derivation
      1. add-exp-log33.5%

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{\color{blue}{\left(0.25 + 0.25\right)}}\right)} - 1 \]
      6. pow-prod-up33.5%

        \[\leadsto e^{\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot \color{blue}{\left({\left(2 \cdot z\right)}^{0.25} \cdot {\left(2 \cdot z\right)}^{0.25}\right)}\right)} - 1 \]
      7. associate-*r*33.5%

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{0.25}\right) \cdot {\left(2 \cdot z\right)}^{0.25}\right)\right)} \]
      9. associate-*r*56.7%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{\left(0.5 \cdot x - y\right) \cdot \left({\left(2 \cdot z\right)}^{0.25} \cdot {\left(2 \cdot z\right)}^{0.25}\right)}\right)\right) \]
      10. pow-prod-up56.8%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot \color{blue}{{\left(2 \cdot z\right)}^{\left(0.25 + 0.25\right)}}\right)\right) \]
      11. metadata-eval56.8%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{\color{blue}{0.5}}\right)\right) \]
    10. Applied egg-rr98.1%

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

    if 0.044999999999999998 < (*.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{\color{blue}{\left(0.25 + 0.25\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      16. pow-prod-up100.0%

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

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

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

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

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

      \[\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}} \]
    14. Step-by-step derivation
      1. mul-1-neg80.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-y\right) \cdot \color{blue}{\left(\left({2}^{0.25} \cdot {z}^{0.25}\right) \cdot \left({2}^{0.25} \cdot {z}^{0.25}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      11. exp-to-pow80.3%

        \[\leadsto \left(\left(-y\right) \cdot \left(\left(\color{blue}{e^{\log 2 \cdot 0.25}} \cdot {z}^{0.25}\right) \cdot \left({2}^{0.25} \cdot {z}^{0.25}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      12. exp-to-pow80.3%

        \[\leadsto \left(\left(-y\right) \cdot \left(\left(e^{\log 2 \cdot 0.25} \cdot \color{blue}{e^{\log z \cdot 0.25}}\right) \cdot \left({2}^{0.25} \cdot {z}^{0.25}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      13. exp-sum80.3%

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

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

        \[\leadsto \left(\left(-y\right) \cdot \left(e^{0.25 \cdot \color{blue}{\log \left(2 \cdot z\right)}} \cdot \left({2}^{0.25} \cdot {z}^{0.25}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      16. exp-to-pow80.3%

        \[\leadsto \left(\left(-y\right) \cdot \left(e^{0.25 \cdot \log \left(2 \cdot z\right)} \cdot \left(\color{blue}{e^{\log 2 \cdot 0.25}} \cdot {z}^{0.25}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      17. exp-to-pow80.3%

        \[\leadsto \left(\left(-y\right) \cdot \left(e^{0.25 \cdot \log \left(2 \cdot z\right)} \cdot \left(e^{\log 2 \cdot 0.25} \cdot \color{blue}{e^{\log z \cdot 0.25}}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      18. exp-sum80.3%

        \[\leadsto \left(\left(-y\right) \cdot \left(e^{0.25 \cdot \log \left(2 \cdot z\right)} \cdot \color{blue}{e^{\log 2 \cdot 0.25 + \log z \cdot 0.25}}\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      19. distribute-rgt-in80.3%

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

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

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

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

Alternative 4: 99.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 5: 56.7% accurate, 1.0× speedup?

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

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

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


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

    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. Add Preprocessing
    3. Taylor expanded in x around 0 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\color{blue}{\log \left(1 + \left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right)}} - 1 \]
      8. rem-exp-log56.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{\color{blue}{\left(0.25 + 0.25\right)}}\right)} - 1 \]
      6. pow-prod-up26.0%

        \[\leadsto e^{\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot \color{blue}{\left({\left(2 \cdot z\right)}^{0.25} \cdot {\left(2 \cdot z\right)}^{0.25}\right)}\right)} - 1 \]
      7. associate-*r*26.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{0.25}\right) \cdot {\left(2 \cdot z\right)}^{0.25}}\right)} - 1 \]
      8. expm1-udef42.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{0.25}\right) \cdot {\left(2 \cdot z\right)}^{0.25}\right)\right)} \]
      9. associate-*r*42.0%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{\left(0.5 \cdot x - y\right) \cdot \left({\left(2 \cdot z\right)}^{0.25} \cdot {\left(2 \cdot z\right)}^{0.25}\right)}\right)\right) \]
      10. pow-prod-up42.1%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot \color{blue}{{\left(2 \cdot z\right)}^{\left(0.25 + 0.25\right)}}\right)\right) \]
      11. metadata-eval42.1%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{\color{blue}{0.5}}\right)\right) \]
    10. Applied egg-rr72.1%

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

    if 1.00000000000000003e40 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{z} \cdot \sqrt{2 \cdot \left(y \cdot \left(y + \color{blue}{\left(-x\right)}\right)\right)} \]
      6. unsub-neg13.8%

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

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

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

Alternative 6: 57.0% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}} \]
    5. expm1-log1p-u34.3%

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

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

      \[\leadsto e^{\color{blue}{\log \left(1 + \left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right)}} - 1 \]
    8. rem-exp-log47.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto e^{\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{\color{blue}{\left(0.25 + 0.25\right)}}\right)} - 1 \]
    6. pow-prod-up21.6%

      \[\leadsto e^{\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot \color{blue}{\left({\left(2 \cdot z\right)}^{0.25} \cdot {\left(2 \cdot z\right)}^{0.25}\right)}\right)} - 1 \]
    7. associate-*r*21.6%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{0.25}\right) \cdot {\left(2 \cdot z\right)}^{0.25}}\right)} - 1 \]
    8. expm1-udef34.3%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{0.25}\right) \cdot {\left(2 \cdot z\right)}^{0.25}\right)\right)} \]
    9. associate-*r*34.3%

      \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{\left(0.5 \cdot x - y\right) \cdot \left({\left(2 \cdot z\right)}^{0.25} \cdot {\left(2 \cdot z\right)}^{0.25}\right)}\right)\right) \]
    10. pow-prod-up34.3%

      \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot \color{blue}{{\left(2 \cdot z\right)}^{\left(0.25 + 0.25\right)}}\right)\right) \]
    11. metadata-eval34.3%

      \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left(0.5 \cdot x - y\right) \cdot {\left(2 \cdot z\right)}^{\color{blue}{0.5}}\right)\right) \]
  10. Applied egg-rr59.8%

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

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

Alternative 7: 2.4% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 2.3% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\mathsf{fma}\left(x, 0.5, \color{blue}{\sqrt{y} \cdot \sqrt{y}}\right) \cdot \sqrt{\sqrt{z \cdot 2}}\right) \cdot \sqrt{\sqrt{z \cdot 2}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    11. add-sqr-sqrt51.5%

      \[\leadsto \left(\left(\mathsf{fma}\left(x, 0.5, \color{blue}{y}\right) \cdot \sqrt{\sqrt{z \cdot 2}}\right) \cdot \sqrt{\sqrt{z \cdot 2}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    12. pow1/251.5%

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

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

      \[\leadsto \left(\left(\mathsf{fma}\left(x, 0.5, y\right) \cdot {\left(z \cdot 2\right)}^{\color{blue}{0.25}}\right) \cdot \sqrt{\sqrt{z \cdot 2}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    15. pow1/251.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \left(\left({2}^{0.25} \cdot {2}^{0.25}\right) \cdot {z}^{\color{blue}{\left(2 \cdot 0.25\right)}}\right) \]
    7. pow-sqr2.0%

      \[\leadsto y \cdot \left(\left({2}^{0.25} \cdot {2}^{0.25}\right) \cdot \color{blue}{\left({z}^{0.25} \cdot {z}^{0.25}\right)}\right) \]
    8. swap-sqr2.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \left(e^{0.25 \cdot \log \left(2 \cdot z\right)} \cdot e^{0.25 \cdot \color{blue}{\log \left(2 \cdot z\right)}}\right) \]
  12. Simplified2.0%

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

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

Developer target: 99.4% accurate, 0.7× speedup?

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

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

Reproduce

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