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

Percentage Accurate: 99.4% → 99.8%
Time: 11.0s
Alternatives: 11
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 11 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.7× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t} \cdot \left(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. 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-udef73.1%

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

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

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

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

    \[\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. associate-*r*99.8%

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

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

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

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

Alternative 3: 99.8% accurate, 1.0× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot e^{t \cdot t}}
\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-udef73.1%

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

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

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

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

    \[\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. associate-*r*99.8%

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

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

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

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

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

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

Alternative 4: 88.0% accurate, 1.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 2) < 4.99999999999999989e101

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \frac{x \cdot 0.5 - y}{e^{\frac{t}{\frac{2}{-t}}}}} \]
      9. *-rgt-identity99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999989e101 < (*.f64 z 2)

    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-u97.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-udef97.1%

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

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

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

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

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

        \[\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. associate-*r*99.8%

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

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

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

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

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

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

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

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

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

Alternative 5: 89.1% accurate, 1.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 2) < 1.99999999999999991e158

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \frac{x \cdot 0.5 - y}{e^{\frac{t}{\frac{2}{-t}}}}} \]
      9. *-rgt-identity99.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999991e158 < (*.f64 z 2)

    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-u97.0%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot 2} \cdot \sqrt{e^{t \cdot t}}\right)\right)} \]
      2. expm1-udef97.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. pow-exp97.0%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\mathsf{log1p}\left(\sqrt{\color{blue}{z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)}}\right)} - 1\right) \]
    5. Applied egg-rr97.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-def97.0%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)}\right)\right)} \]
      2. expm1-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. associate-*r*99.8%

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

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

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

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

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

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

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

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

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

Alternative 6: 85.0% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x 1/2) < -2e110

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e110 < (*.f64 x 1/2)

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \sqrt{e^{t \cdot t}}\right)} \]
    4. Step-by-step derivation
      1. expm1-log1p-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-udef72.8%

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

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

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

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

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

        \[\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. associate-*r*99.8%

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

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

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

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

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

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

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

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

Alternative 7: 86.6% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 2) < 1.99999999999999991e158

    1. Initial program 99.7%

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

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

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

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

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

    if 1.99999999999999991e158 < (*.f64 z 2)

    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-u97.0%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot 2} \cdot \sqrt{e^{t \cdot t}}\right)\right)} \]
      2. expm1-udef97.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. pow-exp97.0%

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

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

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(e^{\mathsf{log1p}\left(\sqrt{\color{blue}{z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)}}\right)} - 1\right) \]
    5. Applied egg-rr97.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-def97.0%

        \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)}\right)\right)} \]
      2. expm1-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. associate-*r*99.8%

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

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

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

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

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

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

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

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

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

Alternative 8: 77.2% accurate, 1.8× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(0.5 \cdot \left(\left(t \cdot t\right) \cdot \left(x \cdot 0.5\right)\right) - y\right)\\


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \frac{x \cdot 0.5 - y}{e^{\frac{t}{\frac{2}{-t}}}}} \]
      9. *-rgt-identity99.6%

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

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

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

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

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

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

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

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

    if 2 < (*.f64 t 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. sqr-neg100.0%

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

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

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

        \[\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/100.0%

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

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

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

        \[\leadsto \color{blue}{\sqrt{z \cdot 2} \cdot \frac{x \cdot 0.5 - y}{e^{\frac{t}{\frac{2}{-t}}}}} \]
      9. *-rgt-identity100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 80.3% accurate, 1.9× speedup?

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

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

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

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

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

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

    \[\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. associate-*r*99.8%

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

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

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

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

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

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

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

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

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

Alternative 10: 84.4% accurate, 1.9× speedup?

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

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

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

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

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

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

    \[\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. associate-*r*99.8%

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

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

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

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

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

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

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

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

Alternative 11: 56.6% accurate, 2.0× speedup?

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

\\
\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\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. *-commutative99.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\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 2023290 
(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))))