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

Percentage Accurate: 99.4% → 99.8%
Time: 17.4s
Alternatives: 12
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 12 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.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. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \frac{1}{2} - y\right), \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)}\right) \]
    3. --lowering--.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(x \cdot \frac{1}{2}\right), y\right), \left(\color{blue}{\sqrt{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{\color{blue}{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right)\right) \]
    5. exp-sqrtN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{z \cdot 2} \cdot \sqrt{e^{t \cdot t}}\right)\right) \]
    6. sqrt-unprodN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{\left(z \cdot 2\right) \cdot e^{t \cdot t}}\right)\right) \]
    7. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\left(\left(z \cdot 2\right) \cdot e^{t \cdot t}\right)\right)\right) \]
    8. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\left(z \cdot \left(2 \cdot e^{t \cdot t}\right)\right)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \left(2 \cdot e^{t \cdot t}\right)\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \left(e^{t \cdot t}\right)\right)\right)\right)\right) \]
    11. exp-lowering-exp.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{exp.f64}\left(\left(t \cdot t\right)\right)\right)\right)\right)\right) \]
    12. *-lowering-*.f6499.8%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(t, t\right)\right)\right)\right)\right)\right) \]
  4. Applied egg-rr99.8%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \left({\left(e^{t}\right)}^{t}\right)\right)\right)\right)\right) \]
    2. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{pow.f64}\left(\left(e^{t}\right), t\right)\right)\right)\right)\right) \]
    3. exp-lowering-exp.f6499.8%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{pow.f64}\left(\mathsf{exp.f64}\left(t\right), t\right)\right)\right)\right)\right) \]
  6. Applied egg-rr99.8%

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

Alternative 2: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot \left(2 \cdot e^{t \cdot t}\right)} \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(z * Float64(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[(z * N[(2.0 * N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \frac{1}{2} - y\right), \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)}\right) \]
    3. --lowering--.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(x \cdot \frac{1}{2}\right), y\right), \left(\color{blue}{\sqrt{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{\color{blue}{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right)\right) \]
    5. exp-sqrtN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{z \cdot 2} \cdot \sqrt{e^{t \cdot t}}\right)\right) \]
    6. sqrt-unprodN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{\left(z \cdot 2\right) \cdot e^{t \cdot t}}\right)\right) \]
    7. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\left(\left(z \cdot 2\right) \cdot e^{t \cdot t}\right)\right)\right) \]
    8. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\left(z \cdot \left(2 \cdot e^{t \cdot t}\right)\right)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \left(2 \cdot e^{t \cdot t}\right)\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \left(e^{t \cdot t}\right)\right)\right)\right)\right) \]
    11. exp-lowering-exp.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{exp.f64}\left(\left(t \cdot t\right)\right)\right)\right)\right)\right) \]
    12. *-lowering-*.f6499.8%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(t, t\right)\right)\right)\right)\right)\right) \]
  4. Applied egg-rr99.8%

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

Alternative 3: 95.6% accurate, 1.7× speedup?

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

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

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

    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \color{blue}{\left(1 + {t}^{2} \cdot \left(\frac{1}{2} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)}\right) \]
  4. Step-by-step derivation
    1. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left({t}^{2} \cdot \left(\frac{1}{2} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)}\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({t}^{2}\right), \color{blue}{\left(\frac{1}{2} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)}\right)\right)\right) \]
    3. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(t \cdot t\right), \left(\color{blue}{\frac{1}{2}} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{\frac{1}{2}} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \color{blue}{\left({t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)}\right)\right)\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left({t}^{2}\right), \color{blue}{\left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)}\right)\right)\right)\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(t \cdot t\right), \left(\color{blue}{\frac{1}{8}} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{\frac{1}{8}} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right)\right) \]
    9. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \color{blue}{\left(\frac{1}{48} \cdot {t}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
    10. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \left(\frac{1}{48} \cdot \left(t \cdot \color{blue}{t}\right)\right)\right)\right)\right)\right)\right)\right) \]
    11. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \left(\left(\frac{1}{48} \cdot t\right) \cdot \color{blue}{t}\right)\right)\right)\right)\right)\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \left(t \cdot \color{blue}{\left(\frac{1}{48} \cdot t\right)}\right)\right)\right)\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \color{blue}{\left(\frac{1}{48} \cdot t\right)}\right)\right)\right)\right)\right)\right)\right) \]
    14. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \left(t \cdot \color{blue}{\frac{1}{48}}\right)\right)\right)\right)\right)\right)\right)\right) \]
    15. *-lowering-*.f6496.6%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \color{blue}{\frac{1}{48}}\right)\right)\right)\right)\right)\right)\right)\right) \]
  5. Simplified96.6%

    \[\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 \left(0.5 + \left(t \cdot t\right) \cdot \left(0.125 + t \cdot \left(t \cdot 0.020833333333333332\right)\right)\right)\right)} \]
  6. Step-by-step derivation
    1. flip--N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) - y \cdot y}{x \cdot \frac{1}{2} + y}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    2. difference-of-squaresN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{x \cdot \frac{1}{2} + y}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    3. flip3-+N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\frac{{\left(x \cdot \frac{1}{2}\right)}^{3} + {y}^{3}}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    4. div-invN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left({\left(x \cdot \frac{1}{2}\right)}^{3} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    5. unpow-prod-downN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left({x}^{3} \cdot {\frac{1}{2}}^{3} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    6. cube-unmultN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot {\frac{1}{2}}^{3} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    7. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    8. cube-unmultN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + y \cdot \left(y \cdot y\right)\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    9. times-fracN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{x \cdot \frac{1}{2} + y}{\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + y \cdot \left(y \cdot y\right)} \cdot \frac{x \cdot \frac{1}{2} - y}{\frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{x \cdot \frac{1}{2} + y}{\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + y \cdot \left(y \cdot y\right)}\right), \left(\frac{x \cdot \frac{1}{2} - y}{\frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
  7. Applied egg-rr27.4%

    \[\leadsto \left(\color{blue}{\left(\frac{x \cdot 0.5 + y}{x \cdot \left(0.125 \cdot \left(x \cdot x\right)\right) + y \cdot \left(y \cdot y\right)} \cdot \frac{x \cdot 0.5 - y}{\frac{1}{x \cdot \left(x \cdot 0.25\right) + y \cdot \left(y - x \cdot 0.5\right)}}\right)} \cdot \sqrt{z \cdot 2}\right) \cdot \left(1 + \left(t \cdot t\right) \cdot \left(0.5 + \left(t \cdot t\right) \cdot \left(0.125 + t \cdot \left(t \cdot 0.020833333333333332\right)\right)\right)\right) \]
  8. Applied egg-rr97.0%

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

    \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \left(1 + t \cdot \left(t \cdot \left(0.5 + \left(t \cdot t\right) \cdot \left(0.125 + t \cdot \left(t \cdot 0.020833333333333332\right)\right)\right)\right)\right)\right) \cdot \sqrt{z \cdot 2} \]
  10. Add Preprocessing

Alternative 4: 92.6% accurate, 1.7× speedup?

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

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

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

    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \color{blue}{\left(1 + {t}^{2} \cdot \left(\frac{1}{2} + \frac{1}{8} \cdot {t}^{2}\right)\right)}\right) \]
  4. Step-by-step derivation
    1. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left({t}^{2} \cdot \left(\frac{1}{2} + \frac{1}{8} \cdot {t}^{2}\right)\right)}\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({t}^{2}\right), \color{blue}{\left(\frac{1}{2} + \frac{1}{8} \cdot {t}^{2}\right)}\right)\right)\right) \]
    3. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(t \cdot t\right), \left(\color{blue}{\frac{1}{2}} + \frac{1}{8} \cdot {t}^{2}\right)\right)\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{\frac{1}{2}} + \frac{1}{8} \cdot {t}^{2}\right)\right)\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \color{blue}{\left(\frac{1}{8} \cdot {t}^{2}\right)}\right)\right)\right)\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \left({t}^{2} \cdot \color{blue}{\frac{1}{8}}\right)\right)\right)\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \left(\left(t \cdot t\right) \cdot \frac{1}{8}\right)\right)\right)\right)\right) \]
    8. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \left(t \cdot \color{blue}{\left(t \cdot \frac{1}{8}\right)}\right)\right)\right)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(t, \color{blue}{\left(t \cdot \frac{1}{8}\right)}\right)\right)\right)\right)\right) \]
    10. *-lowering-*.f6494.4%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \color{blue}{\frac{1}{8}}\right)\right)\right)\right)\right)\right) \]
  5. Simplified94.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 \left(0.5 + t \cdot \left(t \cdot 0.125\right)\right)\right)} \]
  6. Add Preprocessing

Alternative 5: 90.5% accurate, 1.8× speedup?

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

\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2 + \left(t \cdot t\right) \cdot \left(z \cdot \left(2 + t \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. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \frac{1}{2} - y\right), \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)}\right) \]
    3. --lowering--.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(x \cdot \frac{1}{2}\right), y\right), \left(\color{blue}{\sqrt{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{\color{blue}{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right)\right) \]
    5. exp-sqrtN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{z \cdot 2} \cdot \sqrt{e^{t \cdot t}}\right)\right) \]
    6. sqrt-unprodN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{\left(z \cdot 2\right) \cdot e^{t \cdot t}}\right)\right) \]
    7. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\left(\left(z \cdot 2\right) \cdot e^{t \cdot t}\right)\right)\right) \]
    8. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\left(z \cdot \left(2 \cdot e^{t \cdot t}\right)\right)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \left(2 \cdot e^{t \cdot t}\right)\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \left(e^{t \cdot t}\right)\right)\right)\right)\right) \]
    11. exp-lowering-exp.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{exp.f64}\left(\left(t \cdot t\right)\right)\right)\right)\right)\right) \]
    12. *-lowering-*.f6499.8%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(t, t\right)\right)\right)\right)\right)\right) \]
  4. Applied egg-rr99.8%

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

    \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(2 \cdot z + {t}^{2} \cdot \left(2 \cdot z + {t}^{2} \cdot z\right)\right)}\right)\right) \]
  6. Step-by-step derivation
    1. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(2 \cdot z\right), \left({t}^{2} \cdot \left(2 \cdot z + {t}^{2} \cdot z\right)\right)\right)\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, z\right), \left({t}^{2} \cdot \left(2 \cdot z + {t}^{2} \cdot z\right)\right)\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, z\right), \mathsf{*.f64}\left(\left({t}^{2}\right), \left(2 \cdot z + {t}^{2} \cdot z\right)\right)\right)\right)\right) \]
    4. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, z\right), \mathsf{*.f64}\left(\left(t \cdot t\right), \left(2 \cdot z + {t}^{2} \cdot z\right)\right)\right)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, z\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(2 \cdot z + {t}^{2} \cdot z\right)\right)\right)\right)\right) \]
    6. distribute-rgt-outN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, z\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(z \cdot \left(2 + {t}^{2}\right)\right)\right)\right)\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, z\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(z, \left(2 + {t}^{2}\right)\right)\right)\right)\right)\right) \]
    8. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, z\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(2, \left({t}^{2}\right)\right)\right)\right)\right)\right)\right) \]
    9. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, z\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(2, \left(t \cdot t\right)\right)\right)\right)\right)\right)\right) \]
    10. *-lowering-*.f6491.4%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, z\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right)\right)\right)\right)\right)\right) \]
  7. Simplified91.4%

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

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

Alternative 6: 88.1% accurate, 1.8× speedup?

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

\\
\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)
\end{array}
Derivation
  1. Initial program 99.8%

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

    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \color{blue}{\left(1 + {t}^{2} \cdot \left(\frac{1}{2} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)}\right) \]
  4. Step-by-step derivation
    1. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left({t}^{2} \cdot \left(\frac{1}{2} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)}\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({t}^{2}\right), \color{blue}{\left(\frac{1}{2} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)}\right)\right)\right) \]
    3. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(t \cdot t\right), \left(\color{blue}{\frac{1}{2}} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{\frac{1}{2}} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \color{blue}{\left({t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)}\right)\right)\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left({t}^{2}\right), \color{blue}{\left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)}\right)\right)\right)\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(t \cdot t\right), \left(\color{blue}{\frac{1}{8}} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{\frac{1}{8}} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right)\right) \]
    9. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \color{blue}{\left(\frac{1}{48} \cdot {t}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
    10. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \left(\frac{1}{48} \cdot \left(t \cdot \color{blue}{t}\right)\right)\right)\right)\right)\right)\right)\right) \]
    11. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \left(\left(\frac{1}{48} \cdot t\right) \cdot \color{blue}{t}\right)\right)\right)\right)\right)\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \left(t \cdot \color{blue}{\left(\frac{1}{48} \cdot t\right)}\right)\right)\right)\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \color{blue}{\left(\frac{1}{48} \cdot t\right)}\right)\right)\right)\right)\right)\right)\right) \]
    14. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \left(t \cdot \color{blue}{\frac{1}{48}}\right)\right)\right)\right)\right)\right)\right)\right) \]
    15. *-lowering-*.f6496.6%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \color{blue}{\frac{1}{48}}\right)\right)\right)\right)\right)\right)\right)\right) \]
  5. Simplified96.6%

    \[\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 \left(0.5 + \left(t \cdot t\right) \cdot \left(0.125 + t \cdot \left(t \cdot 0.020833333333333332\right)\right)\right)\right)} \]
  6. Step-by-step derivation
    1. flip--N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) - y \cdot y}{x \cdot \frac{1}{2} + y}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    2. difference-of-squaresN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{x \cdot \frac{1}{2} + y}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    3. flip3-+N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\frac{{\left(x \cdot \frac{1}{2}\right)}^{3} + {y}^{3}}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    4. div-invN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left({\left(x \cdot \frac{1}{2}\right)}^{3} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    5. unpow-prod-downN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left({x}^{3} \cdot {\frac{1}{2}}^{3} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    6. cube-unmultN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot {\frac{1}{2}}^{3} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    7. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    8. cube-unmultN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + y \cdot \left(y \cdot y\right)\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    9. times-fracN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{x \cdot \frac{1}{2} + y}{\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + y \cdot \left(y \cdot y\right)} \cdot \frac{x \cdot \frac{1}{2} - y}{\frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{x \cdot \frac{1}{2} + y}{\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + y \cdot \left(y \cdot y\right)}\right), \left(\frac{x \cdot \frac{1}{2} - y}{\frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
  7. Applied egg-rr27.4%

    \[\leadsto \left(\color{blue}{\left(\frac{x \cdot 0.5 + y}{x \cdot \left(0.125 \cdot \left(x \cdot x\right)\right) + y \cdot \left(y \cdot y\right)} \cdot \frac{x \cdot 0.5 - y}{\frac{1}{x \cdot \left(x \cdot 0.25\right) + y \cdot \left(y - x \cdot 0.5\right)}}\right)} \cdot \sqrt{z \cdot 2}\right) \cdot \left(1 + \left(t \cdot t\right) \cdot \left(0.5 + \left(t \cdot t\right) \cdot \left(0.125 + t \cdot \left(t \cdot 0.020833333333333332\right)\right)\right)\right) \]
  8. Applied egg-rr97.0%

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

    \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\left(\frac{1}{2} \cdot x + \frac{1}{2} \cdot \left({t}^{2} \cdot \left(\frac{1}{2} \cdot x - y\right)\right)\right) - y\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
  10. Step-by-step derivation
    1. --lowering--.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot x + \frac{1}{2} \cdot \left({t}^{2} \cdot \left(\frac{1}{2} \cdot x - y\right)\right)\right), y\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{*.f64}\left(z, 2\right)}\right)\right) \]
    2. distribute-lft-outN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left(x + {t}^{2} \cdot \left(\frac{1}{2} \cdot x - y\right)\right)\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\color{blue}{z}, 2\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(x + {t}^{2} \cdot \left(\frac{1}{2} \cdot x - y\right)\right)\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\color{blue}{z}, 2\right)\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(x, \left({t}^{2} \cdot \left(\frac{1}{2} \cdot x - y\right)\right)\right)\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(x, \left(\left(\frac{1}{2} \cdot x - y\right) \cdot {t}^{2}\right)\right)\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot x - y\right), \left({t}^{2}\right)\right)\right)\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
    7. --lowering--.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot x\right), y\right), \left({t}^{2}\right)\right)\right)\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, x\right), y\right), \left({t}^{2}\right)\right)\right)\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
    9. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, x\right), y\right), \left(t \cdot t\right)\right)\right)\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
    10. *-lowering-*.f6489.5%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, x\right), y\right), \mathsf{*.f64}\left(t, t\right)\right)\right)\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
  11. Simplified89.5%

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

    \[\leadsto \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) \]
  13. Add Preprocessing

Alternative 7: 43.7% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
t_2 := t\_1 \cdot \left(0 - y\right)\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{-65}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 17500000000:\\
\;\;\;\;x \cdot \left(0.5 \cdot t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.2000000000000001e-65 or 1.75e10 < y

    1. Initial program 99.8%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \color{blue}{1}\right) \]
    4. Step-by-step derivation
      1. Simplified63.5%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(-1 \cdot y\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
      3. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(y\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
        2. neg-sub0N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(0 - y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
        3. --lowering--.f6453.8%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
      4. Simplified53.8%

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

      if -1.2000000000000001e-65 < y < 1.75e10

      1. Initial program 99.8%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \color{blue}{1}\right) \]
      4. Step-by-step derivation
        1. Simplified50.0%

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot x\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
        3. Step-by-step derivation
          1. *-lowering-*.f6441.8%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, x\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
        4. Simplified41.8%

          \[\leadsto \left(\color{blue}{\left(0.5 \cdot x\right)} \cdot \sqrt{z \cdot 2}\right) \cdot 1 \]
        5. Step-by-step derivation
          1. *-rgt-identityN/A

            \[\leadsto \left(\frac{1}{2} \cdot x\right) \cdot \color{blue}{\sqrt{z \cdot 2}} \]
          2. *-commutativeN/A

            \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(\frac{1}{2} \cdot x\right)} \]
          3. associate-*r*N/A

            \[\leadsto \left(\sqrt{z \cdot 2} \cdot \frac{1}{2}\right) \cdot \color{blue}{x} \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{z \cdot 2} \cdot \frac{1}{2}\right), \color{blue}{x}\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{z \cdot 2}\right), \frac{1}{2}\right), x\right) \]
          6. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(z \cdot 2\right)\right), \frac{1}{2}\right), x\right) \]
          7. *-lowering-*.f6441.8%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right), \frac{1}{2}\right), x\right) \]
        6. Applied egg-rr41.8%

          \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot 0.5\right) \cdot x} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification48.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{-65}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(0 - y\right)\\ \mathbf{elif}\;y \leq 17500000000:\\ \;\;\;\;x \cdot \left(0.5 \cdot \sqrt{z \cdot 2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{z \cdot 2} \cdot \left(0 - y\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 8: 88.1% accurate, 1.8× speedup?

      \[\begin{array}{l} \\ \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(1 + 0.5 \cdot \left(t \cdot t\right)\right)\right) \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (* (sqrt (* z 2.0)) (* (- (* x 0.5) y) (+ 1.0 (* 0.5 (* t t))))))
      double code(double x, double y, double z, double t) {
      	return sqrt((z * 2.0)) * (((x * 0.5) - y) * (1.0 + (0.5 * (t * t))));
      }
      
      real(8) function code(x, y, z, t)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          code = sqrt((z * 2.0d0)) * (((x * 0.5d0) - y) * (1.0d0 + (0.5d0 * (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) * (1.0 + (0.5 * (t * t))));
      }
      
      def code(x, y, z, t):
      	return math.sqrt((z * 2.0)) * (((x * 0.5) - y) * (1.0 + (0.5 * (t * t))))
      
      function code(x, y, z, t)
      	return Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * Float64(1.0 + Float64(0.5 * Float64(t * t)))))
      end
      
      function tmp = code(x, y, z, t)
      	tmp = sqrt((z * 2.0)) * (((x * 0.5) - y) * (1.0 + (0.5 * (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[(1.0 + N[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(1 + 0.5 \cdot \left(t \cdot t\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 99.8%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \color{blue}{\left(1 + {t}^{2} \cdot \left(\frac{1}{2} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)}\right) \]
      4. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left({t}^{2} \cdot \left(\frac{1}{2} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)}\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({t}^{2}\right), \color{blue}{\left(\frac{1}{2} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)}\right)\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(t \cdot t\right), \left(\color{blue}{\frac{1}{2}} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{\frac{1}{2}} + {t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \color{blue}{\left({t}^{2} \cdot \left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)\right)}\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left({t}^{2}\right), \color{blue}{\left(\frac{1}{8} + \frac{1}{48} \cdot {t}^{2}\right)}\right)\right)\right)\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(t \cdot t\right), \left(\color{blue}{\frac{1}{8}} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{\frac{1}{8}} + \frac{1}{48} \cdot {t}^{2}\right)\right)\right)\right)\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \color{blue}{\left(\frac{1}{48} \cdot {t}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
        10. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \left(\frac{1}{48} \cdot \left(t \cdot \color{blue}{t}\right)\right)\right)\right)\right)\right)\right)\right) \]
        11. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \left(\left(\frac{1}{48} \cdot t\right) \cdot \color{blue}{t}\right)\right)\right)\right)\right)\right)\right) \]
        12. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \left(t \cdot \color{blue}{\left(\frac{1}{48} \cdot t\right)}\right)\right)\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \color{blue}{\left(\frac{1}{48} \cdot t\right)}\right)\right)\right)\right)\right)\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \left(t \cdot \color{blue}{\frac{1}{48}}\right)\right)\right)\right)\right)\right)\right)\right) \]
        15. *-lowering-*.f6496.6%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \color{blue}{\frac{1}{48}}\right)\right)\right)\right)\right)\right)\right)\right) \]
      5. Simplified96.6%

        \[\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 \left(0.5 + \left(t \cdot t\right) \cdot \left(0.125 + t \cdot \left(t \cdot 0.020833333333333332\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. flip--N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) - y \cdot y}{x \cdot \frac{1}{2} + y}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
        2. difference-of-squaresN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{x \cdot \frac{1}{2} + y}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
        3. flip3-+N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\frac{{\left(x \cdot \frac{1}{2}\right)}^{3} + {y}^{3}}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
        4. div-invN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left({\left(x \cdot \frac{1}{2}\right)}^{3} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
        5. unpow-prod-downN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left({x}^{3} \cdot {\frac{1}{2}}^{3} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
        6. cube-unmultN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot {\frac{1}{2}}^{3} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + {y}^{3}\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. cube-unmultN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(x \cdot \frac{1}{2} + y\right) \cdot \left(x \cdot \frac{1}{2} - y\right)}{\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + y \cdot \left(y \cdot y\right)\right) \cdot \frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
        9. times-fracN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{x \cdot \frac{1}{2} + y}{\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + y \cdot \left(y \cdot y\right)} \cdot \frac{x \cdot \frac{1}{2} - y}{\frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{x \cdot \frac{1}{2} + y}{\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{8} + y \cdot \left(y \cdot y\right)}\right), \left(\frac{x \cdot \frac{1}{2} - y}{\frac{1}{\left(x \cdot \frac{1}{2}\right) \cdot \left(x \cdot \frac{1}{2}\right) + \left(y \cdot y - \left(x \cdot \frac{1}{2}\right) \cdot y\right)}}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \frac{1}{48}\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. Applied egg-rr27.4%

        \[\leadsto \left(\color{blue}{\left(\frac{x \cdot 0.5 + y}{x \cdot \left(0.125 \cdot \left(x \cdot x\right)\right) + y \cdot \left(y \cdot y\right)} \cdot \frac{x \cdot 0.5 - y}{\frac{1}{x \cdot \left(x \cdot 0.25\right) + y \cdot \left(y - x \cdot 0.5\right)}}\right)} \cdot \sqrt{z \cdot 2}\right) \cdot \left(1 + \left(t \cdot t\right) \cdot \left(0.5 + \left(t \cdot t\right) \cdot \left(0.125 + t \cdot \left(t \cdot 0.020833333333333332\right)\right)\right)\right) \]
      8. Applied egg-rr97.0%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{1}{2} \cdot {t}^{2}\right)}, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
      10. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{1}{2} \cdot {t}^{2}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\color{blue}{z}, 2\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left({t}^{2}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot t\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
        4. *-lowering-*.f6489.5%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(t, t\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
      11. Simplified89.5%

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

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

      Alternative 9: 59.8% accurate, 1.9× speedup?

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

        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. Add Preprocessing
        3. Taylor expanded in t around 0

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \color{blue}{1}\right) \]
        4. Step-by-step derivation
          1. Simplified70.5%

            \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
          2. Step-by-step derivation
            1. *-rgt-identityN/A

              \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \color{blue}{\sqrt{z \cdot 2}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \frac{1}{2} - y\right), \color{blue}{\left(\sqrt{z \cdot 2}\right)}\right) \]
            3. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(x \cdot \frac{1}{2}\right), y\right), \left(\sqrt{\color{blue}{z \cdot 2}}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{\color{blue}{z} \cdot 2}\right)\right) \]
            5. sqrt-lowering-sqrt.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\left(z \cdot 2\right)\right)\right) \]
            6. *-lowering-*.f6470.5%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
          3. Applied egg-rr70.5%

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

          if 0.0050000000000000001 < 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. Add Preprocessing
          3. Taylor expanded in t around 0

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \color{blue}{1}\right) \]
          4. Step-by-step derivation
            1. Simplified23.9%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(x \cdot \left(\frac{1}{2} + -1 \cdot \frac{y}{x}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
            3. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{1}{2} + -1 \cdot \frac{y}{x}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
              2. mul-1-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{1}{2} + \left(\mathsf{neg}\left(\frac{y}{x}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
              3. unsub-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{1}{2} - \frac{y}{x}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\frac{1}{2}, \left(\frac{y}{x}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
              5. /-lowering-/.f6433.5%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
            4. Simplified33.5%

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

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

          Alternative 10: 85.0% accurate, 1.9× speedup?

          \[\begin{array}{l} \\ \left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot \left(2 \cdot \left(t \cdot t + 1\right)\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(z * Float64(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[(z * N[(2.0 * N[(N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot \left(2 \cdot \left(t \cdot t + 1\right)\right)}
          \end{array}
          
          Derivation
          1. Initial program 99.8%

            \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. associate-*l*N/A

              \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \frac{1}{2} - y\right), \color{blue}{\left(\sqrt{z \cdot 2} \cdot e^{\frac{t \cdot t}{2}}\right)}\right) \]
            3. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(x \cdot \frac{1}{2}\right), y\right), \left(\color{blue}{\sqrt{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{\color{blue}{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right)\right) \]
            5. exp-sqrtN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{z \cdot 2} \cdot \sqrt{e^{t \cdot t}}\right)\right) \]
            6. sqrt-unprodN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{\left(z \cdot 2\right) \cdot e^{t \cdot t}}\right)\right) \]
            7. sqrt-lowering-sqrt.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\left(\left(z \cdot 2\right) \cdot e^{t \cdot t}\right)\right)\right) \]
            8. associate-*l*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\left(z \cdot \left(2 \cdot e^{t \cdot t}\right)\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \left(2 \cdot e^{t \cdot t}\right)\right)\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \left(e^{t \cdot t}\right)\right)\right)\right)\right) \]
            11. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{exp.f64}\left(\left(t \cdot t\right)\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f6499.8%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(t, t\right)\right)\right)\right)\right)\right) \]
          4. Applied egg-rr99.8%

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \color{blue}{\left(1 + {t}^{2}\right)}\right)\right)\right)\right) \]
          6. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \left({t}^{2} + 1\right)\right)\right)\right)\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\left({t}^{2}\right), 1\right)\right)\right)\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\left(t \cdot t\right), 1\right)\right)\right)\right)\right) \]
            4. *-lowering-*.f6484.7%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, t\right), 1\right)\right)\right)\right)\right) \]
          7. Simplified84.7%

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

          Alternative 11: 57.6% accurate, 2.0× speedup?

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \color{blue}{1}\right) \]
          4. Step-by-step derivation
            1. Simplified57.9%

              \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
            2. Step-by-step derivation
              1. *-rgt-identityN/A

                \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \color{blue}{\sqrt{z \cdot 2}} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \frac{1}{2} - y\right), \color{blue}{\left(\sqrt{z \cdot 2}\right)}\right) \]
              3. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(x \cdot \frac{1}{2}\right), y\right), \left(\sqrt{\color{blue}{z \cdot 2}}\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \left(\sqrt{\color{blue}{z} \cdot 2}\right)\right) \]
              5. sqrt-lowering-sqrt.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\left(z \cdot 2\right)\right)\right) \]
              6. *-lowering-*.f6457.9%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right) \]
            3. Applied egg-rr57.9%

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

            Alternative 12: 30.6% accurate, 2.0× speedup?

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{2}\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), \color{blue}{1}\right) \]
            4. Step-by-step derivation
              1. Simplified57.9%

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot x\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
              3. Step-by-step derivation
                1. *-lowering-*.f6424.9%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, x\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right)\right), 1\right) \]
              4. Simplified24.9%

                \[\leadsto \left(\color{blue}{\left(0.5 \cdot x\right)} \cdot \sqrt{z \cdot 2}\right) \cdot 1 \]
              5. Step-by-step derivation
                1. *-rgt-identityN/A

                  \[\leadsto \left(\frac{1}{2} \cdot x\right) \cdot \color{blue}{\sqrt{z \cdot 2}} \]
                2. *-commutativeN/A

                  \[\leadsto \sqrt{z \cdot 2} \cdot \color{blue}{\left(\frac{1}{2} \cdot x\right)} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\sqrt{z \cdot 2} \cdot \frac{1}{2}\right) \cdot \color{blue}{x} \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{z \cdot 2} \cdot \frac{1}{2}\right), \color{blue}{x}\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{z \cdot 2}\right), \frac{1}{2}\right), x\right) \]
                6. sqrt-lowering-sqrt.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(z \cdot 2\right)\right), \frac{1}{2}\right), x\right) \]
                7. *-lowering-*.f6424.9%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(z, 2\right)\right), \frac{1}{2}\right), x\right) \]
              6. Applied egg-rr24.9%

                \[\leadsto \color{blue}{\left(\sqrt{z \cdot 2} \cdot 0.5\right) \cdot x} \]
              7. Final simplification24.9%

                \[\leadsto x \cdot \left(0.5 \cdot \sqrt{z \cdot 2}\right) \]
              8. Add Preprocessing

              Developer Target 1: 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 2024138 
              (FPCore (x y z t)
                :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
                :precision binary64
              
                :alt
                (! :herbie-platform default (* (* (- (* x 1/2) y) (sqrt (* z 2))) (pow (exp 1) (/ (* t t) 2))))
              
                (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))