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

Percentage Accurate: 99.4% → 99.8%
Time: 13.0s
Alternatives: 10
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.7× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot \left(2 \cdot {\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. associate-*l*99.8%

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

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

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

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

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

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

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

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

      \[\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)}} \]
  7. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\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: 86.2% 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^{+134}:\\ \;\;\;\;\left(t_1 \cdot \sqrt{z \cdot 2}\right) \cdot \left(1 + 0.5 \cdot \left(t \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \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
 (let* ((t_1 (- (* x 0.5) y)))
   (if (<= (* z 2.0) 2e+134)
     (* (* t_1 (sqrt (* z 2.0))) (+ 1.0 (* 0.5 (* t t))))
     (* t_1 (sqrt (* (* z 2.0) (+ (* t t) 1.0)))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * 0.5) - y;
	double tmp;
	if ((z * 2.0) <= 2e+134) {
		tmp = (t_1 * sqrt((z * 2.0))) * (1.0 + (0.5 * (t * t)));
	} else {
		tmp = t_1 * 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) :: t_1
    real(8) :: tmp
    t_1 = (x * 0.5d0) - y
    if ((z * 2.0d0) <= 2d+134) then
        tmp = (t_1 * sqrt((z * 2.0d0))) * (1.0d0 + (0.5d0 * (t * t)))
    else
        tmp = t_1 * 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 t_1 = (x * 0.5) - y;
	double tmp;
	if ((z * 2.0) <= 2e+134) {
		tmp = (t_1 * Math.sqrt((z * 2.0))) * (1.0 + (0.5 * (t * t)));
	} else {
		tmp = t_1 * Math.sqrt(((z * 2.0) * ((t * t) + 1.0)));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * 0.5) - y
	tmp = 0
	if (z * 2.0) <= 2e+134:
		tmp = (t_1 * math.sqrt((z * 2.0))) * (1.0 + (0.5 * (t * t)))
	else:
		tmp = t_1 * math.sqrt(((z * 2.0) * ((t * t) + 1.0)))
	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+134)
		tmp = Float64(Float64(t_1 * sqrt(Float64(z * 2.0))) * Float64(1.0 + Float64(0.5 * Float64(t * t))));
	else
		tmp = Float64(t_1 * sqrt(Float64(Float64(z * 2.0) * Float64(Float64(t * t) + 1.0))));
	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+134)
		tmp = (t_1 * sqrt((z * 2.0))) * (1.0 + (0.5 * (t * t)));
	else
		tmp = t_1 * sqrt(((z * 2.0) * ((t * t) + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(z * 2.0), $MachinePrecision], 2e+134], N[(N[(t$95$1 * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * 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}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;z \cdot 2 \leq 2 \cdot 10^{+134}:\\
\;\;\;\;\left(t_1 \cdot \sqrt{z \cdot 2}\right) \cdot \left(1 + 0.5 \cdot \left(t \cdot t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_1 \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 z 2) < 1.99999999999999984e134

    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 84.0%

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

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

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

    if 1.99999999999999984e134 < (*.f64 z 2)

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot 2 \leq 2 \cdot 10^{+134}:\\ \;\;\;\;\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \left(1 + 0.5 \cdot \left(t \cdot t\right)\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 5: 83.9% 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. associate-*l*99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 37.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 3.6 \cdot 10^{-38} \lor \neg \left(x \leq 1.85 \cdot 10^{-22}\right) \land x \leq 1.25 \cdot 10^{+14}:\\ \;\;\;\;\sqrt{z + z} \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(0.5 \cdot z\right) \cdot \left(x \cdot x\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x 3.6e-38) (and (not (<= x 1.85e-22)) (<= x 1.25e+14)))
   (* (sqrt (+ z z)) (- y))
   (sqrt (* (* 0.5 z) (* x x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= 3.6e-38) || (!(x <= 1.85e-22) && (x <= 1.25e+14))) {
		tmp = sqrt((z + z)) * -y;
	} else {
		tmp = sqrt(((0.5 * z) * (x * x)));
	}
	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 <= 3.6d-38) .or. (.not. (x <= 1.85d-22)) .and. (x <= 1.25d+14)) then
        tmp = sqrt((z + z)) * -y
    else
        tmp = sqrt(((0.5d0 * z) * (x * x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= 3.6e-38) || (!(x <= 1.85e-22) && (x <= 1.25e+14))) {
		tmp = Math.sqrt((z + z)) * -y;
	} else {
		tmp = Math.sqrt(((0.5 * z) * (x * x)));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= 3.6e-38) or (not (x <= 1.85e-22) and (x <= 1.25e+14)):
		tmp = math.sqrt((z + z)) * -y
	else:
		tmp = math.sqrt(((0.5 * z) * (x * x)))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= 3.6e-38) || (!(x <= 1.85e-22) && (x <= 1.25e+14)))
		tmp = Float64(sqrt(Float64(z + z)) * Float64(-y));
	else
		tmp = sqrt(Float64(Float64(0.5 * z) * Float64(x * x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= 3.6e-38) || (~((x <= 1.85e-22)) && (x <= 1.25e+14)))
		tmp = sqrt((z + z)) * -y;
	else
		tmp = sqrt(((0.5 * z) * (x * x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, 3.6e-38], And[N[Not[LessEqual[x, 1.85e-22]], $MachinePrecision], LessEqual[x, 1.25e+14]]], N[(N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision], N[Sqrt[N[(N[(0.5 * z), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.6 \cdot 10^{-38} \lor \neg \left(x \leq 1.85 \cdot 10^{-22}\right) \land x \leq 1.25 \cdot 10^{+14}:\\
\;\;\;\;\sqrt{z + z} \cdot \left(-y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.6000000000000001e-38 or 1.85e-22 < x < 1.25e14

    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 52.9%

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

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

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

        \[\leadsto \left(-\color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot y\right)}\right) \cdot 1 \]
      3. distribute-rgt-neg-in35.4%

        \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \left(-\sqrt{2} \cdot y\right)\right)} \cdot 1 \]
      4. distribute-rgt-neg-in35.4%

        \[\leadsto \left(\sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)}\right) \cdot 1 \]
    5. Simplified35.4%

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

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

        \[\leadsto \left(\color{blue}{\sqrt{z \cdot 2}} \cdot \left(-y\right)\right) \cdot 1 \]
      3. distribute-rgt-neg-out35.4%

        \[\leadsto \color{blue}{\left(-\sqrt{z \cdot 2} \cdot y\right)} \cdot 1 \]
    7. Applied egg-rr35.4%

      \[\leadsto \color{blue}{\left(-\sqrt{z \cdot 2} \cdot y\right)} \cdot 1 \]
    8. Step-by-step derivation
      1. distribute-rgt-neg-in35.4%

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

        \[\leadsto \left(\sqrt{\color{blue}{2 \cdot z}} \cdot \left(-y\right)\right) \cdot 1 \]
      3. rem-log-exp28.8%

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

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

        \[\leadsto \left(\sqrt{\log \color{blue}{\left(e^{z} \cdot e^{z}\right)}} \cdot \left(-y\right)\right) \cdot 1 \]
      6. prod-exp28.8%

        \[\leadsto \left(\sqrt{\log \color{blue}{\left(e^{z + z}\right)}} \cdot \left(-y\right)\right) \cdot 1 \]
      7. rem-log-exp35.4%

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

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

    if 3.6000000000000001e-38 < x < 1.85e-22 or 1.25e14 < x

    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. Taylor expanded in t around 0 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.6 \cdot 10^{-38} \lor \neg \left(x \leq 1.85 \cdot 10^{-22}\right) \land x \leq 1.25 \cdot 10^{+14}:\\ \;\;\;\;\sqrt{z + z} \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(0.5 \cdot z\right) \cdot \left(x \cdot x\right)}\\ \end{array} \]

Alternative 7: 56.8% accurate, 1.9× speedup?

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

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

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


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

    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 69.5%

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot y\right)}\right) \cdot 1 \]
      3. distribute-rgt-neg-in7.6%

        \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \left(-\sqrt{2} \cdot y\right)\right)} \cdot 1 \]
      4. distribute-rgt-neg-in7.6%

        \[\leadsto \left(\sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)}\right) \cdot 1 \]
    5. Simplified7.6%

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

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

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

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

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

        \[\leadsto \sqrt{\left(\sqrt{z \cdot 2} \cdot \left(-y\right)\right) \cdot \color{blue}{\left(\left(\sqrt{z} \cdot \sqrt{2}\right) \cdot \left(-y\right)\right)}} \cdot 1 \]
      6. sqrt-prod18.8%

        \[\leadsto \sqrt{\left(\sqrt{z \cdot 2} \cdot \left(-y\right)\right) \cdot \left(\color{blue}{\sqrt{z \cdot 2}} \cdot \left(-y\right)\right)} \cdot 1 \]
      7. swap-sqr20.3%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{z \cdot 2} \cdot \sqrt{z \cdot 2}\right) \cdot \left(\left(-y\right) \cdot \left(-y\right)\right)}} \cdot 1 \]
      8. add-sqr-sqrt20.3%

        \[\leadsto \sqrt{\color{blue}{\left(z \cdot 2\right)} \cdot \left(\left(-y\right) \cdot \left(-y\right)\right)} \cdot 1 \]
      9. sqr-neg20.3%

        \[\leadsto \sqrt{\left(z \cdot 2\right) \cdot \color{blue}{\left(y \cdot y\right)}} \cdot 1 \]
    7. Applied egg-rr20.3%

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

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

Alternative 8: 30.9% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 950000:\\
\;\;\;\;\sqrt{z + z} \cdot \left(-y\right)\\

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


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

    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 69.5%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(\left(\sqrt{2} \cdot y\right) \cdot \sqrt{z}\right)\right)} \cdot 1 \]
    4. Step-by-step derivation
      1. mul-1-neg37.5%

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

        \[\leadsto \left(-\color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot y\right)}\right) \cdot 1 \]
      3. distribute-rgt-neg-in37.5%

        \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \left(-\sqrt{2} \cdot y\right)\right)} \cdot 1 \]
      4. distribute-rgt-neg-in37.5%

        \[\leadsto \left(\sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)}\right) \cdot 1 \]
    5. Simplified37.5%

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

        \[\leadsto \color{blue}{\left(\left(\sqrt{z} \cdot \sqrt{2}\right) \cdot \left(-y\right)\right)} \cdot 1 \]
      2. sqrt-prod37.6%

        \[\leadsto \left(\color{blue}{\sqrt{z \cdot 2}} \cdot \left(-y\right)\right) \cdot 1 \]
      3. distribute-rgt-neg-out37.6%

        \[\leadsto \color{blue}{\left(-\sqrt{z \cdot 2} \cdot y\right)} \cdot 1 \]
    7. Applied egg-rr37.6%

      \[\leadsto \color{blue}{\left(-\sqrt{z \cdot 2} \cdot y\right)} \cdot 1 \]
    8. Step-by-step derivation
      1. distribute-rgt-neg-in37.6%

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

        \[\leadsto \left(\sqrt{\color{blue}{2 \cdot z}} \cdot \left(-y\right)\right) \cdot 1 \]
      3. rem-log-exp25.0%

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

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

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

        \[\leadsto \left(\sqrt{\log \color{blue}{\left(e^{z + z}\right)}} \cdot \left(-y\right)\right) \cdot 1 \]
      7. rem-log-exp37.6%

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

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

    if 9.5e5 < 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. Taylor expanded in t around 0 17.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(y \cdot y\right) \cdot \left(z \cdot 2\right)}} \cdot 1 \]
      4. associate-*l*18.8%

        \[\leadsto \sqrt{\color{blue}{y \cdot \left(y \cdot \left(z \cdot 2\right)\right)}} \cdot 1 \]
      5. *-commutative18.8%

        \[\leadsto \sqrt{y \cdot \color{blue}{\left(\left(z \cdot 2\right) \cdot y\right)}} \cdot 1 \]
      6. *-commutative18.8%

        \[\leadsto \sqrt{y \cdot \left(\color{blue}{\left(2 \cdot z\right)} \cdot y\right)} \cdot 1 \]
      7. associate-*l*18.8%

        \[\leadsto \sqrt{y \cdot \color{blue}{\left(2 \cdot \left(z \cdot y\right)\right)}} \cdot 1 \]
      8. *-commutative18.8%

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

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

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

Alternative 9: 29.7% accurate, 2.0× speedup?

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

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

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

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

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

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

      \[\leadsto \left(-\color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot y\right)}\right) \cdot 1 \]
    3. distribute-rgt-neg-in30.1%

      \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \left(-\sqrt{2} \cdot y\right)\right)} \cdot 1 \]
    4. distribute-rgt-neg-in30.1%

      \[\leadsto \left(\sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)}\right) \cdot 1 \]
  5. Simplified30.1%

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

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

      \[\leadsto \left(\color{blue}{\sqrt{z \cdot 2}} \cdot \left(-y\right)\right) \cdot 1 \]
    3. distribute-rgt-neg-out30.2%

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

    \[\leadsto \color{blue}{\left(-\sqrt{z \cdot 2} \cdot y\right)} \cdot 1 \]
  8. Step-by-step derivation
    1. distribute-rgt-neg-in30.2%

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

      \[\leadsto \left(\sqrt{\color{blue}{2 \cdot z}} \cdot \left(-y\right)\right) \cdot 1 \]
    3. rem-log-exp27.7%

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

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

      \[\leadsto \left(\sqrt{\log \color{blue}{\left(e^{z} \cdot e^{z}\right)}} \cdot \left(-y\right)\right) \cdot 1 \]
    6. prod-exp27.7%

      \[\leadsto \left(\sqrt{\log \color{blue}{\left(e^{z + z}\right)}} \cdot \left(-y\right)\right) \cdot 1 \]
    7. rem-log-exp30.2%

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

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

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

Alternative 10: 2.4% accurate, 2.0× speedup?

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

\\
y \cdot \sqrt{z + z}
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

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

      \[\leadsto \left(-\color{blue}{\sqrt{z} \cdot \left(\sqrt{2} \cdot y\right)}\right) \cdot 1 \]
    3. distribute-rgt-neg-in30.1%

      \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \left(-\sqrt{2} \cdot y\right)\right)} \cdot 1 \]
    4. distribute-rgt-neg-in30.1%

      \[\leadsto \left(\sqrt{z} \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-y\right)\right)}\right) \cdot 1 \]
  5. Simplified30.1%

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

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

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

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

      \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\sqrt{z \cdot 2}} \cdot \left(-y\right)\right)} - 1\right) \cdot 1 \]
    5. add-sqr-sqrt11.0%

      \[\leadsto \left(e^{\mathsf{log1p}\left(\sqrt{z \cdot 2} \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)}\right)} - 1\right) \cdot 1 \]
    6. sqrt-unprod14.9%

      \[\leadsto \left(e^{\mathsf{log1p}\left(\sqrt{z \cdot 2} \cdot \color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}\right)} - 1\right) \cdot 1 \]
    7. sqr-neg14.9%

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

      \[\leadsto \left(e^{\mathsf{log1p}\left(\sqrt{z \cdot 2} \cdot \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)}\right)} - 1\right) \cdot 1 \]
    9. add-sqr-sqrt2.9%

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

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

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

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

      \[\leadsto \color{blue}{\left(y \cdot \sqrt{z \cdot 2}\right)} \cdot 1 \]
    4. *-commutative2.9%

      \[\leadsto \left(y \cdot \sqrt{\color{blue}{2 \cdot z}}\right) \cdot 1 \]
    5. rem-log-exp9.0%

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

      \[\leadsto \left(y \cdot \sqrt{\color{blue}{\log \left({\left(e^{z}\right)}^{2}\right)}}\right) \cdot 1 \]
    7. unpow29.0%

      \[\leadsto \left(y \cdot \sqrt{\log \color{blue}{\left(e^{z} \cdot e^{z}\right)}}\right) \cdot 1 \]
    8. prod-exp9.0%

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

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

    \[\leadsto \color{blue}{\left(y \cdot \sqrt{z + z}\right)} \cdot 1 \]
  10. Final simplification2.9%

    \[\leadsto y \cdot \sqrt{z + z} \]

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