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

Percentage Accurate: 99.5% → 99.8%
Time: 9.8s
Alternatives: 5
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 5 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.5% 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, 1.0× speedup?

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot 2} \cdot \sqrt{e^{t \cdot t}}\right)\right)} \]
    2. expm1-udef78.4%

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)}\right)\right)} \]
    2. expm1-log1p99.9%

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

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

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

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

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

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

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

Alternative 2: 90.9% accurate, 1.0× speedup?

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

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

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

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


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

    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.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. Simplified99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999998e-17 < (*.f64 t t) < 9.9999999999999999e228

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)}}{\frac{\mathsf{fma}\left(x, 0.5, y\right)}{x \cdot \left(x \cdot 0.25\right) - y \cdot y}}} \]
    6. Taylor expanded in x around 0 75.4%

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

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

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

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

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

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

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

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

    if 9.9999999999999999e228 < (*.f64 t t)

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot t \leq 10^{-16}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\ \mathbf{elif}\;t \cdot t \leq 10^{+229}:\\ \;\;\;\;y \cdot \left(-\sqrt{e^{t \cdot t} \cdot \left(2 \cdot z\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z + z \cdot \left(t \cdot t\right)\right)}\\ \end{array} \]

Alternative 3: 83.6% accurate, 1.9× speedup?

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot 2} \cdot \sqrt{e^{t \cdot t}}\right)\right)} \]
    2. expm1-udef78.4%

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)}\right)\right)} \]
    2. expm1-log1p99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 56.1% 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.5%

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot 2} \cdot \sqrt{e^{t \cdot t}}\right)\right)} \]
    2. expm1-udef78.4%

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)}\right)\right)} \]
    2. expm1-log1p99.9%

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

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

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

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

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

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

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

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

Alternative 5: 29.1% accurate, 2.0× speedup?

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

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

    \[\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-*r*99.9%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\sqrt{z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)}}{\frac{\mathsf{fma}\left(x, 0.5, y\right)}{x \cdot \left(x \cdot 0.25\right) - y \cdot y}}} \]
  6. Taylor expanded in x around 0 61.8%

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

    \[\leadsto \frac{\sqrt{\color{blue}{2 \cdot z}}}{\frac{-1}{y}} \]
  8. Step-by-step derivation
    1. rem-log-exp25.9%

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

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

      \[\leadsto \frac{\sqrt{\log \color{blue}{\left(e^{z} \cdot e^{z}\right)}}}{\frac{-1}{y}} \]
    4. prod-exp25.9%

      \[\leadsto \frac{\sqrt{\log \color{blue}{\left(e^{z + z}\right)}}}{\frac{-1}{y}} \]
    5. rem-log-exp25.1%

      \[\leadsto \frac{\sqrt{\color{blue}{z + z}}}{\frac{-1}{y}} \]
  9. Simplified25.1%

    \[\leadsto \frac{\sqrt{\color{blue}{z + z}}}{\frac{-1}{y}} \]
  10. Step-by-step derivation
    1. expm1-log1p-u15.4%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sqrt{z + z}}{\frac{-1}{y}}\right)\right)} \]
    2. expm1-udef11.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\sqrt{z + z}}{\frac{-1}{y}}\right)} - 1} \]
    3. associate-/r/11.9%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\sqrt{z + z}}{-1} \cdot y}\right)} - 1 \]
  11. Applied egg-rr11.9%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\sqrt{z + z}}{-1} \cdot y\right)} - 1} \]
  12. Step-by-step derivation
    1. expm1-def15.5%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sqrt{z + z}}{-1} \cdot y\right)\right)} \]
    2. expm1-log1p25.1%

      \[\leadsto \color{blue}{\frac{\sqrt{z + z}}{-1} \cdot y} \]
    3. associate-/r/25.1%

      \[\leadsto \color{blue}{\frac{\sqrt{z + z}}{\frac{-1}{y}}} \]
    4. *-rgt-identity25.1%

      \[\leadsto \frac{\color{blue}{\sqrt{z + z} \cdot 1}}{\frac{-1}{y}} \]
    5. associate-*r/25.1%

      \[\leadsto \color{blue}{\sqrt{z + z} \cdot \frac{1}{\frac{-1}{y}}} \]
    6. associate-/r/25.1%

      \[\leadsto \sqrt{z + z} \cdot \color{blue}{\left(\frac{1}{-1} \cdot y\right)} \]
    7. metadata-eval25.1%

      \[\leadsto \sqrt{z + z} \cdot \left(\color{blue}{-1} \cdot y\right) \]
    8. neg-mul-125.1%

      \[\leadsto \sqrt{z + z} \cdot \color{blue}{\left(-y\right)} \]
  13. Simplified25.1%

    \[\leadsto \color{blue}{\sqrt{z + z} \cdot \left(-y\right)} \]
  14. Final simplification25.1%

    \[\leadsto \sqrt{z + z} \cdot \left(-y\right) \]

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

  :herbie-target
  (* (* (- (* 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))))