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

Percentage Accurate: 99.4% → 99.4%
Time: 14.2s
Alternatives: 4
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 4 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.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}
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 \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  4. Add Preprocessing

Alternative 2: 80.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
t_2 := e^{\frac{t \cdot t}{2}}\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{-42} \lor \neg \left(y \leq 3.7 \cdot 10^{+87}\right):\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot \left(-y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.32000000000000006e-42 or 3.70000000000000003e87 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    if -1.32000000000000006e-42 < y < 3.70000000000000003e87

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\sqrt{2 \cdot z}} \cdot \left(0.5 \cdot x\right)\right)} - 1\right) \cdot e^{\frac{t \cdot t}{2}} \]
    7. Applied egg-rr28.9%

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

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{2 \cdot z} \cdot \left(0.5 \cdot x\right)\right)} + \left(-1\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      2. metadata-eval28.9%

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

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

        \[\leadsto \left(-1 + e^{\color{blue}{\log \left(1 + \sqrt{2 \cdot z} \cdot \left(0.5 \cdot x\right)\right)}}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      5. rem-exp-log57.8%

        \[\leadsto \left(-1 + \color{blue}{\left(1 + \sqrt{2 \cdot z} \cdot \left(0.5 \cdot x\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      6. associate-+r+81.9%

        \[\leadsto \color{blue}{\left(\left(-1 + 1\right) + \sqrt{2 \cdot z} \cdot \left(0.5 \cdot x\right)\right)} \cdot e^{\frac{t \cdot t}{2}} \]
      7. metadata-eval81.9%

        \[\leadsto \left(\color{blue}{0} + \sqrt{2 \cdot z} \cdot \left(0.5 \cdot x\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      8. +-lft-identity81.9%

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

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

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

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

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

Alternative 3: 61.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := e^{\frac{t \cdot t}{2}}\\
t_2 := \sqrt{z \cdot 2}\\
\mathbf{if}\;x \leq 9.5 \cdot 10^{+211}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \left(-y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 9.4999999999999997e211

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if 9.4999999999999997e211 < x

    1. Initial program 99.9%

      \[\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. Step-by-step derivation
      1. add-sqr-sqrt99.9%

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}\right) \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(x \cdot 0.5 - y\right)\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
      6. add-sqr-sqrt71.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\color{blue}{\sqrt{z \cdot 2}}} \cdot \left(\sqrt{\sqrt{2} \cdot \sqrt{z}} \cdot \left(0.5 \cdot x - y\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
      12. pow1/299.7%

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

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

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

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

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

      \[\leadsto \left({\left(2 \cdot z\right)}^{0.25} \cdot \color{blue}{\left(-1 \cdot \left({\left(2 \cdot z\right)}^{0.25} \cdot y\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    8. Step-by-step derivation
      1. mul-1-neg18.5%

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

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

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

      \[\leadsto \left({\left(2 \cdot z\right)}^{0.25} \cdot \color{blue}{\left(y \cdot \left(-{\left(2 \cdot z\right)}^{0.25}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    10. Step-by-step derivation
      1. pow118.5%

        \[\leadsto \color{blue}{{\left({\left(2 \cdot z\right)}^{0.25} \cdot \left(y \cdot \left(-{\left(2 \cdot z\right)}^{0.25}\right)\right)\right)}^{1}} \cdot e^{\frac{t \cdot t}{2}} \]
    11. Applied egg-rr40.5%

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

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

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

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

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

Alternative 4: 12.9% accurate, 1.0× speedup?

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

\\
e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \sqrt{z \cdot 2}\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. Step-by-step derivation
    1. add-sqr-sqrt51.0%

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{\left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}\right) \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(x \cdot 0.5 - y\right)\right)}} \cdot e^{\frac{t \cdot t}{2}} \]
    6. add-sqr-sqrt36.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{\color{blue}{\sqrt{z \cdot 2}}} \cdot \left(\sqrt{\sqrt{2} \cdot \sqrt{z}} \cdot \left(0.5 \cdot x - y\right)\right)\right) \cdot e^{\frac{t \cdot t}{2}} \]
    12. pow1/299.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \left({\left(2 \cdot z\right)}^{0.25} \cdot \color{blue}{\left(y \cdot \left(-{\left(2 \cdot z\right)}^{0.25}\right)\right)}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  10. Step-by-step derivation
    1. pow162.1%

      \[\leadsto \color{blue}{{\left({\left(2 \cdot z\right)}^{0.25} \cdot \left(y \cdot \left(-{\left(2 \cdot z\right)}^{0.25}\right)\right)\right)}^{1}} \cdot e^{\frac{t \cdot t}{2}} \]
  11. Applied egg-rr12.1%

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

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

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

    \[\leadsto \color{blue}{\left(y \cdot \sqrt{z \cdot 2}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
  14. Final simplification12.1%

    \[\leadsto e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \sqrt{z \cdot 2}\right) \]
  15. 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 2024046 
(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))))