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

Percentage Accurate: 99.5% → 99.8%
Time: 15.5s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 99.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{2 \cdot z}\\ t_2 := x \cdot 0.5 - y\\ t_3 := e^{\frac{t \cdot t}{2}}\\ \mathbf{if}\;t \cdot t \leq 5 \cdot 10^{-7}:\\ \;\;\;\;t\_2 \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\ \mathbf{elif}\;t \cdot t \leq 4 \cdot 10^{+197}:\\ \;\;\;\;t\_3 \cdot \left(t\_1 \cdot \left(x \cdot 0.5\right)\right)\\ \mathbf{elif}\;t \cdot t \leq 2 \cdot 10^{+278}:\\ \;\;\;\;t\_3 \cdot \left(t\_1 \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \sqrt{2 \cdot \left(z \cdot {t}^{2}\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (sqrt (* 2.0 z)))
        (t_2 (- (* x 0.5) y))
        (t_3 (exp (/ (* t t) 2.0))))
   (if (<= (* t t) 5e-7)
     (* t_2 (sqrt (* (* 2.0 z) (fma t t 1.0))))
     (if (<= (* t t) 4e+197)
       (* t_3 (* t_1 (* x 0.5)))
       (if (<= (* t t) 2e+278)
         (* t_3 (* t_1 (- y)))
         (* t_2 (sqrt (* 2.0 (* z (pow t 2.0))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = sqrt((2.0 * z));
	double t_2 = (x * 0.5) - y;
	double t_3 = exp(((t * t) / 2.0));
	double tmp;
	if ((t * t) <= 5e-7) {
		tmp = t_2 * sqrt(((2.0 * z) * fma(t, t, 1.0)));
	} else if ((t * t) <= 4e+197) {
		tmp = t_3 * (t_1 * (x * 0.5));
	} else if ((t * t) <= 2e+278) {
		tmp = t_3 * (t_1 * -y);
	} else {
		tmp = t_2 * sqrt((2.0 * (z * pow(t, 2.0))));
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = sqrt(Float64(2.0 * z))
	t_2 = Float64(Float64(x * 0.5) - y)
	t_3 = exp(Float64(Float64(t * t) / 2.0))
	tmp = 0.0
	if (Float64(t * t) <= 5e-7)
		tmp = Float64(t_2 * sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))));
	elseif (Float64(t * t) <= 4e+197)
		tmp = Float64(t_3 * Float64(t_1 * Float64(x * 0.5)));
	elseif (Float64(t * t) <= 2e+278)
		tmp = Float64(t_3 * Float64(t_1 * Float64(-y)));
	else
		tmp = Float64(t_2 * sqrt(Float64(2.0 * Float64(z * (t ^ 2.0)))));
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 5e-7], N[(t$95$2 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 4e+197], N[(t$95$3 * N[(t$95$1 * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 2e+278], N[(t$95$3 * N[(t$95$1 * (-y)), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sqrt[N[(2.0 * N[(z * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
t_2 := x \cdot 0.5 - y\\
t_3 := e^{\frac{t \cdot t}{2}}\\
\mathbf{if}\;t \cdot t \leq 5 \cdot 10^{-7}:\\
\;\;\;\;t\_2 \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\

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

\mathbf{elif}\;t \cdot t \leq 2 \cdot 10^{+278}:\\
\;\;\;\;t\_3 \cdot \left(t\_1 \cdot \left(-y\right)\right)\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999977e-7 < (*.f64 t t) < 3.9999999999999998e197

    1. Initial program 100.0%

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

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

    if 3.9999999999999998e197 < (*.f64 t t) < 1.99999999999999993e278

    1. Initial program 100.0%

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

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

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

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

    if 1.99999999999999993e278 < (*.f64 t t)

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.8% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;t \cdot t \leq 2 \cdot 10^{+278}:\\
\;\;\;\;t\_3 \cdot \left(t\_1 \cdot \left(-y\right)\right)\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999977e-7 < (*.f64 t t) < 3.9999999999999998e197

    1. Initial program 100.0%

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

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

    if 3.9999999999999998e197 < (*.f64 t t) < 1.99999999999999993e278

    1. Initial program 100.0%

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

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

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

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

    if 1.99999999999999993e278 < (*.f64 t t)

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.3% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999977e-7 < (*.f64 t t) < 1.99999999999999993e278

    1. Initial program 100.0%

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

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

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

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

    if 1.99999999999999993e278 < (*.f64 t t)

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 92.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \cdot t \leq 5 \cdot 10^{-7}:\\
\;\;\;\;t\_1 \cdot t\_2\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999977e-7 < (*.f64 t t) < 1.99999999999999993e278

    1. Initial program 100.0%

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

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

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

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

    if 1.99999999999999993e278 < (*.f64 t t)

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 70.6% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0140000000000000003 < t < 3.19999999999999994e151

    1. Initial program 100.0%

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

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

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

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

    if 3.19999999999999994e151 < t

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 57.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{+190}:\\
\;\;\;\;x \cdot \left(0.5 \cdot {\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}\right)\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.4000000000000002e87 < t < 2.60000000000000011e190

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(0.5 \cdot {\left(\color{blue}{{\left(z \cdot 2\right)}^{1}} \cdot \sqrt{z \cdot 2}\right)}^{0.3333333333333333}\right) \]
      5. pow1/226.7%

        \[\leadsto x \cdot \left(0.5 \cdot {\left({\left(z \cdot 2\right)}^{1} \cdot \color{blue}{{\left(z \cdot 2\right)}^{0.5}}\right)}^{0.3333333333333333}\right) \]
      6. pow-prod-up26.7%

        \[\leadsto x \cdot \left(0.5 \cdot {\color{blue}{\left({\left(z \cdot 2\right)}^{\left(1 + 0.5\right)}\right)}}^{0.3333333333333333}\right) \]
      7. metadata-eval26.7%

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

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

    if 2.60000000000000011e190 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{{x}^{2} \cdot \left(\color{blue}{0.25} \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}\right)\right)} \]
      7. add-sqr-sqrt25.9%

        \[\leadsto \sqrt{{x}^{2} \cdot \left(0.25 \cdot \color{blue}{\left(z \cdot 2\right)}\right)} \]
      8. *-commutative25.9%

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

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

        \[\leadsto \sqrt{{x}^{2} \cdot \color{blue}{\left(\left(0.25 \cdot 2\right) \cdot z\right)}} \]
      2. metadata-eval25.9%

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

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

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

Alternative 8: 57.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 3.2 \cdot 10^{+87}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+190}:\\ \;\;\;\;x \cdot \left(0.5 \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{{x}^{2} \cdot \left(0.5 \cdot z\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t 3.2e+87)
   (* (- (* x 0.5) y) (sqrt (* 2.0 z)))
   (if (<= t 2.8e+190)
     (* x (* 0.5 (cbrt (pow (* 2.0 z) 1.5))))
     (sqrt (* (pow x 2.0) (* 0.5 z))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 3.2e+87) {
		tmp = ((x * 0.5) - y) * sqrt((2.0 * z));
	} else if (t <= 2.8e+190) {
		tmp = x * (0.5 * cbrt(pow((2.0 * z), 1.5)));
	} else {
		tmp = sqrt((pow(x, 2.0) * (0.5 * z)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 3.2e+87) {
		tmp = ((x * 0.5) - y) * Math.sqrt((2.0 * z));
	} else if (t <= 2.8e+190) {
		tmp = x * (0.5 * Math.cbrt(Math.pow((2.0 * z), 1.5)));
	} else {
		tmp = Math.sqrt((Math.pow(x, 2.0) * (0.5 * z)));
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 3.2e+87)
		tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z)));
	elseif (t <= 2.8e+190)
		tmp = Float64(x * Float64(0.5 * cbrt((Float64(2.0 * z) ^ 1.5))));
	else
		tmp = sqrt(Float64((x ^ 2.0) * Float64(0.5 * z)));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[t, 3.2e+87], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+190], N[(x * N[(0.5 * N[Power[N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[Power[x, 2.0], $MachinePrecision] * N[(0.5 * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+190}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\right)\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.2e87 < t < 2.79999999999999997e190

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(0.5 \cdot \sqrt[3]{\color{blue}{{\left(z \cdot 2\right)}^{1}} \cdot \sqrt{z \cdot 2}}\right) \]
      4. pow1/226.7%

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

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

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

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

    if 2.79999999999999997e190 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{{x}^{2} \cdot \left(\color{blue}{0.25} \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}\right)\right)} \]
      7. add-sqr-sqrt25.9%

        \[\leadsto \sqrt{{x}^{2} \cdot \left(0.25 \cdot \color{blue}{\left(z \cdot 2\right)}\right)} \]
      8. *-commutative25.9%

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

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

        \[\leadsto \sqrt{{x}^{2} \cdot \color{blue}{\left(\left(0.25 \cdot 2\right) \cdot z\right)}} \]
      2. metadata-eval25.9%

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

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

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

Alternative 9: 62.8% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999977e-7 < (*.f64 t t)

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 99.5% accurate, 1.0× speedup?

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

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

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

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

Alternative 11: 57.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.55000000000000006e51 < t

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 57.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e53 < t

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{{x}^{2} \cdot \left(\color{blue}{0.25} \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}\right)\right)} \]
      7. add-sqr-sqrt19.9%

        \[\leadsto \sqrt{{x}^{2} \cdot \left(0.25 \cdot \color{blue}{\left(z \cdot 2\right)}\right)} \]
      8. *-commutative19.9%

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

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

        \[\leadsto \sqrt{{x}^{2} \cdot \color{blue}{\left(\left(0.25 \cdot 2\right) \cdot z\right)}} \]
      2. metadata-eval19.9%

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

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

Alternative 13: 43.2% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-51} \lor \neg \left(y \leq 6 \cdot 10^{-28}\right):\\
\;\;\;\;\sqrt{2 \cdot z} \cdot \left(-y\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.00000000000000004e-51 or 6.00000000000000005e-28 < 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 x around 0 81.0%

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

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

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

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

    if -5.00000000000000004e-51 < y < 6.00000000000000005e-28

    1. Initial program 98.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 x around inf 85.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \sqrt{\color{blue}{0.25} \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}\right)} \]
      5. add-sqr-sqrt42.2%

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

        \[\leadsto x \cdot \sqrt{0.25 \cdot \color{blue}{\left(2 \cdot z\right)}} \]
    9. Applied egg-rr42.2%

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

        \[\leadsto x \cdot \sqrt{\color{blue}{\left(0.25 \cdot 2\right) \cdot z}} \]
      2. metadata-eval42.2%

        \[\leadsto x \cdot \sqrt{\color{blue}{0.5} \cdot z} \]
    11. Simplified42.2%

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

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

Alternative 14: 57.3% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 30.6% accurate, 2.0× speedup?

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

\\
x \cdot \sqrt{0.5 \cdot z}
\end{array}
Derivation
  1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \sqrt{\color{blue}{0.25} \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}\right)} \]
    5. add-sqr-sqrt26.7%

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

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

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

      \[\leadsto x \cdot \sqrt{\color{blue}{\left(0.25 \cdot 2\right) \cdot z}} \]
    2. metadata-eval26.7%

      \[\leadsto x \cdot \sqrt{\color{blue}{0.5} \cdot z} \]
  11. Simplified26.7%

    \[\leadsto x \cdot \color{blue}{\sqrt{0.5 \cdot z}} \]
  12. Add Preprocessing

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

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

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

Reproduce

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