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

Percentage Accurate: 99.4% → 99.4%
Time: 11.7s
Alternatives: 8
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 8 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} \\ e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (* (exp (/ (* t t) 2.0)) (* (- (* x 0.5) y) (sqrt (* z 2.0)))))
double code(double x, double y, double z, double t) {
	return exp(((t * t) / 2.0)) * (((x * 0.5) - 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)) * (((x * 0.5d0) - 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)) * (((x * 0.5) - y) * Math.sqrt((z * 2.0)));
}
def code(x, y, z, t):
	return math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * math.sqrt((z * 2.0)))
function code(x, y, z, t)
	return Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))))
end
function tmp = code(x, y, z, t)
	tmp = exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((z * 2.0)));
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[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \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. Final simplification99.8%

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

Alternative 2: 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.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. sqr-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\frac{\color{blue}{t \cdot t}}{2}}\right) \]
    14. 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. Simplified99.8%

    \[\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-udef74.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-unprod74.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*74.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-prod74.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-rr74.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-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.8%

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

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

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

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

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

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

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

Alternative 3: 86.2% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\frac{\color{blue}{t \cdot t}}{2}}\right) \]
    14. 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. Simplified99.8%

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

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

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

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

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

Alternative 4: 84.2% accurate, 1.9× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z \cdot \left(t \cdot t + 1\right)\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. sqr-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\frac{\color{blue}{t \cdot t}}{2}}\right) \]
    14. 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. Simplified99.8%

    \[\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-udef74.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-unprod74.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*74.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-prod74.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-rr74.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-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.8%

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

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

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

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

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

    \[\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 85.0%

    \[\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. distribute-rgt1-in85.0%

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

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

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

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

Alternative 5: 59.5% accurate, 1.9× speedup?

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

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

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


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

    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. sqr-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\frac{\color{blue}{t \cdot t}}{2}}\right) \]
      14. 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. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 66.3%

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

    if 1.44999999999999996e79 < 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-*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. add-sqr-sqrt46.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{z \cdot \left(2 \cdot \left(\color{blue}{{t}^{2} \cdot {y}^{2}} + {y}^{2}\right)\right)} \]
      3. distribute-lft1-in23.6%

        \[\leadsto \sqrt{z \cdot \left(2 \cdot \color{blue}{\left(\left({t}^{2} + 1\right) \cdot {y}^{2}\right)}\right)} \]
      4. unpow223.6%

        \[\leadsto \sqrt{z \cdot \left(2 \cdot \left(\left(\color{blue}{t \cdot t} + 1\right) \cdot {y}^{2}\right)\right)} \]
      5. unpow223.6%

        \[\leadsto \sqrt{z \cdot \left(2 \cdot \left(\left(t \cdot t + 1\right) \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)} \]
    11. Simplified23.6%

      \[\leadsto \sqrt{z \cdot \color{blue}{\left(2 \cdot \left(\left(t \cdot t + 1\right) \cdot \left(y \cdot y\right)\right)\right)}} \]
    12. Taylor expanded in t around inf 28.1%

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

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

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \left({y}^{2} \cdot z\right)\right)}} \]
      4. unpow221.3%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \left({y}^{2} \cdot z\right)\right)} \]
      5. unpow221.3%

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

        \[\leadsto \sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(y \cdot \left(y \cdot z\right)\right)}\right)} \]
    14. Simplified25.9%

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

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

Alternative 6: 59.8% accurate, 1.9× speedup?

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

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

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


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

    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. sqr-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\frac{\color{blue}{t \cdot t}}{2}}\right) \]
      14. 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. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 66.3%

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

    if 1.36000000000000003e79 < 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-*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. add-sqr-sqrt46.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{z \cdot \left(2 \cdot \left(\color{blue}{{t}^{2} \cdot {y}^{2}} + {y}^{2}\right)\right)} \]
      3. distribute-lft1-in23.6%

        \[\leadsto \sqrt{z \cdot \left(2 \cdot \color{blue}{\left(\left({t}^{2} + 1\right) \cdot {y}^{2}\right)}\right)} \]
      4. unpow223.6%

        \[\leadsto \sqrt{z \cdot \left(2 \cdot \left(\left(\color{blue}{t \cdot t} + 1\right) \cdot {y}^{2}\right)\right)} \]
      5. unpow223.6%

        \[\leadsto \sqrt{z \cdot \left(2 \cdot \left(\left(t \cdot t + 1\right) \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)} \]
    11. Simplified23.6%

      \[\leadsto \sqrt{z \cdot \color{blue}{\left(2 \cdot \left(\left(t \cdot t + 1\right) \cdot \left(y \cdot y\right)\right)\right)}} \]
    12. Taylor expanded in t around inf 28.1%

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(z \cdot {t}^{2}\right)}} \]
      4. unpow228.1%

        \[\leadsto \sqrt{\left(2 \cdot \left(y \cdot y\right)\right) \cdot \left(z \cdot \color{blue}{\left(t \cdot t\right)}\right)} \]
    14. Simplified28.1%

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

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

Alternative 7: 56.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.65 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(y \cdot y\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.65000000000000012e154

    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. 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. add-sqr-sqrt94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.65000000000000012e154 < 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. sqr-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\frac{\color{blue}{t \cdot t}}{2}}\right) \]
      14. 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. Simplified99.8%

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

        \[\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-udef73.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-unprod73.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*73.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-prod73.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-rr73.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-def98.3%

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

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

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

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

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

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

      \[\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 58.9%

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

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

Alternative 8: 16.8% accurate, 2.0× speedup?

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

\\
\sqrt{2 \cdot \left(z \cdot \left(y \cdot y\right)\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-*r*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. add-sqr-sqrt49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{z \cdot \left(\left(2 \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot e^{t \cdot t}\right)} \]
  8. Simplified25.0%

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

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left({y}^{2} \cdot z\right)}} \]
  10. Step-by-step derivation
    1. *-commutative14.3%

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

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

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

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

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 2023274 
(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))))