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

Percentage Accurate: 99.6% → 99.8%
Time: 11.9s
Alternatives: 10
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 10 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.6% 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.4× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t\_m}}\right)}^{t\_m}\right) \end{array} \]
t_m = (fabs.f64 t)
(FPCore (x y z t_m)
 :precision binary64
 (* (sqrt (* z 2.0)) (* (fma x 0.5 (- y)) (pow (sqrt (exp t_m)) t_m))))
t_m = fabs(t);
double code(double x, double y, double z, double t_m) {
	return sqrt((z * 2.0)) * (fma(x, 0.5, -y) * pow(sqrt(exp(t_m)), t_m));
}
t_m = abs(t)
function code(x, y, z, t_m)
	return Float64(sqrt(Float64(z * 2.0)) * Float64(fma(x, 0.5, Float64(-y)) * (sqrt(exp(t_m)) ^ t_m)))
end
t_m = N[Abs[t], $MachinePrecision]
code[x_, y_, z_, t$95$m_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5 + (-y)), $MachinePrecision] * N[Power[N[Sqrt[N[Exp[t$95$m], $MachinePrecision]], $MachinePrecision], t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|

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

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

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

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

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

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

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

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

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

Alternative 2: 86.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.2%

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

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \cdot e^{\frac{t \cdot t}{2}}\right) \]
      4. associate-*l/99.7%

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 71.7%

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

    if 11.5999999999999996 < 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. *-commutative100.0%

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \cdot e^{\frac{t \cdot t}{2}}\right) \]
      4. associate-*l/100.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 76.7%

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

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

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

Alternative 3: 85.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.2%

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

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \cdot e^{\frac{t \cdot t}{2}}\right) \]
      4. associate-*l/99.7%

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 71.7%

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

    if 11.5999999999999996 < 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. *-commutative100.0%

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \cdot e^{\frac{t \cdot t}{2}}\right) \]
      4. associate-*l/100.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.4% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} \mathbf{if}\;t\_m \leq 15.5:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(\sqrt{2} \cdot \sqrt{z}\right) \cdot \left(0.5 - \frac{y}{x}\right)\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (x y z t_m)
 :precision binary64
 (if (<= t_m 15.5)
   (* (sqrt (* z 2.0)) (- (* x 0.5) y))
   (* x (* (* (sqrt 2.0) (sqrt z)) (- 0.5 (/ y x))))))
t_m = fabs(t);
double code(double x, double y, double z, double t_m) {
	double tmp;
	if (t_m <= 15.5) {
		tmp = sqrt((z * 2.0)) * ((x * 0.5) - y);
	} else {
		tmp = x * ((sqrt(2.0) * sqrt(z)) * (0.5 - (y / x)));
	}
	return tmp;
}
t_m = abs(t)
real(8) function code(x, y, z, t_m)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (t_m <= 15.5d0) then
        tmp = sqrt((z * 2.0d0)) * ((x * 0.5d0) - y)
    else
        tmp = x * ((sqrt(2.0d0) * sqrt(z)) * (0.5d0 - (y / x)))
    end if
    code = tmp
end function
t_m = Math.abs(t);
public static double code(double x, double y, double z, double t_m) {
	double tmp;
	if (t_m <= 15.5) {
		tmp = Math.sqrt((z * 2.0)) * ((x * 0.5) - y);
	} else {
		tmp = x * ((Math.sqrt(2.0) * Math.sqrt(z)) * (0.5 - (y / x)));
	}
	return tmp;
}
t_m = math.fabs(t)
def code(x, y, z, t_m):
	tmp = 0
	if t_m <= 15.5:
		tmp = math.sqrt((z * 2.0)) * ((x * 0.5) - y)
	else:
		tmp = x * ((math.sqrt(2.0) * math.sqrt(z)) * (0.5 - (y / x)))
	return tmp
t_m = abs(t)
function code(x, y, z, t_m)
	tmp = 0.0
	if (t_m <= 15.5)
		tmp = Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(x * 0.5) - y));
	else
		tmp = Float64(x * Float64(Float64(sqrt(2.0) * sqrt(z)) * Float64(0.5 - Float64(y / x))));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(x, y, z, t_m)
	tmp = 0.0;
	if (t_m <= 15.5)
		tmp = sqrt((z * 2.0)) * ((x * 0.5) - y);
	else
		tmp = x * ((sqrt(2.0) * sqrt(z)) * (0.5 - (y / x)));
	end
	tmp_2 = tmp;
end
t_m = N[Abs[t], $MachinePrecision]
code[x_, y_, z_, t$95$m_] := If[LessEqual[t$95$m, 15.5], N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision] * N[(0.5 - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|

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

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


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

    1. Initial program 99.2%

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

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \cdot e^{\frac{t \cdot t}{2}}\right) \]
      4. associate-*l/99.7%

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 71.7%

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

    if 15.5 < 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. *-commutative100.0%

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \cdot e^{\frac{t \cdot t}{2}}\right) \]
      4. associate-*l/100.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 10.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 58.1% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} \mathbf{if}\;t\_m \leq 2800000000:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z} \cdot \left(x \cdot \left(\sqrt{2} \cdot \frac{y}{-x}\right)\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (x y z t_m)
 :precision binary64
 (if (<= t_m 2800000000.0)
   (* (sqrt (* z 2.0)) (- (* x 0.5) y))
   (* (sqrt z) (* x (* (sqrt 2.0) (/ y (- x)))))))
t_m = fabs(t);
double code(double x, double y, double z, double t_m) {
	double tmp;
	if (t_m <= 2800000000.0) {
		tmp = sqrt((z * 2.0)) * ((x * 0.5) - y);
	} else {
		tmp = sqrt(z) * (x * (sqrt(2.0) * (y / -x)));
	}
	return tmp;
}
t_m = abs(t)
real(8) function code(x, y, z, t_m)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (t_m <= 2800000000.0d0) then
        tmp = sqrt((z * 2.0d0)) * ((x * 0.5d0) - y)
    else
        tmp = sqrt(z) * (x * (sqrt(2.0d0) * (y / -x)))
    end if
    code = tmp
end function
t_m = Math.abs(t);
public static double code(double x, double y, double z, double t_m) {
	double tmp;
	if (t_m <= 2800000000.0) {
		tmp = Math.sqrt((z * 2.0)) * ((x * 0.5) - y);
	} else {
		tmp = Math.sqrt(z) * (x * (Math.sqrt(2.0) * (y / -x)));
	}
	return tmp;
}
t_m = math.fabs(t)
def code(x, y, z, t_m):
	tmp = 0
	if t_m <= 2800000000.0:
		tmp = math.sqrt((z * 2.0)) * ((x * 0.5) - y)
	else:
		tmp = math.sqrt(z) * (x * (math.sqrt(2.0) * (y / -x)))
	return tmp
t_m = abs(t)
function code(x, y, z, t_m)
	tmp = 0.0
	if (t_m <= 2800000000.0)
		tmp = Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(x * 0.5) - y));
	else
		tmp = Float64(sqrt(z) * Float64(x * Float64(sqrt(2.0) * Float64(y / Float64(-x)))));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(x, y, z, t_m)
	tmp = 0.0;
	if (t_m <= 2800000000.0)
		tmp = sqrt((z * 2.0)) * ((x * 0.5) - y);
	else
		tmp = sqrt(z) * (x * (sqrt(2.0) * (y / -x)));
	end
	tmp_2 = tmp;
end
t_m = N[Abs[t], $MachinePrecision]
code[x_, y_, z_, t$95$m_] := If[LessEqual[t$95$m, 2800000000.0], N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[z], $MachinePrecision] * N[(x * N[(N[Sqrt[2.0], $MachinePrecision] * N[(y / (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|

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

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


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

    1. Initial program 99.2%

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

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \cdot e^{\frac{t \cdot t}{2}}\right) \]
      4. associate-*l/99.7%

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 70.6%

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

    if 2.8e9 < 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. *-commutative100.0%

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \cdot e^{\frac{t \cdot t}{2}}\right) \]
      4. associate-*l/100.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 11.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 99.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 7: 57.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.2%

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

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \cdot e^{\frac{t \cdot t}{2}}\right) \]
      4. associate-*l/99.7%

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 70.9%

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

    if 9.5e6 < 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. *-commutative100.0%

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

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

        \[\leadsto \sqrt{z \cdot 2} \cdot \left(\color{blue}{\mathsf{fma}\left(x, 0.5, -y\right)} \cdot e^{\frac{t \cdot t}{2}}\right) \]
      4. associate-*l/100.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 57.0% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in t around 0 54.3%

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

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

Alternative 9: 30.1% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in x around 0 66.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 2.4% accurate, 2.0× speedup?

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

\\
\sqrt{z \cdot 2} \cdot y
\end{array}
Derivation
  1. Initial program 99.4%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot {\left(\sqrt{e^{t}}\right)}^{t}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in x around 0 66.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot y} \]
  9. Add Preprocessing

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

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

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