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

Percentage Accurate: 99.6% → 99.8%
Time: 15.9s
Alternatives: 12
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 12 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.5× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{{\left(e^{0.5 \cdot t\_m}\right)}^{\left(2 \cdot t\_m\right)}} \cdot \sqrt{z \cdot 2}\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. 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. add-sqr-sqrt99.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.8% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 84.2% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.2%

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

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

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

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

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

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

    if 24 < t < 2.10000000000000001e80

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.10000000000000001e80 < 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. sqrt-unprod100.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 75.2% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ t_2 := \sqrt{z \cdot 2}\\ \mathbf{if}\;t\_m \leq 27.5:\\ \;\;\;\;t\_1 \cdot t\_2\\ \mathbf{elif}\;t\_m \leq 4.7 \cdot 10^{+73}:\\ \;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot {t\_1}^{2}}\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot t\_m\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (x y z t_m)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* z 2.0))))
   (if (<= t_m 27.5)
     (* t_1 t_2)
     (if (<= t_m 4.7e+73)
       (sqrt (* (* z 2.0) (pow t_1 2.0)))
       (* t_2 (* t_1 t_m))))))
t_m = fabs(t);
double code(double x, double y, double z, double t_m) {
	double t_1 = (x * 0.5) - y;
	double t_2 = sqrt((z * 2.0));
	double tmp;
	if (t_m <= 27.5) {
		tmp = t_1 * t_2;
	} else if (t_m <= 4.7e+73) {
		tmp = sqrt(((z * 2.0) * pow(t_1, 2.0)));
	} else {
		tmp = t_2 * (t_1 * 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) :: t_2
    real(8) :: tmp
    t_1 = (x * 0.5d0) - y
    t_2 = sqrt((z * 2.0d0))
    if (t_m <= 27.5d0) then
        tmp = t_1 * t_2
    else if (t_m <= 4.7d+73) then
        tmp = sqrt(((z * 2.0d0) * (t_1 ** 2.0d0)))
    else
        tmp = t_2 * (t_1 * 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 = (x * 0.5) - y;
	double t_2 = Math.sqrt((z * 2.0));
	double tmp;
	if (t_m <= 27.5) {
		tmp = t_1 * t_2;
	} else if (t_m <= 4.7e+73) {
		tmp = Math.sqrt(((z * 2.0) * Math.pow(t_1, 2.0)));
	} else {
		tmp = t_2 * (t_1 * t_m);
	}
	return tmp;
}
t_m = math.fabs(t)
def code(x, y, z, t_m):
	t_1 = (x * 0.5) - y
	t_2 = math.sqrt((z * 2.0))
	tmp = 0
	if t_m <= 27.5:
		tmp = t_1 * t_2
	elif t_m <= 4.7e+73:
		tmp = math.sqrt(((z * 2.0) * math.pow(t_1, 2.0)))
	else:
		tmp = t_2 * (t_1 * t_m)
	return tmp
t_m = abs(t)
function code(x, y, z, t_m)
	t_1 = Float64(Float64(x * 0.5) - y)
	t_2 = sqrt(Float64(z * 2.0))
	tmp = 0.0
	if (t_m <= 27.5)
		tmp = Float64(t_1 * t_2);
	elseif (t_m <= 4.7e+73)
		tmp = sqrt(Float64(Float64(z * 2.0) * (t_1 ^ 2.0)));
	else
		tmp = Float64(t_2 * Float64(t_1 * t_m));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(x, y, z, t_m)
	t_1 = (x * 0.5) - y;
	t_2 = sqrt((z * 2.0));
	tmp = 0.0;
	if (t_m <= 27.5)
		tmp = t_1 * t_2;
	elseif (t_m <= 4.7e+73)
		tmp = sqrt(((z * 2.0) * (t_1 ^ 2.0)));
	else
		tmp = t_2 * (t_1 * 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[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$m, 27.5], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[t$95$m, 4.7e+73], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$2 * N[(t$95$1 * t$95$m), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_m = \left|t\right|

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

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

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot t\_m\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 27.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. 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. sqrt-unprod99.7%

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

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

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

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

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

    if 27.5 < t < 4.7000000000000002e73

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.7000000000000002e73 < 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. sqrt-unprod100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 27.5:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+73}:\\ \;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot {\left(x \cdot 0.5 - y\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot t\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(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \end{array} \]
t_m = (fabs.f64 t)
(FPCore (x y z t_m)
 :precision binary64
 (* (exp (/ (* t_m t_m) 2.0)) (* (- (* x 0.5) y) (sqrt (* z 2.0)))))
t_m = fabs(t);
double code(double x, double y, double z, double t_m) {
	return exp(((t_m * t_m) / 2.0)) * (((x * 0.5) - y) * sqrt((z * 2.0)));
}
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)) * (((x * 0.5d0) - y) * sqrt((z * 2.0d0)))
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)) * (((x * 0.5) - y) * Math.sqrt((z * 2.0)));
}
t_m = math.fabs(t)
def code(x, y, z, t_m):
	return math.exp(((t_m * t_m) / 2.0)) * (((x * 0.5) - y) * math.sqrt((z * 2.0)))
t_m = abs(t)
function code(x, y, z, t_m)
	return Float64(exp(Float64(Float64(t_m * t_m) / 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))))
end
t_m = abs(t);
function tmp = code(x, y, z, t_m)
	tmp = exp(((t_m * t_m) / 2.0)) * (((x * 0.5) - y) * sqrt((z * 2.0)));
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[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|

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

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

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

Alternative 7: 84.4% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z + z \cdot {t\_m}^{2}\right)} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (x y z t_m)
 :precision binary64
 (* (- (* x 0.5) y) (sqrt (* 2.0 (+ z (* z (pow t_m 2.0)))))))
t_m = fabs(t);
double code(double x, double y, double z, double t_m) {
	return ((x * 0.5) - y) * sqrt((2.0 * (z + (z * pow(t_m, 2.0)))));
}
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 = ((x * 0.5d0) - y) * sqrt((2.0d0 * (z + (z * (t_m ** 2.0d0)))))
end function
t_m = Math.abs(t);
public static double code(double x, double y, double z, double t_m) {
	return ((x * 0.5) - y) * Math.sqrt((2.0 * (z + (z * Math.pow(t_m, 2.0)))));
}
t_m = math.fabs(t)
def code(x, y, z, t_m):
	return ((x * 0.5) - y) * math.sqrt((2.0 * (z + (z * math.pow(t_m, 2.0)))))
t_m = abs(t)
function code(x, y, z, t_m)
	return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * Float64(z + Float64(z * (t_m ^ 2.0))))))
end
t_m = abs(t);
function tmp = code(x, y, z, t_m)
	tmp = ((x * 0.5) - y) * sqrt((2.0 * (z + (z * (t_m ^ 2.0)))));
end
t_m = N[Abs[t], $MachinePrecision]
code[x_, y_, z_, t$95$m_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(z + N[(z * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z + z \cdot {t\_m}^{2}\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. 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. sqrt-unprod99.8%

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

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

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

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

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

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

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

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

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

Alternative 8: 84.4% accurate, 1.0× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z \cdot \mathsf{fma}\left(t\_m, t\_m, 1\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. 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. sqrt-unprod99.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 71.2% accurate, 1.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_m \cdot t\_1\\


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

    1. Initial program 99.2%

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

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

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

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

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

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

    if 0.0132 < 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. sqrt-unprod100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 74.9% accurate, 1.9× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} t_1 := x \cdot 0.5 - y\\ t_2 := \sqrt{z \cdot 2}\\ \mathbf{if}\;t\_m \leq 0.0132:\\ \;\;\;\;t\_1 \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot t\_m\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (x y z t_m)
 :precision binary64
 (let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* z 2.0))))
   (if (<= t_m 0.0132) (* t_1 t_2) (* t_2 (* t_1 t_m)))))
t_m = fabs(t);
double code(double x, double y, double z, double t_m) {
	double t_1 = (x * 0.5) - y;
	double t_2 = sqrt((z * 2.0));
	double tmp;
	if (t_m <= 0.0132) {
		tmp = t_1 * t_2;
	} else {
		tmp = t_2 * (t_1 * 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) :: t_2
    real(8) :: tmp
    t_1 = (x * 0.5d0) - y
    t_2 = sqrt((z * 2.0d0))
    if (t_m <= 0.0132d0) then
        tmp = t_1 * t_2
    else
        tmp = t_2 * (t_1 * 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 = (x * 0.5) - y;
	double t_2 = Math.sqrt((z * 2.0));
	double tmp;
	if (t_m <= 0.0132) {
		tmp = t_1 * t_2;
	} else {
		tmp = t_2 * (t_1 * t_m);
	}
	return tmp;
}
t_m = math.fabs(t)
def code(x, y, z, t_m):
	t_1 = (x * 0.5) - y
	t_2 = math.sqrt((z * 2.0))
	tmp = 0
	if t_m <= 0.0132:
		tmp = t_1 * t_2
	else:
		tmp = t_2 * (t_1 * t_m)
	return tmp
t_m = abs(t)
function code(x, y, z, t_m)
	t_1 = Float64(Float64(x * 0.5) - y)
	t_2 = sqrt(Float64(z * 2.0))
	tmp = 0.0
	if (t_m <= 0.0132)
		tmp = Float64(t_1 * t_2);
	else
		tmp = Float64(t_2 * Float64(t_1 * t_m));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(x, y, z, t_m)
	t_1 = (x * 0.5) - y;
	t_2 = sqrt((z * 2.0));
	tmp = 0.0;
	if (t_m <= 0.0132)
		tmp = t_1 * t_2;
	else
		tmp = t_2 * (t_1 * 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[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$m, 0.0132], N[(t$95$1 * t$95$2), $MachinePrecision], N[(t$95$2 * N[(t$95$1 * t$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|

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

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot t\_m\right)\\


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

    1. Initial program 99.2%

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

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

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

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

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

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

    if 0.0132 < 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. sqrt-unprod100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 57.0% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 29.7% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(x \cdot \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(0.5 \cdot \sqrt{z}\right) \cdot \left(0.5 \cdot \sqrt{z}\right)\right)}}\right)}^{1} \]
    10. rem-square-sqrt25.2%

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(x \cdot \sqrt{2 \cdot \left(z \cdot 0.25\right)}\right)}^{1}} \]
  13. Step-by-step derivation
    1. unpow125.2%

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

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

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

      \[\leadsto x \cdot \sqrt{\color{blue}{0.5} \cdot z} \]
    5. *-commutative25.2%

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

    \[\leadsto \color{blue}{x \cdot \sqrt{z \cdot 0.5}} \]
  15. Final simplification25.2%

    \[\leadsto x \cdot \sqrt{0.5 \cdot z} \]
  16. 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))))