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

Percentage Accurate: 99.4% → 99.8%
Time: 13.4s
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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 62.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6e6 < 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. Taylor expanded in t around 0 15.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}} \]
    10. Step-by-step derivation
      1. pow1/327.3%

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left({\left({\left(2 \cdot z\right)}^{1.5}\right)}^{\left(\frac{0.3333333333333333}{2}\right)} \cdot {\left({\left(2 \cdot z\right)}^{1.5}\right)}^{\left(\frac{0.3333333333333333}{2}\right)}\right)} \]
      3. pow-prod-down42.6%

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot {\color{blue}{\left({\left(2 \cdot z\right)}^{\left(1.5 + 1.5\right)}\right)}}^{\left(\frac{0.3333333333333333}{2}\right)} \]
      5. metadata-eval42.6%

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot {\left({\color{blue}{\left(z \cdot 2\right)}}^{3}\right)}^{\left(\frac{0.3333333333333333}{2}\right)} \]
      7. metadata-eval42.6%

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

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

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

Alternative 3: 58.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.55000000000000006e-35 < 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. Taylor expanded in t around 0 24.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 59.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1e15 < 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. Taylor expanded in t around 0 15.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 99.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 6: 57.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.6e22 < 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. Taylor expanded in t around 0 16.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.5 \cdot \sqrt{z \cdot \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(x \cdot x\right)\right)}} \]
      8. rem-square-sqrt15.0%

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

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

      \[\leadsto 0.5 \cdot \color{blue}{\sqrt{z \cdot \left(2 \cdot {x}^{2}\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 36.9% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+113} \lor \neg \left(y \leq -1.85 \cdot 10^{+50}\right) \land y \leq -2.7 \cdot 10^{-5}:\\
\;\;\;\;\sqrt{2 \cdot \left(y \cdot \left(z \cdot \left(y - x\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.0000000000000001e113 or -1.85e50 < y < -2.6999999999999999e-5

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(2 \cdot \left(z \cdot {\left(x \cdot 0.5 - y\right)}^{2}\right)\right)}}^{0.5} \]
      10. fma-neg55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.0000000000000001e113 < y < -1.85e50 or -2.6999999999999999e-5 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 56.9% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.6e22 < 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. Taylor expanded in t around 0 16.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(2 \cdot \left(z \cdot {\left(x \cdot 0.5 - y\right)}^{2}\right)\right)}}^{0.5} \]
      10. fma-neg21.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 56.7% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 30.3% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\sqrt{2 \cdot z} \cdot \left(0.5 \cdot x\right)} \]
  13. Final simplification32.3%

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

Developer target: 99.4% accurate, 0.7× speedup?

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

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

Reproduce

?
herbie shell --seed 2024087 
(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))))