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

Percentage Accurate: 99.4% → 99.8%
Time: 16.5s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.5× speedup?

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

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

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

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

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

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

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

Alternative 2: 63.3% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

        \[\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.7%

        \[\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.7%

        \[\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.7%

        \[\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.7%

      \[\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.7%

        \[\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.7%

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

      \[\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 99.0%

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

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

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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.0%

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

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

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

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

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

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

Alternative 3: 99.8% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \cdot t \leq 5 \cdot 10^{+248}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(-\sqrt{z \cdot 2}\right)\right)\\

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

        \[\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.7%

        \[\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.7%

        \[\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.7%

        \[\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.7%

      \[\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.7%

        \[\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.7%

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

      \[\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 99.4%

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

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

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

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

    if 4.00000000000000019e-4 < (*.f64 t t) < 4.9999999999999996e248

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999996e248 < (*.f64 t t)

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 98.4%

      \[\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. +-commutative98.4%

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

        \[\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-define98.4%

        \[\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. Simplified98.4%

      \[\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)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification93.0%

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

Alternative 5: 92.0% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\


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

    1. Initial program 99.6%

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

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

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

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

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

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

        \[\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.7%

        \[\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.7%

        \[\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.7%

        \[\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.7%

      \[\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.7%

        \[\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.7%

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

      \[\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 99.3%

      \[\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. +-commutative99.3%

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

        \[\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-define99.3%

        \[\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. Simplified99.3%

      \[\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)}} \]
    12. Step-by-step derivation
      1. sqrt-prod99.3%

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

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

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

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

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

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

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

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

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

    if 4.00000000000000019e-4 < (*.f64 t t) < 4.9999999999999996e248

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999996e248 < (*.f64 t t)

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 98.4%

      \[\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. +-commutative98.4%

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

        \[\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-define98.4%

        \[\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. Simplified98.4%

      \[\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)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification93.0%

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

Alternative 6: 80.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. +-commutative87.2%

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

        \[\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-define87.2%

        \[\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. Simplified87.2%

      \[\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)}} \]
    12. Step-by-step derivation
      1. sqrt-prod85.8%

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

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

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

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

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

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

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

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

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

    if 0.154999999999999999 < t < 3.69999999999999992e230

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0 - \color{blue}{\sqrt{z \cdot 2} \cdot y}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    7. Applied egg-rr78.3%

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

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

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

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

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

    if 3.69999999999999992e230 < 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. Step-by-step derivation
      1. associate-*l*100.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 100.0%

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

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

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

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

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

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

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

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

Alternative 7: 71.6% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.043999999999999997 < t < 1.35000000000000002e230

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0 - \color{blue}{\sqrt{z \cdot 2} \cdot y}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    7. Applied egg-rr78.3%

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

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

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

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

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

    if 1.35000000000000002e230 < 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. Step-by-step derivation
      1. associate-*l*100.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 100.0%

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

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

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

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

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

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

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

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

Alternative 8: 64.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 74.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 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 10: 59.2% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.9e-19

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9e-19 < 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 25.5%

      \[\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 35.2%

      \[\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 \]
    5. Step-by-step derivation
      1. clear-num35.2%

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

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

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

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

Alternative 11: 59.3% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.9999999999999999e-20

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999999e-20 < 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 25.5%

      \[\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 35.2%

      \[\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 \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.2%

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

Alternative 12: 43.4% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;y \leq -8 \cdot 10^{+75} \lor \neg \left(y \leq 2.4 \cdot 10^{+78}\right):\\
\;\;\;\;y \cdot \left(-t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.99999999999999941e75 or 2.3999999999999999e78 < y

    1. Initial program 99.8%

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

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

      \[\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-neg54.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
      2. distribute-rgt-neg-in54.1%

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

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

    if -7.99999999999999941e75 < y < 2.3999999999999999e78

    1. Initial program 98.5%

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

      \[\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 44.8%

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

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

Alternative 13: 59.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{z \cdot 2}\\ \mathbf{if}\;t \leq 90000:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\ \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 90000.0) (* (- (* x 0.5) y) t_1) (* 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 <= 90000.0) {
		tmp = ((x * 0.5) - y) * t_1;
	} 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 <= 90000.0d0) then
        tmp = ((x * 0.5d0) - y) * t_1
    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 <= 90000.0) {
		tmp = ((x * 0.5) - y) * t_1;
	} 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 <= 90000.0:
		tmp = ((x * 0.5) - y) * t_1
	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 <= 90000.0)
		tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1);
	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 <= 90000.0)
		tmp = ((x * 0.5) - y) * t_1;
	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, 90000.0], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $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 90000:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\

\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 2 regimes
  2. if t < 9e4

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\color{blue}{\left(z \cdot 2\right) \cdot e^{{t}^{2}}}} \]
    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 9e4 < 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 23.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 26.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-neg26.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-neg26.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. Simplified26.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 2 regimes into one program.
  4. Final simplification60.7%

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

Alternative 14: 57.3% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \left(x \cdot 0.5 - y\right) \cdot \sqrt{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.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 30.2% 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.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 60.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 0 32.0%

    \[\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-neg32.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-y \cdot \sqrt{z \cdot 2}} \]
    2. distribute-rgt-neg-in32.0%

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

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

Alternative 16: 2.4% 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.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 60.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 0 32.0%

    \[\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-neg32.0%

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{y \cdot y}} \cdot \sqrt{z \cdot 2} \]
    5. sqrt-unprod1.9%

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

      \[\leadsto \color{blue}{y} \cdot \sqrt{z \cdot 2} \]
    7. pow13.5%

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

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

      \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
  10. Simplified3.5%

    \[\leadsto \color{blue}{y \cdot \sqrt{z \cdot 2}} \]
  11. 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 2024139 
(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))))