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

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

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.4% accurate, 1.0× speedup?

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

\\
e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - 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{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right) \]
  4. Add Preprocessing

Alternative 2: 66.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq 9.5 \cdot 10^{+87}:\\
\;\;\;\;y \cdot \left(t\_1 \cdot \left(-1 + 0.5 \cdot \frac{x}{y}\right)\right)\\

\mathbf{elif}\;t \leq 1.46 \cdot 10^{+197}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot \left(0.5 + {t}^{2} \cdot 0.25\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(y \cdot \left(-0.5 \cdot {t}^{2} + -1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 1.9000000000000001e-5

    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 t around 0 76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e-5 < t < 9.4999999999999992e87

    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 t around 0 27.0%

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

        \[\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}} \]
      2. pow2100.0%

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

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

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

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

      \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{{\left({\left(z \cdot 2\right)}^{0.25}\right)}^{2}}\right) \cdot 1 \]
    6. Taylor expanded in y around inf 53.1%

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

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

    if 9.4999999999999992e87 < t < 1.46e197

    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. add-sqr-sqrt100.0%

        \[\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}} \]
      2. pow2100.0%

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

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

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

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

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

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

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

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

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

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

    if 1.46e197 < 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. add-sqr-sqrt100.0%

        \[\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}} \]
      2. pow2100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.9 \cdot 10^{-5}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+87}:\\ \;\;\;\;y \cdot \left(\sqrt{z \cdot 2} \cdot \left(-1 + 0.5 \cdot \frac{x}{y}\right)\right)\\ \mathbf{elif}\;t \leq 1.46 \cdot 10^{+197}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot \left(0.5 + {t}^{2} \cdot 0.25\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(y \cdot \left(-0.5 \cdot {t}^{2} + -1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 70.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 2.85 \cdot 10^{+197}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(x \cdot \left(0.5 \cdot t\_1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(y \cdot \left(-0.5 \cdot {t}^{2} + -1\right)\right)\\


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.14000000000000001 < t < 2.85000000000000011e197

    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. add-sqr-sqrt100.0%

        \[\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}} \]
      2. pow2100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \left(x \cdot \left(\color{blue}{\left({2}^{0.25} \cdot {z}^{0.25}\right)} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      11. exp-to-pow75.0%

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

        \[\leadsto \left(0.5 \cdot \left(x \cdot \left(\left(e^{\log 2 \cdot 0.25} \cdot \color{blue}{e^{\log z \cdot 0.25}}\right) \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      13. exp-sum75.0%

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

        \[\leadsto \left(0.5 \cdot \left(x \cdot \left(e^{\color{blue}{0.25 \cdot \left(\log 2 + \log z\right)}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      15. *-commutative75.0%

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

        \[\leadsto \left(0.5 \cdot \left(x \cdot \left(\color{blue}{{\left(e^{\log 2 + \log z}\right)}^{0.25}} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      17. +-commutative75.0%

        \[\leadsto \left(0.5 \cdot \left(x \cdot \left({\left(e^{\color{blue}{\log z + \log 2}}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      18. exp-sum75.0%

        \[\leadsto \left(0.5 \cdot \left(x \cdot \left({\color{blue}{\left(e^{\log z} \cdot e^{\log 2}\right)}}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      19. rem-exp-log75.0%

        \[\leadsto \left(0.5 \cdot \left(x \cdot \left({\left(\color{blue}{z} \cdot e^{\log 2}\right)}^{0.25} \cdot \left({z}^{0.25} \cdot {2}^{0.25}\right)\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      20. rem-exp-log75.0%

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

        \[\leadsto \left(0.5 \cdot \left(x \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \color{blue}{\left({2}^{0.25} \cdot {z}^{0.25}\right)}\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      22. exp-to-pow75.0%

        \[\leadsto \left(0.5 \cdot \left(x \cdot \left({\left(z \cdot 2\right)}^{0.25} \cdot \left(\color{blue}{e^{\log 2 \cdot 0.25}} \cdot {z}^{0.25}\right)\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      23. exp-to-pow75.0%

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

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

    if 2.85000000000000011e197 < 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. add-sqr-sqrt100.0%

        \[\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}} \]
      2. pow2100.0%

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

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

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

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

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

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

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

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

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

Alternative 4: 66.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 1.28 \cdot 10^{+85}:\\
\;\;\;\;y \cdot \left(t\_1 \cdot \left(-1 + 0.5 \cdot \frac{x}{y}\right)\right)\\

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


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

    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 t around 0 76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e-5 < t < 1.28000000000000004e85

    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 t around 0 27.0%

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

        \[\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}} \]
      2. pow2100.0%

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

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

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

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

      \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{{\left({\left(z \cdot 2\right)}^{0.25}\right)}^{2}}\right) \cdot 1 \]
    6. Taylor expanded in y around inf 53.1%

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

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

    if 1.28000000000000004e85 < 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. add-sqr-sqrt100.0%

        \[\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}} \]
      2. pow2100.0%

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(x \cdot \left(0.5 + \color{blue}{{t}^{2} \cdot 0.25}\right)\right) \]
    9. Simplified64.3%

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

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

Alternative 5: 61.8% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;y \cdot \left(t\_1 \cdot \left(-1 + 0.5 \cdot \frac{x}{y}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) < 1.1200000000000001

    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 t around 0 98.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-y\right) \cdot \sqrt{2 \cdot z} + \color{blue}{\left(0.5 \cdot x\right) \cdot \sqrt{z \cdot {\left(\sqrt[3]{2}\right)}^{3}}} \]
      6. rem-cube-cbrt98.0%

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

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

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

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

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

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

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

    if 1.1200000000000001 < (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64)))

    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 t around 0 17.9%

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

        \[\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}} \]
      2. pow2100.0%

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

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

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

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

      \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \color{blue}{{\left({\left(z \cdot 2\right)}^{0.25}\right)}^{2}}\right) \cdot 1 \]
    6. Taylor expanded in y around inf 34.8%

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

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

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

Alternative 6: 85.1% accurate, 1.0× speedup?

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

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

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


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

    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 t around 0 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999999e-17 < (*.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. add-sqr-sqrt100.0%

        \[\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}} \]
      2. pow2100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-y\right) \cdot \left(\left({z}^{0.25} \cdot {z}^{0.25}\right) \cdot \color{blue}{\left({2}^{0.25} \cdot {2}^{0.25}\right)}\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      11. unswap-sqr73.1%

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

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

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

Alternative 7: 42.2% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;y \leq 5 \cdot 10^{+38}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z \cdot -2}{t\_1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.20000000000000032e-73

    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 t around 0 64.8%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\sqrt{z \cdot {\left(\sqrt[3]{2}\right)}^{3}} \cdot y} \]
      3. rem-cube-cbrt55.9%

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

        \[\leadsto -\sqrt{\color{blue}{2 \cdot z}} \cdot y \]
      5. distribute-lft-neg-out55.9%

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

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

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

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

    if -8.20000000000000032e-73 < y < 4.9999999999999997e38

    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 t around 0 56.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0.5 \cdot x\right) \cdot \sqrt{z \cdot {\left(\sqrt[3]{2}\right)}^{3}}} \]
      2. rem-cube-cbrt46.5%

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

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

    if 4.9999999999999997e38 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\sqrt{z \cdot {\left(\sqrt[3]{2}\right)}^{3}} \cdot y} \]
      3. rem-cube-cbrt53.0%

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

        \[\leadsto -\sqrt{\color{blue}{2 \cdot z}} \cdot y \]
      5. distribute-lft-neg-out53.0%

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{0 \cdot 0 - \sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}}{0 + \sqrt{z \cdot 2}}} \]
      3. metadata-eval53.0%

        \[\leadsto y \cdot \frac{\color{blue}{0} - \sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}}{0 + \sqrt{z \cdot 2}} \]
      4. add-sqr-sqrt53.0%

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

        \[\leadsto y \cdot \frac{0 - \color{blue}{2 \cdot z}}{0 + \sqrt{z \cdot 2}} \]
      6. add-sqr-sqrt53.0%

        \[\leadsto y \cdot \frac{0 - 2 \cdot z}{0 + \sqrt{\color{blue}{\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}}}} \]
      7. sqr-neg53.0%

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

        \[\leadsto y \cdot \frac{0 - 2 \cdot z}{0 + \color{blue}{\sqrt{-\sqrt{z \cdot 2}} \cdot \sqrt{-\sqrt{z \cdot 2}}}} \]
      9. add-sqr-sqrt2.7%

        \[\leadsto y \cdot \frac{0 - 2 \cdot z}{0 + \color{blue}{\left(-\sqrt{z \cdot 2}\right)}} \]
      10. sub-neg2.7%

        \[\leadsto y \cdot \frac{0 - 2 \cdot z}{\color{blue}{0 - \sqrt{z \cdot 2}}} \]
      11. neg-sub02.7%

        \[\leadsto y \cdot \frac{0 - 2 \cdot z}{\color{blue}{-\sqrt{z \cdot 2}}} \]
      12. add-sqr-sqrt0.0%

        \[\leadsto y \cdot \frac{0 - 2 \cdot z}{\color{blue}{\sqrt{-\sqrt{z \cdot 2}} \cdot \sqrt{-\sqrt{z \cdot 2}}}} \]
      13. sqrt-unprod53.0%

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

        \[\leadsto y \cdot \frac{0 - 2 \cdot z}{\sqrt{\color{blue}{\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}}}} \]
      15. add-sqr-sqrt53.0%

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{\color{blue}{z \cdot -2}}{\sqrt{2 \cdot z}} \]
    12. Simplified53.0%

      \[\leadsto y \cdot \color{blue}{\frac{z \cdot -2}{\sqrt{2 \cdot z}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.2%

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

Alternative 8: 42.3% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-71} \lor \neg \left(y \leq 5.8 \cdot 10^{+38}\right):\\
\;\;\;\;t\_1 \cdot \left(-y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.8e-71 or 5.80000000000000013e38 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\sqrt{z \cdot {\left(\sqrt[3]{2}\right)}^{3}} \cdot y} \]
      3. rem-cube-cbrt54.4%

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

        \[\leadsto -\sqrt{\color{blue}{2 \cdot z}} \cdot y \]
      5. distribute-lft-neg-out54.4%

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

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

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

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

    if -2.8e-71 < y < 5.80000000000000013e38

    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 t around 0 56.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0.5 \cdot x\right) \cdot \sqrt{z \cdot {\left(\sqrt[3]{2}\right)}^{3}}} \]
      2. rem-cube-cbrt46.5%

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

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

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

Alternative 9: 58.9% accurate, 1.9× speedup?

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

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

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


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

    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 t around 0 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.35999999999999999 < 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 t around 0 20.0%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(-1 \cdot \frac{y}{x}\right) \cdot \sqrt{\color{blue}{2 \cdot z}} + 0.5 \cdot \sqrt{z \cdot {\left(\sqrt[3]{2}\right)}^{3}}\right) \]
      4. rem-cube-cbrt31.6%

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

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

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

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

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

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

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

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

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

Alternative 10: 56.1% accurate, 2.0× speedup?

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

\\
\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - 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 t around 0 59.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-y\right) \cdot \sqrt{2 \cdot z} + \color{blue}{\left(0.5 \cdot x\right) \cdot \sqrt{z \cdot {\left(\sqrt[3]{2}\right)}^{3}}} \]
    6. rem-cube-cbrt59.5%

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

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

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

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

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

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

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

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

Alternative 11: 29.6% accurate, 2.0× speedup?

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

\\
\sqrt{z \cdot 2} \cdot \left(-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 t around 0 59.9%

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

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

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

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

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

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

      \[\leadsto -\color{blue}{\sqrt{z \cdot {\left(\sqrt[3]{2}\right)}^{3}} \cdot y} \]
    3. rem-cube-cbrt31.8%

      \[\leadsto -\sqrt{z \cdot \color{blue}{2}} \cdot y \]
    4. *-commutative31.8%

      \[\leadsto -\sqrt{\color{blue}{2 \cdot z}} \cdot y \]
    5. distribute-lft-neg-out31.8%

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

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

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

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

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

Alternative 12: 2.5% accurate, 2.0× speedup?

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

\\
y \cdot \sqrt{z \cdot 2}
\end{array}
Derivation
  1. Initial program 99.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 t around 0 59.9%

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

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

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

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

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

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

      \[\leadsto -\color{blue}{\sqrt{z \cdot {\left(\sqrt[3]{2}\right)}^{3}} \cdot y} \]
    3. rem-cube-cbrt31.8%

      \[\leadsto -\sqrt{z \cdot \color{blue}{2}} \cdot y \]
    4. *-commutative31.8%

      \[\leadsto -\sqrt{\color{blue}{2 \cdot z}} \cdot y \]
    5. distribute-lft-neg-out31.8%

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

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

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

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

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

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

      \[\leadsto y \cdot \left(-{\left(2 \cdot z\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}}\right) \]
    4. pow-pow30.3%

      \[\leadsto y \cdot \left(-\color{blue}{{\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}}\right) \]
    5. distribute-rgt-neg-in30.3%

      \[\leadsto \color{blue}{-y \cdot {\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}} \]
    6. neg-sub030.3%

      \[\leadsto \color{blue}{0 - y \cdot {\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}} \]
    7. pow-pow31.8%

      \[\leadsto 0 - y \cdot \color{blue}{{\left(2 \cdot z\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
    8. *-commutative31.8%

      \[\leadsto 0 - y \cdot {\color{blue}{\left(z \cdot 2\right)}}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
    9. metadata-eval31.8%

      \[\leadsto 0 - y \cdot {\left(z \cdot 2\right)}^{\color{blue}{0.5}} \]
    10. pow1/231.8%

      \[\leadsto 0 - y \cdot \color{blue}{\sqrt{z \cdot 2}} \]
    11. cancel-sign-sub-inv31.8%

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

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

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

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

      \[\leadsto 0 + \left(-\color{blue}{\sqrt{{y}^{2}}} \cdot \sqrt{z \cdot 2}\right) \]
    16. *-commutative15.9%

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

      \[\leadsto 0 + \left(-\color{blue}{\sqrt{{y}^{2} \cdot \left(2 \cdot z\right)}}\right) \]
    18. *-commutative17.0%

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

      \[\leadsto 0 + \color{blue}{\sqrt{-\sqrt{\left(2 \cdot z\right) \cdot {y}^{2}}} \cdot \sqrt{-\sqrt{\left(2 \cdot z\right) \cdot {y}^{2}}}} \]
    20. sqrt-unprod12.9%

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

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

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

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

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

Developer Target 1: 99.3% accurate, 0.7× speedup?

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

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

Reproduce

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

  :alt
  (! :herbie-platform default (* (* (- (* x 1/2) y) (sqrt (* z 2))) (pow (exp 1) (/ (* t t) 2))))

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