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

Percentage Accurate: 99.4% → 99.8%
Time: 14.9s
Alternatives: 13
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 13 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.8% accurate, 0.7× speedup?

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

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

    \[\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. remove-double-neg99.8%

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
    4. 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) \]
    5. 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}}}} \]
  8. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 59.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq 1.02 \cdot 10^{+65}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\

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

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

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


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

    1. Initial program 98.9%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. 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. remove-double-neg99.8%

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      4. 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) \]
      5. 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}}}} \]
    8. Simplified99.8%

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

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

    if 1.3e15 < t < 1.02000000000000005e65

    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 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.02000000000000005e65 < t < 1.05e136

    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 12.7%

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

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

    if 1.05e136 < t < 1.76e174

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\color{blue}{y} \cdot \left(\sqrt{z \cdot 2} \cdot {\left(t + 1\right)}^{\left(t \cdot 0.5\right)}\right)\right)}^{1} \]
      8. pow1/250.0%

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

        \[\leadsto {\left(y \cdot \left({\left(z \cdot 2\right)}^{0.5} \cdot \color{blue}{{\left({\left(t + 1\right)}^{t}\right)}^{0.5}}\right)\right)}^{1} \]
      10. pow-prod-down50.0%

        \[\leadsto {\left(y \cdot \color{blue}{{\left(\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}\right)}^{0.5}}\right)}^{1} \]
    12. Applied egg-rr50.0%

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

        \[\leadsto \color{blue}{y \cdot {\left(\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}\right)}^{0.5}} \]
      2. unpow1/250.0%

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

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

    if 1.76e174 < 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 12.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.3 \cdot 10^{+15}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+65}:\\ \;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+136}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(y \cdot \left(0.5 \cdot \frac{x}{y} + -1\right)\right)\\ \mathbf{elif}\;t \leq 1.76 \cdot 10^{+174}:\\ \;\;\;\;y \cdot \sqrt{\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot \left(0.5 - \frac{y}{x}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 9.5 \lor \neg \left(t \leq 1.35 \cdot 10^{+154}\right):\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-\sqrt{\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t 9.5) (not (<= t 1.35e+154)))
   (* (- (* x 0.5) y) (sqrt (* (* z 2.0) (fma t t 1.0))))
   (* y (- (sqrt (* (* z 2.0) (pow (+ t 1.0) t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= 9.5) || !(t <= 1.35e+154)) {
		tmp = ((x * 0.5) - y) * sqrt(((z * 2.0) * fma(t, t, 1.0)));
	} else {
		tmp = y * -sqrt(((z * 2.0) * pow((t + 1.0), t)));
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= 9.5) || !(t <= 1.35e+154))
		tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * fma(t, t, 1.0))));
	else
		tmp = Float64(y * Float64(-sqrt(Float64(Float64(z * 2.0) * (Float64(t + 1.0) ^ t)))));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, 9.5], N[Not[LessEqual[t, 1.35e+154]], $MachinePrecision]], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * (-N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Power[N[(t + 1.0), $MachinePrecision], t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.5 \lor \neg \left(t \leq 1.35 \cdot 10^{+154}\right):\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 9.5 or 1.35000000000000003e154 < t

    1. Initial program 99.8%

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      4. 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) \]
      5. 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}}}} \]
    8. Simplified99.8%

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

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

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

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

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

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

    if 9.5 < t < 1.35000000000000003e154

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-y\right) \cdot \left(\sqrt{z \cdot 2} \cdot {\left(t + 1\right)}^{\left(t \cdot 0.5\right)}\right)} \]
      2. distribute-lft-neg-out79.1%

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

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

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

        \[\leadsto -y \cdot \color{blue}{{\left(\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}\right)}^{0.5}} \]
    12. Applied egg-rr79.1%

      \[\leadsto \color{blue}{-y \cdot {\left(\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}\right)}^{0.5}} \]
    13. Step-by-step derivation
      1. distribute-lft-neg-in79.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 9.5 \lor \neg \left(t \leq 1.35 \cdot 10^{+154}\right):\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-\sqrt{\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 99.8% accurate, 1.0× speedup?

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

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

    \[\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. remove-double-neg99.8%

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
    4. 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) \]
    5. 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}}}} \]
  8. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 72.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      4. 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) \]
      5. 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}}}} \]
    8. Simplified99.8%

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

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

    if 9.5 < t

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -y \cdot \left({\left(z \cdot 2\right)}^{0.5} \cdot \color{blue}{{\left({\left(t + 1\right)}^{t}\right)}^{0.5}}\right) \]
      5. pow-prod-down76.3%

        \[\leadsto -y \cdot \color{blue}{{\left(\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}\right)}^{0.5}} \]
    12. Applied egg-rr76.3%

      \[\leadsto \color{blue}{-y \cdot {\left(\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}\right)}^{0.5}} \]
    13. Step-by-step derivation
      1. distribute-lft-neg-in76.3%

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

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

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

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

Alternative 6: 99.4% accurate, 1.0× speedup?

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

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

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

Alternative 7: 59.6% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;t \leq 4.4 \cdot 10^{+64}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\

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

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


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

    1. Initial program 98.9%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. 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. remove-double-neg99.8%

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      4. 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) \]
      5. 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}}}} \]
    8. Simplified99.8%

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

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

    if 1.6e14 < t < 4.40000000000000004e64

    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 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.40000000000000004e64 < t < 1.8500000000000001e174

    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 8.8%

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

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

    if 1.8500000000000001e174 < 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 12.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.6 \cdot 10^{+14}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+64}:\\ \;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+174}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(y \cdot \left(0.5 \cdot \frac{x}{y} + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot \left(0.5 - \frac{y}{x}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 43.8% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;x \cdot 0.5 \leq -4 \cdot 10^{+68} \lor \neg \left(x \cdot 0.5 \leq 5 \cdot 10^{+14}\right):\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x #s(literal 1/2 binary64)) < -3.99999999999999981e68 or 5e14 < (*.f64 x #s(literal 1/2 binary64))

    1. Initial program 99.9%

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

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

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

    if -3.99999999999999981e68 < (*.f64 x #s(literal 1/2 binary64)) < 5e14

    1. Initial program 98.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
      3. neg-sub043.8%

        \[\leadsto \color{blue}{0 - y \cdot \sqrt{z \cdot 2}} \]
    8. Applied egg-rr43.8%

      \[\leadsto \color{blue}{0 - y \cdot \sqrt{z \cdot 2}} \]
    9. Step-by-step derivation
      1. neg-sub043.8%

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

        \[\leadsto -\color{blue}{\sqrt{z \cdot 2} \cdot y} \]
      3. distribute-rgt-neg-in43.8%

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

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

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

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

Alternative 9: 59.6% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;t \leq 2.9 \cdot 10^{+41}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\

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


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

    1. Initial program 98.9%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. 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. remove-double-neg99.8%

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      4. 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) \]
      5. 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}}}} \]
    8. Simplified99.8%

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

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

    if 1.35e15 < t < 2.89999999999999988e41

    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 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.89999999999999988e41 < 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 10.3%

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

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

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

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

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

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

Alternative 10: 57.8% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 98.9%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. 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. remove-double-neg99.8%

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
      4. 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) \]
      5. 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}}}} \]
    8. Simplified99.8%

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

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

    if 1.26e15 < 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 9.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 57.5% accurate, 2.0× speedup?

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

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

    \[\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. remove-double-neg99.8%

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
    4. 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) \]
    5. 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}}}} \]
  8. Simplified99.8%

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

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

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

Alternative 12: 29.8% accurate, 2.0× speedup?

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

\\
y \cdot \left(-\sqrt{z \cdot 2}\right)
\end{array}
Derivation
  1. Initial program 99.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 56.2%

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

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

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

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

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

      \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
    3. neg-sub028.4%

      \[\leadsto \color{blue}{0 - y \cdot \sqrt{z \cdot 2}} \]
  8. Applied egg-rr28.4%

    \[\leadsto \color{blue}{0 - y \cdot \sqrt{z \cdot 2}} \]
  9. Step-by-step derivation
    1. neg-sub028.4%

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

      \[\leadsto -\color{blue}{\sqrt{z \cdot 2} \cdot y} \]
    3. distribute-rgt-neg-in28.4%

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

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

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

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

Alternative 13: 2.5% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2}} \cdot y \]
  8. Applied egg-rr2.8%

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

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

Developer Target 1: 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 2024186 
(FPCore (x y z t)
  :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
  :precision binary64

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

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