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

Percentage Accurate: 99.4% → 99.7%
Time: 16.8s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% 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.0%

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

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

Alternative 2: 58.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 3.4 \cdot 10^{+29}:\\ \;\;\;\;t\_1 \cdot {\left(2 \cdot z\right)}^{0.5}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+174} \lor \neg \left(t \leq 7.6 \cdot 10^{+286}\right):\\ \;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {t\_1}^{2}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 3.4e+29)
     (* t_1 (pow (* 2.0 z) 0.5))
     (if (or (<= t 4e+174) (not (<= t 7.6e+286)))
       (sqrt (* (* 2.0 z) (pow t_1 2.0)))
       (* 0.5 (* x (cbrt (pow (* 2.0 z) 1.5))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 3.4e+29) {
		tmp = t_1 * pow((2.0 * z), 0.5);
	} else if ((t <= 4e+174) || !(t <= 7.6e+286)) {
		tmp = sqrt(((2.0 * z) * pow(t_1, 2.0)));
	} else {
		tmp = 0.5 * (x * cbrt(pow((2.0 * z), 1.5)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 3.4e+29) {
		tmp = t_1 * Math.pow((2.0 * z), 0.5);
	} else if ((t <= 4e+174) || !(t <= 7.6e+286)) {
		tmp = Math.sqrt(((2.0 * z) * Math.pow(t_1, 2.0)));
	} else {
		tmp = 0.5 * (x * Math.cbrt(Math.pow((2.0 * z), 1.5)));
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 3.4e+29)
		tmp = Float64(t_1 * (Float64(2.0 * z) ^ 0.5));
	elseif ((t <= 4e+174) || !(t <= 7.6e+286))
		tmp = sqrt(Float64(Float64(2.0 * z) * (t_1 ^ 2.0)));
	else
		tmp = Float64(0.5 * Float64(x * cbrt((Float64(2.0 * z) ^ 1.5))));
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 3.4e+29], N[(t$95$1 * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 4e+174], N[Not[LessEqual[t, 7.6e+286]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(0.5 * N[(x * N[Power[N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 4 \cdot 10^{+174} \lor \neg \left(t \leq 7.6 \cdot 10^{+286}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {t\_1}^{2}}\\

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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. Taylor expanded in t around 0 71.5%

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

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

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

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

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

    if 3.39999999999999981e29 < t < 4.00000000000000028e174 or 7.6e286 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot z\right) \cdot {\left(x \cdot 0.5 - y\right)}^{2}\right)}^{0.5}} \]
    8. Step-by-step derivation
      1. unpow1/237.2%

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

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

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

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

    if 4.00000000000000028e174 < t < 7.6e286

    1. Initial program 96.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 t around 0 11.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot {\left(2 \cdot z\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}}\right) \]
      4. pow-pow33.6%

        \[\leadsto 0.5 \cdot \left(x \cdot \color{blue}{{\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}}\right) \]
      5. *-commutative33.6%

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

      \[\leadsto 0.5 \cdot \left(x \cdot \color{blue}{{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{0.3333333333333333}}\right) \]
    11. Step-by-step derivation
      1. unpow1/333.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.4 \cdot 10^{+29}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot {\left(2 \cdot z\right)}^{0.5}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+174} \lor \neg \left(t \leq 7.6 \cdot 10^{+286}\right):\\ \;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {\left(x \cdot 0.5 - y\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 58.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{+174}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {t\_1}^{2}}\\

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

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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. Taylor expanded in t around 0 71.5%

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

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

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

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

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

    if 1.1599999999999999e31 < t < 7.79999999999999962e174

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{{\left({\left(\sqrt{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}}\right)}^{2}\right)}^{0.5} \cdot {\left({\left(\sqrt{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}}\right)}^{2}\right)}^{0.5}} \]
      11. pow-prod-down35.0%

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot z\right) \cdot {\left(x \cdot 0.5 - y\right)}^{2}\right)}^{0.5}} \]
    8. Step-by-step derivation
      1. unpow1/238.5%

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

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

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

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

    if 7.79999999999999962e174 < t < 1.25000000000000009e243

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot \color{blue}{{\left(2 \cdot z\right)}^{0.5}}\right) \]
      3. metadata-eval7.5%

        \[\leadsto 0.5 \cdot \left(x \cdot {\left(2 \cdot z\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}}\right) \]
      4. pow-pow37.7%

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

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

      \[\leadsto 0.5 \cdot \left(x \cdot \color{blue}{{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{0.3333333333333333}}\right) \]
    11. Step-by-step derivation
      1. unpow1/337.7%

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

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

    if 1.25000000000000009e243 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2} \cdot \left(x \cdot \color{blue}{\left(0.5 \cdot \sqrt{z} - \frac{y}{x} \cdot \sqrt{z}\right)}\right) \]
      4. distribute-rgt-out--31.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.16 \cdot 10^{+31}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot {\left(2 \cdot z\right)}^{0.5}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+174}:\\ \;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {\left(x \cdot 0.5 - y\right)}^{2}}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+243}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(x \cdot \left(\sqrt{z} \cdot \frac{y}{-x}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 58.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 1.95 \cdot 10^{+236}:\\
\;\;\;\;t\_1 \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\\

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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. Taylor expanded in t around 0 71.3%

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

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

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

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

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

    if 1.75e12 < t < 1.95e236

    1. Initial program 98.0%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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. Taylor expanded in t around 0 8.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{{\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}} \]
    8. Step-by-step derivation
      1. unpow1/338.9%

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

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

    if 1.95e236 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2} \cdot \left(x \cdot \color{blue}{\left(0.5 \cdot \sqrt{z} - \frac{y}{x} \cdot \sqrt{z}\right)}\right) \]
      4. distribute-rgt-out--24.8%

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

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

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

Alternative 5: 58.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+237}:\\
\;\;\;\;t\_1 \cdot {\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}\\

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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. Taylor expanded in t around 0 71.3%

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

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

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

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

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

    if 1.05e12 < t < 1.30000000000000001e237

    1. Initial program 98.0%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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. Taylor expanded in t around 0 8.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1.30000000000000001e237 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2} \cdot \left(x \cdot \color{blue}{\left(0.5 \cdot \sqrt{z} - \frac{y}{x} \cdot \sqrt{z}\right)}\right) \]
      4. distribute-rgt-out--24.8%

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

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

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

Alternative 6: 58.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ \mathbf{if}\;t \leq 600000000000:\\ \;\;\;\;t\_1 \cdot {\left(2 \cdot z\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= t 600000000000.0)
     (* t_1 (pow (* 2.0 z) 0.5))
     (* t_1 (cbrt (pow (* 2.0 z) 1.5))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 600000000000.0) {
		tmp = t_1 * pow((2.0 * z), 0.5);
	} else {
		tmp = t_1 * cbrt(pow((2.0 * z), 1.5));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if (t <= 600000000000.0) {
		tmp = t_1 * Math.pow((2.0 * z), 0.5);
	} else {
		tmp = t_1 * Math.cbrt(Math.pow((2.0 * z), 1.5));
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(x * 0.5) - y)
	tmp = 0.0
	if (t <= 600000000000.0)
		tmp = Float64(t_1 * (Float64(2.0 * z) ^ 0.5));
	else
		tmp = Float64(t_1 * cbrt((Float64(2.0 * z) ^ 1.5)));
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 600000000000.0], N[(t$95$1 * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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. Taylor expanded in t around 0 71.3%

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

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

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

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

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

    if 6e11 < t

    1. Initial program 98.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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. Taylor expanded in t around 0 9.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{{\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}} \]
    8. Step-by-step derivation
      1. unpow1/335.1%

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

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

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

Alternative 7: 99.4% accurate, 1.0× speedup?

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

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

Alternative 8: 56.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.3%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Step-by-step derivation
      1. 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. Taylor expanded in t around 0 71.5%

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

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

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

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

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

    if 2.3500000000000001e29 < t

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \left(x \cdot {\left(2 \cdot z\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}}\right) \]
      4. pow-pow31.2%

        \[\leadsto 0.5 \cdot \left(x \cdot \color{blue}{{\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}}\right) \]
      5. *-commutative31.2%

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

      \[\leadsto 0.5 \cdot \left(x \cdot \color{blue}{{\left({\left(z \cdot 2\right)}^{1.5}\right)}^{0.3333333333333333}}\right) \]
    11. Step-by-step derivation
      1. unpow1/331.2%

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

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

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

Alternative 9: 42.8% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.3 \cdot 10^{+126} \lor \neg \left(y \leq 2.15 \cdot 10^{-28}\right):\\
\;\;\;\;y \cdot \left(-\sqrt{2 \cdot z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.29999999999999983e126 or 2.15e-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 t around 0 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.29999999999999983e126 < y < 2.15e-28

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 44.6% accurate, 1.8× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot z\right) \cdot {\left(x \cdot 0.5 - y\right)}^{2}\right)}^{0.5}} \]
    8. Step-by-step derivation
      1. unpow1/250.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5800 < y < 1.99999999999999994e-28

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999994e-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 t around 0 66.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 42.8% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
\mathbf{if}\;y \leq -7.6 \cdot 10^{+126} \lor \neg \left(y \leq 4.8 \cdot 10^{-29}\right):\\
\;\;\;\;y \cdot \left(-t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.60000000000000033e126 or 4.79999999999999984e-29 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.60000000000000033e126 < y < 4.79999999999999984e-29

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 31.2% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3e9 < t

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot z\right) \cdot {\left(x \cdot 0.5 - y\right)}^{2}\right)}^{0.5}} \]
    8. Step-by-step derivation
      1. unpow1/224.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 56.4% accurate, 2.0× speedup?

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

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

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Step-by-step derivation
    1. 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. Taylor expanded in t around 0 57.1%

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

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

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

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

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

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

Alternative 14: 56.4% 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.0%

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Step-by-step derivation
    1. 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. Taylor expanded in t around 0 57.1%

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

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

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

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

    \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{{\left(2 \cdot z\right)}^{0.5}} \]
  8. Step-by-step derivation
    1. unpow1/257.3%

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

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

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

Alternative 15: 6.2% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left({\left(\sqrt{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}}\right)}^{2}\right)}^{0.5} \cdot {\left({\left(\sqrt{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}}\right)}^{2}\right)}^{0.5}} \]
    11. pow-prod-down24.2%

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

    \[\leadsto \color{blue}{{\left(\left(2 \cdot z\right) \cdot {\left(x \cdot 0.5 - y\right)}^{2}\right)}^{0.5}} \]
  8. Step-by-step derivation
    1. unpow1/223.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 17.1% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left({\left(\sqrt{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}}\right)}^{2}\right)}^{0.5} \cdot {\left({\left(\sqrt{\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}}\right)}^{2}\right)}^{0.5}} \]
    11. pow-prod-down24.2%

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

    \[\leadsto \color{blue}{{\left(\left(2 \cdot z\right) \cdot {\left(x \cdot 0.5 - y\right)}^{2}\right)}^{0.5}} \]
  8. Step-by-step derivation
    1. unpow1/223.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{y \cdot \color{blue}{\left(z \cdot \left(y \cdot 2\right)\right)}} \]
  15. Simplified14.5%

    \[\leadsto \sqrt{y \cdot \color{blue}{\left(z \cdot \left(y \cdot 2\right)\right)}} \]
  16. Final simplification14.5%

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

Developer target: 99.4% accurate, 0.7× speedup?

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

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

Reproduce

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

  :alt
  (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0)))

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