(/ (* z1 (* z0 z0)) (* (- 1 (cos (* -2 (atan (* (/ z0 z3) (tan (* PI (- (+ z2 z2) -1/2)))))))) (- 1 z1)))

Percentage Accurate: 46.2% → 84.9%
Time: 10.3s
Alternatives: 17
Speedup: 1.4×

Specification

?
\[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
(FPCore (z1 z0 z3 z2)
  :precision binary64
  (/
 (* z1 (* z0 z0))
 (*
  (-
   1.0
   (cos
    (* -2.0 (atan (* (/ z0 z3) (tan (* PI (- (+ z2 z2) -0.5))))))))
  (- 1.0 z1))))
double code(double z1, double z0, double z3, double z2) {
	return (z1 * (z0 * z0)) / ((1.0 - cos((-2.0 * atan(((z0 / z3) * tan((((double) M_PI) * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
}
public static double code(double z1, double z0, double z3, double z2) {
	return (z1 * (z0 * z0)) / ((1.0 - Math.cos((-2.0 * Math.atan(((z0 / z3) * Math.tan((Math.PI * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
}
def code(z1, z0, z3, z2):
	return (z1 * (z0 * z0)) / ((1.0 - math.cos((-2.0 * math.atan(((z0 / z3) * math.tan((math.pi * ((z2 + z2) - -0.5)))))))) * (1.0 - z1))
function code(z1, z0, z3, z2)
	return Float64(Float64(z1 * Float64(z0 * z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(Float64(z0 / z3) * tan(Float64(pi * Float64(Float64(z2 + z2) - -0.5)))))))) * Float64(1.0 - z1)))
end
function tmp = code(z1, z0, z3, z2)
	tmp = (z1 * (z0 * z0)) / ((1.0 - cos((-2.0 * atan(((z0 / z3) * tan((pi * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
end
code[z1_, z0_, z3_, z2_] := N[(N[(z1 * N[(z0 * z0), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(N[(z0 / z3), $MachinePrecision] * N[Tan[N[(Pi * N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)}

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 17 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: 46.2% accurate, 1.0× speedup?

\[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
(FPCore (z1 z0 z3 z2)
  :precision binary64
  (/
 (* z1 (* z0 z0))
 (*
  (-
   1.0
   (cos
    (* -2.0 (atan (* (/ z0 z3) (tan (* PI (- (+ z2 z2) -0.5))))))))
  (- 1.0 z1))))
double code(double z1, double z0, double z3, double z2) {
	return (z1 * (z0 * z0)) / ((1.0 - cos((-2.0 * atan(((z0 / z3) * tan((((double) M_PI) * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
}
public static double code(double z1, double z0, double z3, double z2) {
	return (z1 * (z0 * z0)) / ((1.0 - Math.cos((-2.0 * Math.atan(((z0 / z3) * Math.tan((Math.PI * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
}
def code(z1, z0, z3, z2):
	return (z1 * (z0 * z0)) / ((1.0 - math.cos((-2.0 * math.atan(((z0 / z3) * math.tan((math.pi * ((z2 + z2) - -0.5)))))))) * (1.0 - z1))
function code(z1, z0, z3, z2)
	return Float64(Float64(z1 * Float64(z0 * z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(Float64(z0 / z3) * tan(Float64(pi * Float64(Float64(z2 + z2) - -0.5)))))))) * Float64(1.0 - z1)))
end
function tmp = code(z1, z0, z3, z2)
	tmp = (z1 * (z0 * z0)) / ((1.0 - cos((-2.0 * atan(((z0 / z3) * tan((pi * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
end
code[z1_, z0_, z3_, z2_] := N[(N[(z1 * N[(z0 * z0), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(N[(z0 / z3), $MachinePrecision] * N[Tan[N[(Pi * N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)}

Alternative 1: 84.9% accurate, 0.5× speedup?

\[\begin{array}{l} t_0 := \frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \left({z2}^{6} \cdot {\pi}^{6}\right)\right) \cdot \left|z0\right|}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)}\\ \mathbf{if}\;\left|z0\right| \leq 5 \cdot 10^{-30}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\left|z0\right| \leq 3.5 \cdot 10^{+154}:\\ \;\;\;\;z1 \cdot \frac{\left|z0\right| \cdot \left|z0\right|}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -0.6666666666666666 \cdot {\pi}^{4}\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-0.5 \cdot \frac{\left|z0\right|}{z3 \cdot \pi} + -0.3333333333333333 \cdot \frac{\left|z0\right| \cdot \left({z2}^{2} \cdot \pi\right)}{z3}}{z2}\right) \cdot 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
(FPCore (z1 z0 z3 z2)
  :precision binary64
  (let* ((t_0
        (/
         (* (* z1 (fabs z0)) (fabs z0))
         (*
          (-
           1.0
           (cos
            (*
             -2.0
             (atan
              (/
               (*
                (+
                 1.0
                 (*
                  -0.08888888888888889
                  (* (pow z2 6.0) (pow PI 6.0))))
                (fabs z0))
               (* (- (sin (* (+ z2 z2) PI))) z3))))))
          (- 1.0 z1)))))
  (if (<= (fabs z0) 5e-30)
    t_0
    (if (<= (fabs z0) 3.5e+154)
      (*
       z1
       (/
        (* (fabs z0) (fabs z0))
        (*
         (- 1.0 z1)
         (-
          1.0
          (cos
           (*
            (atan
             (*
              (-
               (*
                (-
                 (*
                  (-
                   (* (* -0.08888888888888889 (* z2 z2)) (pow PI 6.0))
                   (* -0.6666666666666666 (pow PI 4.0)))
                  (* z2 z2))
                 (* 2.0 (* PI PI)))
                (* z2 z2))
               -1.0)
              (/
               (+
                (* -0.5 (/ (fabs z0) (* z3 PI)))
                (*
                 -0.3333333333333333
                 (/ (* (fabs z0) (* (pow z2 2.0) PI)) z3)))
               z2)))
            2.0))))))
      t_0))))
double code(double z1, double z0, double z3, double z2) {
	double t_0 = ((z1 * fabs(z0)) * fabs(z0)) / ((1.0 - cos((-2.0 * atan((((1.0 + (-0.08888888888888889 * (pow(z2, 6.0) * pow(((double) M_PI), 6.0)))) * fabs(z0)) / (-sin(((z2 + z2) * ((double) M_PI))) * z3)))))) * (1.0 - z1));
	double tmp;
	if (fabs(z0) <= 5e-30) {
		tmp = t_0;
	} else if (fabs(z0) <= 3.5e+154) {
		tmp = z1 * ((fabs(z0) * fabs(z0)) / ((1.0 - z1) * (1.0 - cos((atan(((((((((-0.08888888888888889 * (z2 * z2)) * pow(((double) M_PI), 6.0)) - (-0.6666666666666666 * pow(((double) M_PI), 4.0))) * (z2 * z2)) - (2.0 * (((double) M_PI) * ((double) M_PI)))) * (z2 * z2)) - -1.0) * (((-0.5 * (fabs(z0) / (z3 * ((double) M_PI)))) + (-0.3333333333333333 * ((fabs(z0) * (pow(z2, 2.0) * ((double) M_PI))) / z3))) / z2))) * 2.0)))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
public static double code(double z1, double z0, double z3, double z2) {
	double t_0 = ((z1 * Math.abs(z0)) * Math.abs(z0)) / ((1.0 - Math.cos((-2.0 * Math.atan((((1.0 + (-0.08888888888888889 * (Math.pow(z2, 6.0) * Math.pow(Math.PI, 6.0)))) * Math.abs(z0)) / (-Math.sin(((z2 + z2) * Math.PI)) * z3)))))) * (1.0 - z1));
	double tmp;
	if (Math.abs(z0) <= 5e-30) {
		tmp = t_0;
	} else if (Math.abs(z0) <= 3.5e+154) {
		tmp = z1 * ((Math.abs(z0) * Math.abs(z0)) / ((1.0 - z1) * (1.0 - Math.cos((Math.atan(((((((((-0.08888888888888889 * (z2 * z2)) * Math.pow(Math.PI, 6.0)) - (-0.6666666666666666 * Math.pow(Math.PI, 4.0))) * (z2 * z2)) - (2.0 * (Math.PI * Math.PI))) * (z2 * z2)) - -1.0) * (((-0.5 * (Math.abs(z0) / (z3 * Math.PI))) + (-0.3333333333333333 * ((Math.abs(z0) * (Math.pow(z2, 2.0) * Math.PI)) / z3))) / z2))) * 2.0)))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(z1, z0, z3, z2):
	t_0 = ((z1 * math.fabs(z0)) * math.fabs(z0)) / ((1.0 - math.cos((-2.0 * math.atan((((1.0 + (-0.08888888888888889 * (math.pow(z2, 6.0) * math.pow(math.pi, 6.0)))) * math.fabs(z0)) / (-math.sin(((z2 + z2) * math.pi)) * z3)))))) * (1.0 - z1))
	tmp = 0
	if math.fabs(z0) <= 5e-30:
		tmp = t_0
	elif math.fabs(z0) <= 3.5e+154:
		tmp = z1 * ((math.fabs(z0) * math.fabs(z0)) / ((1.0 - z1) * (1.0 - math.cos((math.atan(((((((((-0.08888888888888889 * (z2 * z2)) * math.pow(math.pi, 6.0)) - (-0.6666666666666666 * math.pow(math.pi, 4.0))) * (z2 * z2)) - (2.0 * (math.pi * math.pi))) * (z2 * z2)) - -1.0) * (((-0.5 * (math.fabs(z0) / (z3 * math.pi))) + (-0.3333333333333333 * ((math.fabs(z0) * (math.pow(z2, 2.0) * math.pi)) / z3))) / z2))) * 2.0)))))
	else:
		tmp = t_0
	return tmp
function code(z1, z0, z3, z2)
	t_0 = Float64(Float64(Float64(z1 * abs(z0)) * abs(z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(Float64(Float64(1.0 + Float64(-0.08888888888888889 * Float64((z2 ^ 6.0) * (pi ^ 6.0)))) * abs(z0)) / Float64(Float64(-sin(Float64(Float64(z2 + z2) * pi))) * z3)))))) * Float64(1.0 - z1)))
	tmp = 0.0
	if (abs(z0) <= 5e-30)
		tmp = t_0;
	elseif (abs(z0) <= 3.5e+154)
		tmp = Float64(z1 * Float64(Float64(abs(z0) * abs(z0)) / Float64(Float64(1.0 - z1) * Float64(1.0 - cos(Float64(atan(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(-0.08888888888888889 * Float64(z2 * z2)) * (pi ^ 6.0)) - Float64(-0.6666666666666666 * (pi ^ 4.0))) * Float64(z2 * z2)) - Float64(2.0 * Float64(pi * pi))) * Float64(z2 * z2)) - -1.0) * Float64(Float64(Float64(-0.5 * Float64(abs(z0) / Float64(z3 * pi))) + Float64(-0.3333333333333333 * Float64(Float64(abs(z0) * Float64((z2 ^ 2.0) * pi)) / z3))) / z2))) * 2.0))))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(z1, z0, z3, z2)
	t_0 = ((z1 * abs(z0)) * abs(z0)) / ((1.0 - cos((-2.0 * atan((((1.0 + (-0.08888888888888889 * ((z2 ^ 6.0) * (pi ^ 6.0)))) * abs(z0)) / (-sin(((z2 + z2) * pi)) * z3)))))) * (1.0 - z1));
	tmp = 0.0;
	if (abs(z0) <= 5e-30)
		tmp = t_0;
	elseif (abs(z0) <= 3.5e+154)
		tmp = z1 * ((abs(z0) * abs(z0)) / ((1.0 - z1) * (1.0 - cos((atan(((((((((-0.08888888888888889 * (z2 * z2)) * (pi ^ 6.0)) - (-0.6666666666666666 * (pi ^ 4.0))) * (z2 * z2)) - (2.0 * (pi * pi))) * (z2 * z2)) - -1.0) * (((-0.5 * (abs(z0) / (z3 * pi))) + (-0.3333333333333333 * ((abs(z0) * ((z2 ^ 2.0) * pi)) / z3))) / z2))) * 2.0)))));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[(N[(N[(z1 * N[Abs[z0], $MachinePrecision]), $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(N[(N[(1.0 + N[(-0.08888888888888889 * N[(N[Power[z2, 6.0], $MachinePrecision] * N[Power[Pi, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[((-N[Sin[N[(N[(z2 + z2), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]) * z3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z0], $MachinePrecision], 5e-30], t$95$0, If[LessEqual[N[Abs[z0], $MachinePrecision], 3.5e+154], N[(z1 * N[(N[(N[Abs[z0], $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - z1), $MachinePrecision] * N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(N[(N[(N[(N[(N[(N[(-0.08888888888888889 * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] * N[Power[Pi, 6.0], $MachinePrecision]), $MachinePrecision] - N[(-0.6666666666666666 * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision] * N[(N[(N[(-0.5 * N[(N[Abs[z0], $MachinePrecision] / N[(z3 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(N[(N[Abs[z0], $MachinePrecision] * N[(N[Power[z2, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] / z3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
t_0 := \frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \left({z2}^{6} \cdot {\pi}^{6}\right)\right) \cdot \left|z0\right|}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)}\\
\mathbf{if}\;\left|z0\right| \leq 5 \cdot 10^{-30}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;\left|z0\right| \leq 3.5 \cdot 10^{+154}:\\
\;\;\;\;z1 \cdot \frac{\left|z0\right| \cdot \left|z0\right|}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -0.6666666666666666 \cdot {\pi}^{4}\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-0.5 \cdot \frac{\left|z0\right|}{z3 \cdot \pi} + -0.3333333333333333 \cdot \frac{\left|z0\right| \cdot \left({z2}^{2} \cdot \pi\right)}{z3}}{z2}\right) \cdot 2\right)\right)}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z0 < 4.9999999999999997e-30 or 3.5000000000000002e154 < z0

    1. Initial program 46.2%

      \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lift-tan.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. tan-quotN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. frac-timesN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      6. *-commutativeN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    3. Applied rewrites53.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    4. Taylor expanded in z2 around 0

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    5. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \color{blue}{{z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \color{blue}{\left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(\color{blue}{-2 \cdot {\mathsf{PI}\left(\right)}^{2}} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      6. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{\color{blue}{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-PI.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \color{blue}{\left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      9. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\color{blue}{\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right)} + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    6. Applied rewrites73.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. associate-*r*N/A

        \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-*.f6479.5%

        \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    8. Applied rewrites79.5%

      \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    9. Taylor expanded in z2 around inf

      \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \color{blue}{\left({z2}^{6} \cdot {\pi}^{6}\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{6}}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot {\mathsf{PI}\left(\right)}^{\color{blue}{6}}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot {\mathsf{PI}\left(\right)}^{6}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-pow.f64N/A

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot {\mathsf{PI}\left(\right)}^{6}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-PI.f6479.5%

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \left({z2}^{6} \cdot {\pi}^{6}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    11. Applied rewrites79.5%

      \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \color{blue}{\left({z2}^{6} \cdot {\pi}^{6}\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]

    if 4.9999999999999997e-30 < z0 < 3.5000000000000002e154

    1. Initial program 46.2%

      \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lift-tan.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. tan-quotN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. frac-timesN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      6. *-commutativeN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    3. Applied rewrites53.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    4. Taylor expanded in z2 around 0

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    5. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \color{blue}{{z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \color{blue}{\left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(\color{blue}{-2 \cdot {\mathsf{PI}\left(\right)}^{2}} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      6. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{\color{blue}{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-PI.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \color{blue}{\left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      9. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\color{blue}{\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right)} + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    6. Applied rewrites73.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    7. Applied rewrites70.4%

      \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -0.6666666666666666 \cdot {\pi}^{4}\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-z0}{\sin \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z3}\right) \cdot 2\right)\right)}} \]
    8. Taylor expanded in z2 around 0

      \[\leadsto z1 \cdot \frac{z0 \cdot z0}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -0.6666666666666666 \cdot {\pi}^{4}\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \color{blue}{\frac{\frac{-1}{2} \cdot \frac{z0}{z3 \cdot \pi} + \frac{-1}{3} \cdot \frac{z0 \cdot \left({z2}^{2} \cdot \pi\right)}{z3}}{z2}}\right) \cdot 2\right)\right)} \]
    9. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto z1 \cdot \frac{z0 \cdot z0}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(\frac{-4}{45} \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - \frac{-2}{3} \cdot {\pi}^{4}\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{\frac{-1}{2} \cdot \frac{z0}{z3 \cdot \mathsf{PI}\left(\right)} + \frac{-1}{3} \cdot \frac{z0 \cdot \left({z2}^{2} \cdot \mathsf{PI}\left(\right)\right)}{z3}}{\color{blue}{z2}}\right) \cdot 2\right)\right)} \]
    10. Applied rewrites74.2%

      \[\leadsto z1 \cdot \frac{z0 \cdot z0}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -0.6666666666666666 \cdot {\pi}^{4}\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \color{blue}{\frac{-0.5 \cdot \frac{z0}{z3 \cdot \pi} + -0.3333333333333333 \cdot \frac{z0 \cdot \left({z2}^{2} \cdot \pi\right)}{z3}}{z2}}\right) \cdot 2\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 84.8% accurate, 0.6× speedup?

\[\begin{array}{l} t_0 := \sin \left(\left(z2 + z2\right) \cdot \pi\right)\\ t_1 := \frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \left({z2}^{6} \cdot {\pi}^{6}\right)\right) \cdot \left|z0\right|}{\left(-t\_0\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)}\\ \mathbf{if}\;\left|z0\right| \leq 5 \cdot 10^{-30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;\left|z0\right| \leq 3.5 \cdot 10^{+154}:\\ \;\;\;\;z1 \cdot \frac{\left|z0\right| \cdot \left|z0\right|}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -64.9393940226683\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-\left|z0\right|}{t\_0 \cdot z3}\right) \cdot 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (z1 z0 z3 z2)
  :precision binary64
  (let* ((t_0 (sin (* (+ z2 z2) PI)))
       (t_1
        (/
         (* (* z1 (fabs z0)) (fabs z0))
         (*
          (-
           1.0
           (cos
            (*
             -2.0
             (atan
              (/
               (*
                (+
                 1.0
                 (*
                  -0.08888888888888889
                  (* (pow z2 6.0) (pow PI 6.0))))
                (fabs z0))
               (* (- t_0) z3))))))
          (- 1.0 z1)))))
  (if (<= (fabs z0) 5e-30)
    t_1
    (if (<= (fabs z0) 3.5e+154)
      (*
       z1
       (/
        (* (fabs z0) (fabs z0))
        (*
         (- 1.0 z1)
         (-
          1.0
          (cos
           (*
            (atan
             (*
              (-
               (*
                (-
                 (*
                  (-
                   (* (* -0.08888888888888889 (* z2 z2)) (pow PI 6.0))
                   -64.9393940226683)
                  (* z2 z2))
                 (* 2.0 (* PI PI)))
                (* z2 z2))
               -1.0)
              (/ (- (fabs z0)) (* t_0 z3))))
            2.0))))))
      t_1))))
double code(double z1, double z0, double z3, double z2) {
	double t_0 = sin(((z2 + z2) * ((double) M_PI)));
	double t_1 = ((z1 * fabs(z0)) * fabs(z0)) / ((1.0 - cos((-2.0 * atan((((1.0 + (-0.08888888888888889 * (pow(z2, 6.0) * pow(((double) M_PI), 6.0)))) * fabs(z0)) / (-t_0 * z3)))))) * (1.0 - z1));
	double tmp;
	if (fabs(z0) <= 5e-30) {
		tmp = t_1;
	} else if (fabs(z0) <= 3.5e+154) {
		tmp = z1 * ((fabs(z0) * fabs(z0)) / ((1.0 - z1) * (1.0 - cos((atan(((((((((-0.08888888888888889 * (z2 * z2)) * pow(((double) M_PI), 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (((double) M_PI) * ((double) M_PI)))) * (z2 * z2)) - -1.0) * (-fabs(z0) / (t_0 * z3)))) * 2.0)))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double z1, double z0, double z3, double z2) {
	double t_0 = Math.sin(((z2 + z2) * Math.PI));
	double t_1 = ((z1 * Math.abs(z0)) * Math.abs(z0)) / ((1.0 - Math.cos((-2.0 * Math.atan((((1.0 + (-0.08888888888888889 * (Math.pow(z2, 6.0) * Math.pow(Math.PI, 6.0)))) * Math.abs(z0)) / (-t_0 * z3)))))) * (1.0 - z1));
	double tmp;
	if (Math.abs(z0) <= 5e-30) {
		tmp = t_1;
	} else if (Math.abs(z0) <= 3.5e+154) {
		tmp = z1 * ((Math.abs(z0) * Math.abs(z0)) / ((1.0 - z1) * (1.0 - Math.cos((Math.atan(((((((((-0.08888888888888889 * (z2 * z2)) * Math.pow(Math.PI, 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (Math.PI * Math.PI))) * (z2 * z2)) - -1.0) * (-Math.abs(z0) / (t_0 * z3)))) * 2.0)))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(z1, z0, z3, z2):
	t_0 = math.sin(((z2 + z2) * math.pi))
	t_1 = ((z1 * math.fabs(z0)) * math.fabs(z0)) / ((1.0 - math.cos((-2.0 * math.atan((((1.0 + (-0.08888888888888889 * (math.pow(z2, 6.0) * math.pow(math.pi, 6.0)))) * math.fabs(z0)) / (-t_0 * z3)))))) * (1.0 - z1))
	tmp = 0
	if math.fabs(z0) <= 5e-30:
		tmp = t_1
	elif math.fabs(z0) <= 3.5e+154:
		tmp = z1 * ((math.fabs(z0) * math.fabs(z0)) / ((1.0 - z1) * (1.0 - math.cos((math.atan(((((((((-0.08888888888888889 * (z2 * z2)) * math.pow(math.pi, 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (math.pi * math.pi))) * (z2 * z2)) - -1.0) * (-math.fabs(z0) / (t_0 * z3)))) * 2.0)))))
	else:
		tmp = t_1
	return tmp
function code(z1, z0, z3, z2)
	t_0 = sin(Float64(Float64(z2 + z2) * pi))
	t_1 = Float64(Float64(Float64(z1 * abs(z0)) * abs(z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(Float64(Float64(1.0 + Float64(-0.08888888888888889 * Float64((z2 ^ 6.0) * (pi ^ 6.0)))) * abs(z0)) / Float64(Float64(-t_0) * z3)))))) * Float64(1.0 - z1)))
	tmp = 0.0
	if (abs(z0) <= 5e-30)
		tmp = t_1;
	elseif (abs(z0) <= 3.5e+154)
		tmp = Float64(z1 * Float64(Float64(abs(z0) * abs(z0)) / Float64(Float64(1.0 - z1) * Float64(1.0 - cos(Float64(atan(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(-0.08888888888888889 * Float64(z2 * z2)) * (pi ^ 6.0)) - -64.9393940226683) * Float64(z2 * z2)) - Float64(2.0 * Float64(pi * pi))) * Float64(z2 * z2)) - -1.0) * Float64(Float64(-abs(z0)) / Float64(t_0 * z3)))) * 2.0))))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(z1, z0, z3, z2)
	t_0 = sin(((z2 + z2) * pi));
	t_1 = ((z1 * abs(z0)) * abs(z0)) / ((1.0 - cos((-2.0 * atan((((1.0 + (-0.08888888888888889 * ((z2 ^ 6.0) * (pi ^ 6.0)))) * abs(z0)) / (-t_0 * z3)))))) * (1.0 - z1));
	tmp = 0.0;
	if (abs(z0) <= 5e-30)
		tmp = t_1;
	elseif (abs(z0) <= 3.5e+154)
		tmp = z1 * ((abs(z0) * abs(z0)) / ((1.0 - z1) * (1.0 - cos((atan(((((((((-0.08888888888888889 * (z2 * z2)) * (pi ^ 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (pi * pi))) * (z2 * z2)) - -1.0) * (-abs(z0) / (t_0 * z3)))) * 2.0)))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[Sin[N[(N[(z2 + z2), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(z1 * N[Abs[z0], $MachinePrecision]), $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(N[(N[(1.0 + N[(-0.08888888888888889 * N[(N[Power[z2, 6.0], $MachinePrecision] * N[Power[Pi, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[((-t$95$0) * z3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z0], $MachinePrecision], 5e-30], t$95$1, If[LessEqual[N[Abs[z0], $MachinePrecision], 3.5e+154], N[(z1 * N[(N[(N[Abs[z0], $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - z1), $MachinePrecision] * N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(N[(N[(N[(N[(N[(N[(-0.08888888888888889 * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] * N[Power[Pi, 6.0], $MachinePrecision]), $MachinePrecision] - -64.9393940226683), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision] * N[((-N[Abs[z0], $MachinePrecision]) / N[(t$95$0 * z3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_0 := \sin \left(\left(z2 + z2\right) \cdot \pi\right)\\
t_1 := \frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \left({z2}^{6} \cdot {\pi}^{6}\right)\right) \cdot \left|z0\right|}{\left(-t\_0\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)}\\
\mathbf{if}\;\left|z0\right| \leq 5 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;\left|z0\right| \leq 3.5 \cdot 10^{+154}:\\
\;\;\;\;z1 \cdot \frac{\left|z0\right| \cdot \left|z0\right|}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -64.9393940226683\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-\left|z0\right|}{t\_0 \cdot z3}\right) \cdot 2\right)\right)}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z0 < 4.9999999999999997e-30 or 3.5000000000000002e154 < z0

    1. Initial program 46.2%

      \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lift-tan.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. tan-quotN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. frac-timesN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      6. *-commutativeN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    3. Applied rewrites53.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    4. Taylor expanded in z2 around 0

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    5. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \color{blue}{{z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \color{blue}{\left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(\color{blue}{-2 \cdot {\mathsf{PI}\left(\right)}^{2}} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      6. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{\color{blue}{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-PI.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \color{blue}{\left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      9. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\color{blue}{\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right)} + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    6. Applied rewrites73.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. associate-*r*N/A

        \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-*.f6479.5%

        \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    8. Applied rewrites79.5%

      \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    9. Taylor expanded in z2 around inf

      \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \color{blue}{\left({z2}^{6} \cdot {\pi}^{6}\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{6}}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot {\mathsf{PI}\left(\right)}^{\color{blue}{6}}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot {\mathsf{PI}\left(\right)}^{6}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-pow.f64N/A

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot {\mathsf{PI}\left(\right)}^{6}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-PI.f6479.5%

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \left({z2}^{6} \cdot {\pi}^{6}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    11. Applied rewrites79.5%

      \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \color{blue}{\left({z2}^{6} \cdot {\pi}^{6}\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]

    if 4.9999999999999997e-30 < z0 < 3.5000000000000002e154

    1. Initial program 46.2%

      \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lift-tan.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. tan-quotN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. frac-timesN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      6. *-commutativeN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    3. Applied rewrites53.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    4. Taylor expanded in z2 around 0

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    5. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \color{blue}{{z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \color{blue}{\left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(\color{blue}{-2 \cdot {\mathsf{PI}\left(\right)}^{2}} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      6. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{\color{blue}{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-PI.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \color{blue}{\left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      9. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\color{blue}{\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right)} + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    6. Applied rewrites73.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    7. Applied rewrites70.4%

      \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -0.6666666666666666 \cdot {\pi}^{4}\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-z0}{\sin \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z3}\right) \cdot 2\right)\right)}} \]
    8. Evaluated real constant70.4%

      \[\leadsto z1 \cdot \frac{z0 \cdot z0}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -64.9393940226683\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-z0}{\sin \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z3}\right) \cdot 2\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 84.0% accurate, 0.6× speedup?

\[\begin{array}{l} t_0 := \sin \left(\left(z2 + z2\right) \cdot \pi\right)\\ t_1 := \left|z0\right| \cdot \left|z0\right|\\ \mathbf{if}\;\left|z0\right| \leq 5 \cdot 10^{-30}:\\ \;\;\;\;\frac{z1 \cdot t\_1}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \left({z2}^{6} \cdot {\pi}^{6}\right)\right) \cdot \left|z0\right|}{\left(-t\_0\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)}\\ \mathbf{elif}\;\left|z0\right| \leq 2.65 \cdot 10^{+152}:\\ \;\;\;\;z1 \cdot \frac{t\_1}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -64.9393940226683\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-\left|z0\right|}{t\_0 \cdot z3}\right) \cdot 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|z0\right| \cdot z1}{1 - z1} \cdot \frac{\left|z0\right|}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{\left|z0\right|}{z3}\right) \cdot 2\right)}\\ \end{array} \]
(FPCore (z1 z0 z3 z2)
  :precision binary64
  (let* ((t_0 (sin (* (+ z2 z2) PI))) (t_1 (* (fabs z0) (fabs z0))))
  (if (<= (fabs z0) 5e-30)
    (/
     (* z1 t_1)
     (*
      (-
       1.0
       (cos
        (*
         -2.0
         (atan
          (/
           (*
            (+
             1.0
             (* -0.08888888888888889 (* (pow z2 6.0) (pow PI 6.0))))
            (fabs z0))
           (* (- t_0) z3))))))
      (- 1.0 z1)))
    (if (<= (fabs z0) 2.65e+152)
      (*
       z1
       (/
        t_1
        (*
         (- 1.0 z1)
         (-
          1.0
          (cos
           (*
            (atan
             (*
              (-
               (*
                (-
                 (*
                  (-
                   (* (* -0.08888888888888889 (* z2 z2)) (pow PI 6.0))
                   -64.9393940226683)
                  (* z2 z2))
                 (* 2.0 (* PI PI)))
                (* z2 z2))
               -1.0)
              (/ (- (fabs z0)) (* t_0 z3))))
            2.0))))))
      (*
       (/ (* (fabs z0) z1) (- 1.0 z1))
       (/
        (fabs z0)
        (-
         1.0
         (cos
          (* (atan (* (tan (* 0.5 PI)) (/ (fabs z0) z3))) 2.0)))))))))
double code(double z1, double z0, double z3, double z2) {
	double t_0 = sin(((z2 + z2) * ((double) M_PI)));
	double t_1 = fabs(z0) * fabs(z0);
	double tmp;
	if (fabs(z0) <= 5e-30) {
		tmp = (z1 * t_1) / ((1.0 - cos((-2.0 * atan((((1.0 + (-0.08888888888888889 * (pow(z2, 6.0) * pow(((double) M_PI), 6.0)))) * fabs(z0)) / (-t_0 * z3)))))) * (1.0 - z1));
	} else if (fabs(z0) <= 2.65e+152) {
		tmp = z1 * (t_1 / ((1.0 - z1) * (1.0 - cos((atan(((((((((-0.08888888888888889 * (z2 * z2)) * pow(((double) M_PI), 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (((double) M_PI) * ((double) M_PI)))) * (z2 * z2)) - -1.0) * (-fabs(z0) / (t_0 * z3)))) * 2.0)))));
	} else {
		tmp = ((fabs(z0) * z1) / (1.0 - z1)) * (fabs(z0) / (1.0 - cos((atan((tan((0.5 * ((double) M_PI))) * (fabs(z0) / z3))) * 2.0))));
	}
	return tmp;
}
public static double code(double z1, double z0, double z3, double z2) {
	double t_0 = Math.sin(((z2 + z2) * Math.PI));
	double t_1 = Math.abs(z0) * Math.abs(z0);
	double tmp;
	if (Math.abs(z0) <= 5e-30) {
		tmp = (z1 * t_1) / ((1.0 - Math.cos((-2.0 * Math.atan((((1.0 + (-0.08888888888888889 * (Math.pow(z2, 6.0) * Math.pow(Math.PI, 6.0)))) * Math.abs(z0)) / (-t_0 * z3)))))) * (1.0 - z1));
	} else if (Math.abs(z0) <= 2.65e+152) {
		tmp = z1 * (t_1 / ((1.0 - z1) * (1.0 - Math.cos((Math.atan(((((((((-0.08888888888888889 * (z2 * z2)) * Math.pow(Math.PI, 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (Math.PI * Math.PI))) * (z2 * z2)) - -1.0) * (-Math.abs(z0) / (t_0 * z3)))) * 2.0)))));
	} else {
		tmp = ((Math.abs(z0) * z1) / (1.0 - z1)) * (Math.abs(z0) / (1.0 - Math.cos((Math.atan((Math.tan((0.5 * Math.PI)) * (Math.abs(z0) / z3))) * 2.0))));
	}
	return tmp;
}
def code(z1, z0, z3, z2):
	t_0 = math.sin(((z2 + z2) * math.pi))
	t_1 = math.fabs(z0) * math.fabs(z0)
	tmp = 0
	if math.fabs(z0) <= 5e-30:
		tmp = (z1 * t_1) / ((1.0 - math.cos((-2.0 * math.atan((((1.0 + (-0.08888888888888889 * (math.pow(z2, 6.0) * math.pow(math.pi, 6.0)))) * math.fabs(z0)) / (-t_0 * z3)))))) * (1.0 - z1))
	elif math.fabs(z0) <= 2.65e+152:
		tmp = z1 * (t_1 / ((1.0 - z1) * (1.0 - math.cos((math.atan(((((((((-0.08888888888888889 * (z2 * z2)) * math.pow(math.pi, 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (math.pi * math.pi))) * (z2 * z2)) - -1.0) * (-math.fabs(z0) / (t_0 * z3)))) * 2.0)))))
	else:
		tmp = ((math.fabs(z0) * z1) / (1.0 - z1)) * (math.fabs(z0) / (1.0 - math.cos((math.atan((math.tan((0.5 * math.pi)) * (math.fabs(z0) / z3))) * 2.0))))
	return tmp
function code(z1, z0, z3, z2)
	t_0 = sin(Float64(Float64(z2 + z2) * pi))
	t_1 = Float64(abs(z0) * abs(z0))
	tmp = 0.0
	if (abs(z0) <= 5e-30)
		tmp = Float64(Float64(z1 * t_1) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(Float64(Float64(1.0 + Float64(-0.08888888888888889 * Float64((z2 ^ 6.0) * (pi ^ 6.0)))) * abs(z0)) / Float64(Float64(-t_0) * z3)))))) * Float64(1.0 - z1)));
	elseif (abs(z0) <= 2.65e+152)
		tmp = Float64(z1 * Float64(t_1 / Float64(Float64(1.0 - z1) * Float64(1.0 - cos(Float64(atan(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(-0.08888888888888889 * Float64(z2 * z2)) * (pi ^ 6.0)) - -64.9393940226683) * Float64(z2 * z2)) - Float64(2.0 * Float64(pi * pi))) * Float64(z2 * z2)) - -1.0) * Float64(Float64(-abs(z0)) / Float64(t_0 * z3)))) * 2.0))))));
	else
		tmp = Float64(Float64(Float64(abs(z0) * z1) / Float64(1.0 - z1)) * Float64(abs(z0) / Float64(1.0 - cos(Float64(atan(Float64(tan(Float64(0.5 * pi)) * Float64(abs(z0) / z3))) * 2.0)))));
	end
	return tmp
end
function tmp_2 = code(z1, z0, z3, z2)
	t_0 = sin(((z2 + z2) * pi));
	t_1 = abs(z0) * abs(z0);
	tmp = 0.0;
	if (abs(z0) <= 5e-30)
		tmp = (z1 * t_1) / ((1.0 - cos((-2.0 * atan((((1.0 + (-0.08888888888888889 * ((z2 ^ 6.0) * (pi ^ 6.0)))) * abs(z0)) / (-t_0 * z3)))))) * (1.0 - z1));
	elseif (abs(z0) <= 2.65e+152)
		tmp = z1 * (t_1 / ((1.0 - z1) * (1.0 - cos((atan(((((((((-0.08888888888888889 * (z2 * z2)) * (pi ^ 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (pi * pi))) * (z2 * z2)) - -1.0) * (-abs(z0) / (t_0 * z3)))) * 2.0)))));
	else
		tmp = ((abs(z0) * z1) / (1.0 - z1)) * (abs(z0) / (1.0 - cos((atan((tan((0.5 * pi)) * (abs(z0) / z3))) * 2.0))));
	end
	tmp_2 = tmp;
end
code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[Sin[N[(N[(z2 + z2), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[z0], $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z0], $MachinePrecision], 5e-30], N[(N[(z1 * t$95$1), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(N[(N[(1.0 + N[(-0.08888888888888889 * N[(N[Power[z2, 6.0], $MachinePrecision] * N[Power[Pi, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[((-t$95$0) * z3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[z0], $MachinePrecision], 2.65e+152], N[(z1 * N[(t$95$1 / N[(N[(1.0 - z1), $MachinePrecision] * N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(N[(N[(N[(N[(N[(N[(-0.08888888888888889 * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] * N[Power[Pi, 6.0], $MachinePrecision]), $MachinePrecision] - -64.9393940226683), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision] * N[((-N[Abs[z0], $MachinePrecision]) / N[(t$95$0 * z3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Abs[z0], $MachinePrecision] * z1), $MachinePrecision] / N[(1.0 - z1), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[z0], $MachinePrecision] / N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[Tan[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision] * N[(N[Abs[z0], $MachinePrecision] / z3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \sin \left(\left(z2 + z2\right) \cdot \pi\right)\\
t_1 := \left|z0\right| \cdot \left|z0\right|\\
\mathbf{if}\;\left|z0\right| \leq 5 \cdot 10^{-30}:\\
\;\;\;\;\frac{z1 \cdot t\_1}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \left({z2}^{6} \cdot {\pi}^{6}\right)\right) \cdot \left|z0\right|}{\left(-t\_0\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)}\\

\mathbf{elif}\;\left|z0\right| \leq 2.65 \cdot 10^{+152}:\\
\;\;\;\;z1 \cdot \frac{t\_1}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -64.9393940226683\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-\left|z0\right|}{t\_0 \cdot z3}\right) \cdot 2\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left|z0\right| \cdot z1}{1 - z1} \cdot \frac{\left|z0\right|}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{\left|z0\right|}{z3}\right) \cdot 2\right)}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z0 < 4.9999999999999997e-30

    1. Initial program 46.2%

      \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lift-tan.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. tan-quotN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. frac-timesN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      6. *-commutativeN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    3. Applied rewrites53.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    4. Taylor expanded in z2 around 0

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    5. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \color{blue}{{z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \color{blue}{\left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(\color{blue}{-2 \cdot {\mathsf{PI}\left(\right)}^{2}} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      6. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{\color{blue}{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-PI.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \color{blue}{\left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      9. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\color{blue}{\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right)} + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    6. Applied rewrites73.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    7. Taylor expanded in z2 around inf

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \color{blue}{\left({z2}^{6} \cdot {\pi}^{6}\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    8. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{6}}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot {\mathsf{PI}\left(\right)}^{\color{blue}{6}}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot {\mathsf{PI}\left(\right)}^{6}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \frac{-4}{45} \cdot \left({z2}^{6} \cdot {\mathsf{PI}\left(\right)}^{6}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-PI.f6473.5%

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \left({z2}^{6} \cdot {\pi}^{6}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    9. Applied rewrites73.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + -0.08888888888888889 \cdot \color{blue}{\left({z2}^{6} \cdot {\pi}^{6}\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]

    if 4.9999999999999997e-30 < z0 < 2.6499999999999999e152

    1. Initial program 46.2%

      \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lift-tan.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. tan-quotN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. frac-timesN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      6. *-commutativeN/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    3. Applied rewrites53.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
    4. Taylor expanded in z2 around 0

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    5. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \color{blue}{{z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \color{blue}{\left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(\color{blue}{-2 \cdot {\mathsf{PI}\left(\right)}^{2}} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      4. lower-+.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      6. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{\color{blue}{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. lower-PI.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \color{blue}{\left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      9. lower-pow.f64N/A

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\color{blue}{\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right)} + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    6. Applied rewrites73.5%

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
    7. Applied rewrites70.4%

      \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -0.6666666666666666 \cdot {\pi}^{4}\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-z0}{\sin \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z3}\right) \cdot 2\right)\right)}} \]
    8. Evaluated real constant70.4%

      \[\leadsto z1 \cdot \frac{z0 \cdot z0}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -64.9393940226683\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-z0}{\sin \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z3}\right) \cdot 2\right)\right)} \]

    if 2.6499999999999999e152 < z0

    1. Initial program 46.2%

      \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
    2. Taylor expanded in z2 around 0

      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
    3. Step-by-step derivation
      1. Applied rewrites47.2%

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{0.5}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        4. associate-*r*N/A

          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        5. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{\left(z0 \cdot z1\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{\left(z0 \cdot z1\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{\left(z0 \cdot z1\right) \cdot z0}{\color{blue}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\left(z0 \cdot z1\right) \cdot z0}{\color{blue}{\left(1 - z1\right) \cdot \left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right)}} \]
        9. times-fracN/A

          \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)}} \]
        10. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)}} \]
        11. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1}} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)} \]
        12. lower-/.f6455.5%

          \[\leadsto \frac{z0 \cdot z1}{1 - z1} \cdot \color{blue}{\frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot 0.5\right)\right)\right)}} \]
      3. Applied rewrites55.5%

        \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)}} \]
    4. Recombined 3 regimes into one program.
    5. Add Preprocessing

    Alternative 4: 76.3% accurate, 0.7× speedup?

    \[\begin{array}{l} t_0 := \frac{\left|z0\right| \cdot \pi}{z3}\\ \mathbf{if}\;\left|z0\right| \leq 2.7 \cdot 10^{-30}:\\ \;\;\;\;\frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot t\_0 - -0.3333333333333333 \cdot t\_0\right)\right) + -0.5 \cdot \frac{\left|z0\right|}{z3 \cdot \pi}}{z2}\right)\right)\right) \cdot \left(1 - z1\right)}\\ \mathbf{elif}\;\left|z0\right| \leq 2.65 \cdot 10^{+152}:\\ \;\;\;\;z1 \cdot \frac{\left|z0\right| \cdot \left|z0\right|}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -64.9393940226683\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-\left|z0\right|}{\sin \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z3}\right) \cdot 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|z0\right| \cdot z1}{1 - z1} \cdot \frac{\left|z0\right|}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{\left|z0\right|}{z3}\right) \cdot 2\right)}\\ \end{array} \]
    (FPCore (z1 z0 z3 z2)
      :precision binary64
      (let* ((t_0 (/ (* (fabs z0) PI) z3)))
      (if (<= (fabs z0) 2.7e-30)
        (/
         (* (* z1 (fabs z0)) (fabs z0))
         (*
          (-
           1.0
           (cos
            (*
             -2.0
             (atan
              (/
               (+
                (*
                 -1.0
                 (*
                  (pow z2 2.0)
                  (- (* -1.0 t_0) (* -0.3333333333333333 t_0))))
                (* -0.5 (/ (fabs z0) (* z3 PI))))
               z2)))))
          (- 1.0 z1)))
        (if (<= (fabs z0) 2.65e+152)
          (*
           z1
           (/
            (* (fabs z0) (fabs z0))
            (*
             (- 1.0 z1)
             (-
              1.0
              (cos
               (*
                (atan
                 (*
                  (-
                   (*
                    (-
                     (*
                      (-
                       (* (* -0.08888888888888889 (* z2 z2)) (pow PI 6.0))
                       -64.9393940226683)
                      (* z2 z2))
                     (* 2.0 (* PI PI)))
                    (* z2 z2))
                   -1.0)
                  (/ (- (fabs z0)) (* (sin (* (+ z2 z2) PI)) z3))))
                2.0))))))
          (*
           (/ (* (fabs z0) z1) (- 1.0 z1))
           (/
            (fabs z0)
            (-
             1.0
             (cos
              (* (atan (* (tan (* 0.5 PI)) (/ (fabs z0) z3))) 2.0)))))))))
    double code(double z1, double z0, double z3, double z2) {
    	double t_0 = (fabs(z0) * ((double) M_PI)) / z3;
    	double tmp;
    	if (fabs(z0) <= 2.7e-30) {
    		tmp = ((z1 * fabs(z0)) * fabs(z0)) / ((1.0 - cos((-2.0 * atan((((-1.0 * (pow(z2, 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (fabs(z0) / (z3 * ((double) M_PI))))) / z2))))) * (1.0 - z1));
    	} else if (fabs(z0) <= 2.65e+152) {
    		tmp = z1 * ((fabs(z0) * fabs(z0)) / ((1.0 - z1) * (1.0 - cos((atan(((((((((-0.08888888888888889 * (z2 * z2)) * pow(((double) M_PI), 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (((double) M_PI) * ((double) M_PI)))) * (z2 * z2)) - -1.0) * (-fabs(z0) / (sin(((z2 + z2) * ((double) M_PI))) * z3)))) * 2.0)))));
    	} else {
    		tmp = ((fabs(z0) * z1) / (1.0 - z1)) * (fabs(z0) / (1.0 - cos((atan((tan((0.5 * ((double) M_PI))) * (fabs(z0) / z3))) * 2.0))));
    	}
    	return tmp;
    }
    
    public static double code(double z1, double z0, double z3, double z2) {
    	double t_0 = (Math.abs(z0) * Math.PI) / z3;
    	double tmp;
    	if (Math.abs(z0) <= 2.7e-30) {
    		tmp = ((z1 * Math.abs(z0)) * Math.abs(z0)) / ((1.0 - Math.cos((-2.0 * Math.atan((((-1.0 * (Math.pow(z2, 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (Math.abs(z0) / (z3 * Math.PI)))) / z2))))) * (1.0 - z1));
    	} else if (Math.abs(z0) <= 2.65e+152) {
    		tmp = z1 * ((Math.abs(z0) * Math.abs(z0)) / ((1.0 - z1) * (1.0 - Math.cos((Math.atan(((((((((-0.08888888888888889 * (z2 * z2)) * Math.pow(Math.PI, 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (Math.PI * Math.PI))) * (z2 * z2)) - -1.0) * (-Math.abs(z0) / (Math.sin(((z2 + z2) * Math.PI)) * z3)))) * 2.0)))));
    	} else {
    		tmp = ((Math.abs(z0) * z1) / (1.0 - z1)) * (Math.abs(z0) / (1.0 - Math.cos((Math.atan((Math.tan((0.5 * Math.PI)) * (Math.abs(z0) / z3))) * 2.0))));
    	}
    	return tmp;
    }
    
    def code(z1, z0, z3, z2):
    	t_0 = (math.fabs(z0) * math.pi) / z3
    	tmp = 0
    	if math.fabs(z0) <= 2.7e-30:
    		tmp = ((z1 * math.fabs(z0)) * math.fabs(z0)) / ((1.0 - math.cos((-2.0 * math.atan((((-1.0 * (math.pow(z2, 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (math.fabs(z0) / (z3 * math.pi)))) / z2))))) * (1.0 - z1))
    	elif math.fabs(z0) <= 2.65e+152:
    		tmp = z1 * ((math.fabs(z0) * math.fabs(z0)) / ((1.0 - z1) * (1.0 - math.cos((math.atan(((((((((-0.08888888888888889 * (z2 * z2)) * math.pow(math.pi, 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (math.pi * math.pi))) * (z2 * z2)) - -1.0) * (-math.fabs(z0) / (math.sin(((z2 + z2) * math.pi)) * z3)))) * 2.0)))))
    	else:
    		tmp = ((math.fabs(z0) * z1) / (1.0 - z1)) * (math.fabs(z0) / (1.0 - math.cos((math.atan((math.tan((0.5 * math.pi)) * (math.fabs(z0) / z3))) * 2.0))))
    	return tmp
    
    function code(z1, z0, z3, z2)
    	t_0 = Float64(Float64(abs(z0) * pi) / z3)
    	tmp = 0.0
    	if (abs(z0) <= 2.7e-30)
    		tmp = Float64(Float64(Float64(z1 * abs(z0)) * abs(z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(Float64(Float64(-1.0 * Float64((z2 ^ 2.0) * Float64(Float64(-1.0 * t_0) - Float64(-0.3333333333333333 * t_0)))) + Float64(-0.5 * Float64(abs(z0) / Float64(z3 * pi)))) / z2))))) * Float64(1.0 - z1)));
    	elseif (abs(z0) <= 2.65e+152)
    		tmp = Float64(z1 * Float64(Float64(abs(z0) * abs(z0)) / Float64(Float64(1.0 - z1) * Float64(1.0 - cos(Float64(atan(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(-0.08888888888888889 * Float64(z2 * z2)) * (pi ^ 6.0)) - -64.9393940226683) * Float64(z2 * z2)) - Float64(2.0 * Float64(pi * pi))) * Float64(z2 * z2)) - -1.0) * Float64(Float64(-abs(z0)) / Float64(sin(Float64(Float64(z2 + z2) * pi)) * z3)))) * 2.0))))));
    	else
    		tmp = Float64(Float64(Float64(abs(z0) * z1) / Float64(1.0 - z1)) * Float64(abs(z0) / Float64(1.0 - cos(Float64(atan(Float64(tan(Float64(0.5 * pi)) * Float64(abs(z0) / z3))) * 2.0)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(z1, z0, z3, z2)
    	t_0 = (abs(z0) * pi) / z3;
    	tmp = 0.0;
    	if (abs(z0) <= 2.7e-30)
    		tmp = ((z1 * abs(z0)) * abs(z0)) / ((1.0 - cos((-2.0 * atan((((-1.0 * ((z2 ^ 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (abs(z0) / (z3 * pi)))) / z2))))) * (1.0 - z1));
    	elseif (abs(z0) <= 2.65e+152)
    		tmp = z1 * ((abs(z0) * abs(z0)) / ((1.0 - z1) * (1.0 - cos((atan(((((((((-0.08888888888888889 * (z2 * z2)) * (pi ^ 6.0)) - -64.9393940226683) * (z2 * z2)) - (2.0 * (pi * pi))) * (z2 * z2)) - -1.0) * (-abs(z0) / (sin(((z2 + z2) * pi)) * z3)))) * 2.0)))));
    	else
    		tmp = ((abs(z0) * z1) / (1.0 - z1)) * (abs(z0) / (1.0 - cos((atan((tan((0.5 * pi)) * (abs(z0) / z3))) * 2.0))));
    	end
    	tmp_2 = tmp;
    end
    
    code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[(N[(N[Abs[z0], $MachinePrecision] * Pi), $MachinePrecision] / z3), $MachinePrecision]}, If[LessEqual[N[Abs[z0], $MachinePrecision], 2.7e-30], N[(N[(N[(z1 * N[Abs[z0], $MachinePrecision]), $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(N[(N[(-1.0 * N[(N[Power[z2, 2.0], $MachinePrecision] * N[(N[(-1.0 * t$95$0), $MachinePrecision] - N[(-0.3333333333333333 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[Abs[z0], $MachinePrecision] / N[(z3 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[z0], $MachinePrecision], 2.65e+152], N[(z1 * N[(N[(N[Abs[z0], $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - z1), $MachinePrecision] * N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(N[(N[(N[(N[(N[(N[(-0.08888888888888889 * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] * N[Power[Pi, 6.0], $MachinePrecision]), $MachinePrecision] - -64.9393940226683), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z2 * z2), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision] * N[((-N[Abs[z0], $MachinePrecision]) / N[(N[Sin[N[(N[(z2 + z2), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * z3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Abs[z0], $MachinePrecision] * z1), $MachinePrecision] / N[(1.0 - z1), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[z0], $MachinePrecision] / N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[Tan[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision] * N[(N[Abs[z0], $MachinePrecision] / z3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    t_0 := \frac{\left|z0\right| \cdot \pi}{z3}\\
    \mathbf{if}\;\left|z0\right| \leq 2.7 \cdot 10^{-30}:\\
    \;\;\;\;\frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot t\_0 - -0.3333333333333333 \cdot t\_0\right)\right) + -0.5 \cdot \frac{\left|z0\right|}{z3 \cdot \pi}}{z2}\right)\right)\right) \cdot \left(1 - z1\right)}\\
    
    \mathbf{elif}\;\left|z0\right| \leq 2.65 \cdot 10^{+152}:\\
    \;\;\;\;z1 \cdot \frac{\left|z0\right| \cdot \left|z0\right|}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -64.9393940226683\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-\left|z0\right|}{\sin \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z3}\right) \cdot 2\right)\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\left|z0\right| \cdot z1}{1 - z1} \cdot \frac{\left|z0\right|}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{\left|z0\right|}{z3}\right) \cdot 2\right)}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z0 < 2.6999999999999999e-30

      1. Initial program 46.2%

        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        3. lift-tan.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        4. tan-quotN/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        5. frac-timesN/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
        6. *-commutativeN/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        7. lower-/.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      3. Applied rewrites53.5%

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      4. Taylor expanded in z2 around 0

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. Step-by-step derivation
        1. lower-+.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \color{blue}{{z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \color{blue}{\left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        3. lower-pow.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(\color{blue}{-2 \cdot {\mathsf{PI}\left(\right)}^{2}} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        4. lower-+.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        6. lower-pow.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{\color{blue}{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        7. lower-PI.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \color{blue}{\left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        9. lower-pow.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\color{blue}{\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right)} + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      6. Applied rewrites73.5%

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        3. associate-*r*N/A

          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        5. lower-*.f6479.5%

          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      8. Applied rewrites79.5%

        \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      9. Taylor expanded in z2 around 0

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot \frac{z0 \cdot \pi}{z3} - \frac{-1}{3} \cdot \frac{z0 \cdot \pi}{z3}\right)\right) + \frac{-1}{2} \cdot \frac{z0}{z3 \cdot \pi}}{z2}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      10. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot \frac{z0 \cdot \mathsf{PI}\left(\right)}{z3} - \frac{-1}{3} \cdot \frac{z0 \cdot \mathsf{PI}\left(\right)}{z3}\right)\right) + \frac{-1}{2} \cdot \frac{z0}{z3 \cdot \mathsf{PI}\left(\right)}}{\color{blue}{z2}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      11. Applied rewrites58.6%

        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot \frac{z0 \cdot \pi}{z3} - -0.3333333333333333 \cdot \frac{z0 \cdot \pi}{z3}\right)\right) + -0.5 \cdot \frac{z0}{z3 \cdot \pi}}{z2}\right)}\right)\right) \cdot \left(1 - z1\right)} \]

      if 2.6999999999999999e-30 < z0 < 2.6499999999999999e152

      1. Initial program 46.2%

        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        3. lift-tan.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        4. tan-quotN/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        5. frac-timesN/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
        6. *-commutativeN/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        7. lower-/.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      3. Applied rewrites53.5%

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
      4. Taylor expanded in z2 around 0

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      5. Step-by-step derivation
        1. lower-+.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \color{blue}{{z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \color{blue}{\left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        3. lower-pow.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(\color{blue}{-2 \cdot {\mathsf{PI}\left(\right)}^{2}} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        4. lower-+.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        6. lower-pow.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{\color{blue}{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        7. lower-PI.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \color{blue}{\left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        9. lower-pow.f64N/A

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\color{blue}{\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right)} + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      6. Applied rewrites73.5%

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
      7. Applied rewrites70.4%

        \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -0.6666666666666666 \cdot {\pi}^{4}\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-z0}{\sin \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z3}\right) \cdot 2\right)\right)}} \]
      8. Evaluated real constant70.4%

        \[\leadsto z1 \cdot \frac{z0 \cdot z0}{\left(1 - z1\right) \cdot \left(1 - \cos \left(\tan^{-1} \left(\left(\left(\left(\left(-0.08888888888888889 \cdot \left(z2 \cdot z2\right)\right) \cdot {\pi}^{6} - -64.9393940226683\right) \cdot \left(z2 \cdot z2\right) - 2 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(z2 \cdot z2\right) - -1\right) \cdot \frac{-z0}{\sin \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z3}\right) \cdot 2\right)\right)} \]

      if 2.6499999999999999e152 < z0

      1. Initial program 46.2%

        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      2. Taylor expanded in z2 around 0

        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
      3. Step-by-step derivation
        1. Applied rewrites47.2%

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{0.5}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        2. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
          4. associate-*r*N/A

            \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
          5. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{\left(z0 \cdot z1\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
          6. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{\left(z0 \cdot z1\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{\left(z0 \cdot z1\right) \cdot z0}{\color{blue}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\left(z0 \cdot z1\right) \cdot z0}{\color{blue}{\left(1 - z1\right) \cdot \left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right)}} \]
          9. times-fracN/A

            \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)}} \]
          10. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)}} \]
          11. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1}} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)} \]
          12. lower-/.f6455.5%

            \[\leadsto \frac{z0 \cdot z1}{1 - z1} \cdot \color{blue}{\frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot 0.5\right)\right)\right)}} \]
        3. Applied rewrites55.5%

          \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)}} \]
      4. Recombined 3 regimes into one program.
      5. Add Preprocessing

      Alternative 5: 68.8% accurate, 0.8× speedup?

      \[\begin{array}{l} t_0 := \frac{\left|z0\right| \cdot \pi}{z3}\\ \mathbf{if}\;\left|z0\right| \leq 2.2 \cdot 10^{+113}:\\ \;\;\;\;\frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot t\_0 - -0.3333333333333333 \cdot t\_0\right)\right) + -0.5 \cdot \frac{\left|z0\right|}{z3 \cdot \pi}}{z2}\right)\right)\right) \cdot \left(1 - z1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|z0\right| \cdot z1}{1 - z1} \cdot \frac{\left|z0\right|}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{\left|z0\right|}{z3}\right) \cdot 2\right)}\\ \end{array} \]
      (FPCore (z1 z0 z3 z2)
        :precision binary64
        (let* ((t_0 (/ (* (fabs z0) PI) z3)))
        (if (<= (fabs z0) 2.2e+113)
          (/
           (* (* z1 (fabs z0)) (fabs z0))
           (*
            (-
             1.0
             (cos
              (*
               -2.0
               (atan
                (/
                 (+
                  (*
                   -1.0
                   (*
                    (pow z2 2.0)
                    (- (* -1.0 t_0) (* -0.3333333333333333 t_0))))
                  (* -0.5 (/ (fabs z0) (* z3 PI))))
                 z2)))))
            (- 1.0 z1)))
          (*
           (/ (* (fabs z0) z1) (- 1.0 z1))
           (/
            (fabs z0)
            (-
             1.0
             (cos (* (atan (* (tan (* 0.5 PI)) (/ (fabs z0) z3))) 2.0))))))))
      double code(double z1, double z0, double z3, double z2) {
      	double t_0 = (fabs(z0) * ((double) M_PI)) / z3;
      	double tmp;
      	if (fabs(z0) <= 2.2e+113) {
      		tmp = ((z1 * fabs(z0)) * fabs(z0)) / ((1.0 - cos((-2.0 * atan((((-1.0 * (pow(z2, 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (fabs(z0) / (z3 * ((double) M_PI))))) / z2))))) * (1.0 - z1));
      	} else {
      		tmp = ((fabs(z0) * z1) / (1.0 - z1)) * (fabs(z0) / (1.0 - cos((atan((tan((0.5 * ((double) M_PI))) * (fabs(z0) / z3))) * 2.0))));
      	}
      	return tmp;
      }
      
      public static double code(double z1, double z0, double z3, double z2) {
      	double t_0 = (Math.abs(z0) * Math.PI) / z3;
      	double tmp;
      	if (Math.abs(z0) <= 2.2e+113) {
      		tmp = ((z1 * Math.abs(z0)) * Math.abs(z0)) / ((1.0 - Math.cos((-2.0 * Math.atan((((-1.0 * (Math.pow(z2, 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (Math.abs(z0) / (z3 * Math.PI)))) / z2))))) * (1.0 - z1));
      	} else {
      		tmp = ((Math.abs(z0) * z1) / (1.0 - z1)) * (Math.abs(z0) / (1.0 - Math.cos((Math.atan((Math.tan((0.5 * Math.PI)) * (Math.abs(z0) / z3))) * 2.0))));
      	}
      	return tmp;
      }
      
      def code(z1, z0, z3, z2):
      	t_0 = (math.fabs(z0) * math.pi) / z3
      	tmp = 0
      	if math.fabs(z0) <= 2.2e+113:
      		tmp = ((z1 * math.fabs(z0)) * math.fabs(z0)) / ((1.0 - math.cos((-2.0 * math.atan((((-1.0 * (math.pow(z2, 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (math.fabs(z0) / (z3 * math.pi)))) / z2))))) * (1.0 - z1))
      	else:
      		tmp = ((math.fabs(z0) * z1) / (1.0 - z1)) * (math.fabs(z0) / (1.0 - math.cos((math.atan((math.tan((0.5 * math.pi)) * (math.fabs(z0) / z3))) * 2.0))))
      	return tmp
      
      function code(z1, z0, z3, z2)
      	t_0 = Float64(Float64(abs(z0) * pi) / z3)
      	tmp = 0.0
      	if (abs(z0) <= 2.2e+113)
      		tmp = Float64(Float64(Float64(z1 * abs(z0)) * abs(z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(Float64(Float64(-1.0 * Float64((z2 ^ 2.0) * Float64(Float64(-1.0 * t_0) - Float64(-0.3333333333333333 * t_0)))) + Float64(-0.5 * Float64(abs(z0) / Float64(z3 * pi)))) / z2))))) * Float64(1.0 - z1)));
      	else
      		tmp = Float64(Float64(Float64(abs(z0) * z1) / Float64(1.0 - z1)) * Float64(abs(z0) / Float64(1.0 - cos(Float64(atan(Float64(tan(Float64(0.5 * pi)) * Float64(abs(z0) / z3))) * 2.0)))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(z1, z0, z3, z2)
      	t_0 = (abs(z0) * pi) / z3;
      	tmp = 0.0;
      	if (abs(z0) <= 2.2e+113)
      		tmp = ((z1 * abs(z0)) * abs(z0)) / ((1.0 - cos((-2.0 * atan((((-1.0 * ((z2 ^ 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (abs(z0) / (z3 * pi)))) / z2))))) * (1.0 - z1));
      	else
      		tmp = ((abs(z0) * z1) / (1.0 - z1)) * (abs(z0) / (1.0 - cos((atan((tan((0.5 * pi)) * (abs(z0) / z3))) * 2.0))));
      	end
      	tmp_2 = tmp;
      end
      
      code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[(N[(N[Abs[z0], $MachinePrecision] * Pi), $MachinePrecision] / z3), $MachinePrecision]}, If[LessEqual[N[Abs[z0], $MachinePrecision], 2.2e+113], N[(N[(N[(z1 * N[Abs[z0], $MachinePrecision]), $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(N[(N[(-1.0 * N[(N[Power[z2, 2.0], $MachinePrecision] * N[(N[(-1.0 * t$95$0), $MachinePrecision] - N[(-0.3333333333333333 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[Abs[z0], $MachinePrecision] / N[(z3 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Abs[z0], $MachinePrecision] * z1), $MachinePrecision] / N[(1.0 - z1), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[z0], $MachinePrecision] / N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[Tan[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision] * N[(N[Abs[z0], $MachinePrecision] / z3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      t_0 := \frac{\left|z0\right| \cdot \pi}{z3}\\
      \mathbf{if}\;\left|z0\right| \leq 2.2 \cdot 10^{+113}:\\
      \;\;\;\;\frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot t\_0 - -0.3333333333333333 \cdot t\_0\right)\right) + -0.5 \cdot \frac{\left|z0\right|}{z3 \cdot \pi}}{z2}\right)\right)\right) \cdot \left(1 - z1\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\left|z0\right| \cdot z1}{1 - z1} \cdot \frac{\left|z0\right|}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{\left|z0\right|}{z3}\right) \cdot 2\right)}\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z0 < 2.2000000000000001e113

        1. Initial program 46.2%

          \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
          3. lift-tan.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          4. tan-quotN/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          5. frac-timesN/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
          6. *-commutativeN/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
        3. Applied rewrites53.5%

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
        4. Taylor expanded in z2 around 0

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        5. Step-by-step derivation
          1. lower-+.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \color{blue}{{z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \color{blue}{\left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          3. lower-pow.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(\color{blue}{-2 \cdot {\mathsf{PI}\left(\right)}^{2}} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          4. lower-+.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          6. lower-pow.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{\color{blue}{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          7. lower-PI.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          8. lower-*.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \color{blue}{\left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          9. lower-pow.f64N/A

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\color{blue}{\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right)} + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        6. Applied rewrites73.5%

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        7. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          3. associate-*r*N/A

            \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          5. lower-*.f6479.5%

            \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        8. Applied rewrites79.5%

          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        9. Taylor expanded in z2 around 0

          \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot \frac{z0 \cdot \pi}{z3} - \frac{-1}{3} \cdot \frac{z0 \cdot \pi}{z3}\right)\right) + \frac{-1}{2} \cdot \frac{z0}{z3 \cdot \pi}}{z2}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
        10. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot \frac{z0 \cdot \mathsf{PI}\left(\right)}{z3} - \frac{-1}{3} \cdot \frac{z0 \cdot \mathsf{PI}\left(\right)}{z3}\right)\right) + \frac{-1}{2} \cdot \frac{z0}{z3 \cdot \mathsf{PI}\left(\right)}}{\color{blue}{z2}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
        11. Applied rewrites58.6%

          \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot \frac{z0 \cdot \pi}{z3} - -0.3333333333333333 \cdot \frac{z0 \cdot \pi}{z3}\right)\right) + -0.5 \cdot \frac{z0}{z3 \cdot \pi}}{z2}\right)}\right)\right) \cdot \left(1 - z1\right)} \]

        if 2.2000000000000001e113 < z0

        1. Initial program 46.2%

          \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        2. Taylor expanded in z2 around 0

          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
        3. Step-by-step derivation
          1. Applied rewrites47.2%

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{0.5}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
          2. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
            4. associate-*r*N/A

              \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
            5. *-commutativeN/A

              \[\leadsto \frac{\color{blue}{\left(z0 \cdot z1\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
            6. lift-*.f64N/A

              \[\leadsto \frac{\color{blue}{\left(z0 \cdot z1\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{\left(z0 \cdot z1\right) \cdot z0}{\color{blue}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\left(z0 \cdot z1\right) \cdot z0}{\color{blue}{\left(1 - z1\right) \cdot \left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right)}} \]
            9. times-fracN/A

              \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)}} \]
            10. lower-*.f64N/A

              \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)}} \]
            11. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1}} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)} \]
            12. lower-/.f6455.5%

              \[\leadsto \frac{z0 \cdot z1}{1 - z1} \cdot \color{blue}{\frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot 0.5\right)\right)\right)}} \]
          3. Applied rewrites55.5%

            \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)}} \]
        4. Recombined 2 regimes into one program.
        5. Add Preprocessing

        Alternative 6: 68.6% accurate, 0.8× speedup?

        \[\begin{array}{l} t_0 := \frac{\left|z0\right| \cdot \pi}{z3}\\ \mathbf{if}\;\left|z0\right| \leq 2.2 \cdot 10^{+113}:\\ \;\;\;\;\frac{z1 \cdot \left(\left|z0\right| \cdot \left|z0\right|\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot t\_0 - -0.3333333333333333 \cdot t\_0\right)\right) + -0.5 \cdot \frac{\left|z0\right|}{z3 \cdot \pi}}{z2}\right)\right)\right) \cdot \left(1 - z1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|z0\right| \cdot z1}{1 - z1} \cdot \frac{\left|z0\right|}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{\left|z0\right|}{z3}\right) \cdot 2\right)}\\ \end{array} \]
        (FPCore (z1 z0 z3 z2)
          :precision binary64
          (let* ((t_0 (/ (* (fabs z0) PI) z3)))
          (if (<= (fabs z0) 2.2e+113)
            (/
             (* z1 (* (fabs z0) (fabs z0)))
             (*
              (-
               1.0
               (cos
                (*
                 -2.0
                 (atan
                  (/
                   (+
                    (*
                     -1.0
                     (*
                      (pow z2 2.0)
                      (- (* -1.0 t_0) (* -0.3333333333333333 t_0))))
                    (* -0.5 (/ (fabs z0) (* z3 PI))))
                   z2)))))
              (- 1.0 z1)))
            (*
             (/ (* (fabs z0) z1) (- 1.0 z1))
             (/
              (fabs z0)
              (-
               1.0
               (cos (* (atan (* (tan (* 0.5 PI)) (/ (fabs z0) z3))) 2.0))))))))
        double code(double z1, double z0, double z3, double z2) {
        	double t_0 = (fabs(z0) * ((double) M_PI)) / z3;
        	double tmp;
        	if (fabs(z0) <= 2.2e+113) {
        		tmp = (z1 * (fabs(z0) * fabs(z0))) / ((1.0 - cos((-2.0 * atan((((-1.0 * (pow(z2, 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (fabs(z0) / (z3 * ((double) M_PI))))) / z2))))) * (1.0 - z1));
        	} else {
        		tmp = ((fabs(z0) * z1) / (1.0 - z1)) * (fabs(z0) / (1.0 - cos((atan((tan((0.5 * ((double) M_PI))) * (fabs(z0) / z3))) * 2.0))));
        	}
        	return tmp;
        }
        
        public static double code(double z1, double z0, double z3, double z2) {
        	double t_0 = (Math.abs(z0) * Math.PI) / z3;
        	double tmp;
        	if (Math.abs(z0) <= 2.2e+113) {
        		tmp = (z1 * (Math.abs(z0) * Math.abs(z0))) / ((1.0 - Math.cos((-2.0 * Math.atan((((-1.0 * (Math.pow(z2, 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (Math.abs(z0) / (z3 * Math.PI)))) / z2))))) * (1.0 - z1));
        	} else {
        		tmp = ((Math.abs(z0) * z1) / (1.0 - z1)) * (Math.abs(z0) / (1.0 - Math.cos((Math.atan((Math.tan((0.5 * Math.PI)) * (Math.abs(z0) / z3))) * 2.0))));
        	}
        	return tmp;
        }
        
        def code(z1, z0, z3, z2):
        	t_0 = (math.fabs(z0) * math.pi) / z3
        	tmp = 0
        	if math.fabs(z0) <= 2.2e+113:
        		tmp = (z1 * (math.fabs(z0) * math.fabs(z0))) / ((1.0 - math.cos((-2.0 * math.atan((((-1.0 * (math.pow(z2, 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (math.fabs(z0) / (z3 * math.pi)))) / z2))))) * (1.0 - z1))
        	else:
        		tmp = ((math.fabs(z0) * z1) / (1.0 - z1)) * (math.fabs(z0) / (1.0 - math.cos((math.atan((math.tan((0.5 * math.pi)) * (math.fabs(z0) / z3))) * 2.0))))
        	return tmp
        
        function code(z1, z0, z3, z2)
        	t_0 = Float64(Float64(abs(z0) * pi) / z3)
        	tmp = 0.0
        	if (abs(z0) <= 2.2e+113)
        		tmp = Float64(Float64(z1 * Float64(abs(z0) * abs(z0))) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(Float64(Float64(-1.0 * Float64((z2 ^ 2.0) * Float64(Float64(-1.0 * t_0) - Float64(-0.3333333333333333 * t_0)))) + Float64(-0.5 * Float64(abs(z0) / Float64(z3 * pi)))) / z2))))) * Float64(1.0 - z1)));
        	else
        		tmp = Float64(Float64(Float64(abs(z0) * z1) / Float64(1.0 - z1)) * Float64(abs(z0) / Float64(1.0 - cos(Float64(atan(Float64(tan(Float64(0.5 * pi)) * Float64(abs(z0) / z3))) * 2.0)))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(z1, z0, z3, z2)
        	t_0 = (abs(z0) * pi) / z3;
        	tmp = 0.0;
        	if (abs(z0) <= 2.2e+113)
        		tmp = (z1 * (abs(z0) * abs(z0))) / ((1.0 - cos((-2.0 * atan((((-1.0 * ((z2 ^ 2.0) * ((-1.0 * t_0) - (-0.3333333333333333 * t_0)))) + (-0.5 * (abs(z0) / (z3 * pi)))) / z2))))) * (1.0 - z1));
        	else
        		tmp = ((abs(z0) * z1) / (1.0 - z1)) * (abs(z0) / (1.0 - cos((atan((tan((0.5 * pi)) * (abs(z0) / z3))) * 2.0))));
        	end
        	tmp_2 = tmp;
        end
        
        code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[(N[(N[Abs[z0], $MachinePrecision] * Pi), $MachinePrecision] / z3), $MachinePrecision]}, If[LessEqual[N[Abs[z0], $MachinePrecision], 2.2e+113], N[(N[(z1 * N[(N[Abs[z0], $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(N[(N[(-1.0 * N[(N[Power[z2, 2.0], $MachinePrecision] * N[(N[(-1.0 * t$95$0), $MachinePrecision] - N[(-0.3333333333333333 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[Abs[z0], $MachinePrecision] / N[(z3 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Abs[z0], $MachinePrecision] * z1), $MachinePrecision] / N[(1.0 - z1), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[z0], $MachinePrecision] / N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[Tan[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision] * N[(N[Abs[z0], $MachinePrecision] / z3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        t_0 := \frac{\left|z0\right| \cdot \pi}{z3}\\
        \mathbf{if}\;\left|z0\right| \leq 2.2 \cdot 10^{+113}:\\
        \;\;\;\;\frac{z1 \cdot \left(\left|z0\right| \cdot \left|z0\right|\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot t\_0 - -0.3333333333333333 \cdot t\_0\right)\right) + -0.5 \cdot \frac{\left|z0\right|}{z3 \cdot \pi}}{z2}\right)\right)\right) \cdot \left(1 - z1\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\left|z0\right| \cdot z1}{1 - z1} \cdot \frac{\left|z0\right|}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{\left|z0\right|}{z3}\right) \cdot 2\right)}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z0 < 2.2000000000000001e113

          1. Initial program 46.2%

            \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
          2. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
            2. lift-/.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
            3. lift-tan.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            4. tan-quotN/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            5. frac-timesN/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
            6. *-commutativeN/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            7. lower-/.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
          3. Applied rewrites53.5%

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
          4. Taylor expanded in z2 around 0

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + \frac{2}{3} \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          5. Step-by-step derivation
            1. lower-+.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + \color{blue}{{z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \color{blue}{\left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            3. lower-pow.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(\color{blue}{-2 \cdot {\mathsf{PI}\left(\right)}^{2}} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            4. lower-+.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + \color{blue}{{z2}^{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            6. lower-pow.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\mathsf{PI}\left(\right)}^{2} + {z2}^{\color{blue}{2}} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            7. lower-PI.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            8. lower-*.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \color{blue}{\left(\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right) + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)}\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
            9. lower-pow.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(\color{blue}{\frac{-4}{45} \cdot \left({z2}^{2} \cdot {\mathsf{PI}\left(\right)}^{6}\right)} + \frac{2}{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          6. Applied rewrites73.5%

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(1 + {z2}^{2} \cdot \left(-2 \cdot {\pi}^{2} + {z2}^{2} \cdot \left(-0.08888888888888889 \cdot \left({z2}^{2} \cdot {\pi}^{6}\right) + 0.6666666666666666 \cdot {\pi}^{4}\right)\right)\right)} \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          7. Taylor expanded in z2 around 0

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot \frac{z0 \cdot \pi}{z3} - \frac{-1}{3} \cdot \frac{z0 \cdot \pi}{z3}\right)\right) + \frac{-1}{2} \cdot \frac{z0}{z3 \cdot \pi}}{z2}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
          8. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot \frac{z0 \cdot \mathsf{PI}\left(\right)}{z3} - \frac{-1}{3} \cdot \frac{z0 \cdot \mathsf{PI}\left(\right)}{z3}\right)\right) + \frac{-1}{2} \cdot \frac{z0}{z3 \cdot \mathsf{PI}\left(\right)}}{\color{blue}{z2}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
          9. Applied rewrites54.5%

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left({z2}^{2} \cdot \left(-1 \cdot \frac{z0 \cdot \pi}{z3} - -0.3333333333333333 \cdot \frac{z0 \cdot \pi}{z3}\right)\right) + -0.5 \cdot \frac{z0}{z3 \cdot \pi}}{z2}\right)}\right)\right) \cdot \left(1 - z1\right)} \]

          if 2.2000000000000001e113 < z0

          1. Initial program 46.2%

            \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
          2. Taylor expanded in z2 around 0

            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
          3. Step-by-step derivation
            1. Applied rewrites47.2%

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{0.5}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
            2. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
              2. lift-*.f64N/A

                \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
              3. lift-*.f64N/A

                \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
              4. associate-*r*N/A

                \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
              5. *-commutativeN/A

                \[\leadsto \frac{\color{blue}{\left(z0 \cdot z1\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
              6. lift-*.f64N/A

                \[\leadsto \frac{\color{blue}{\left(z0 \cdot z1\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
              7. lift-*.f64N/A

                \[\leadsto \frac{\left(z0 \cdot z1\right) \cdot z0}{\color{blue}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
              8. *-commutativeN/A

                \[\leadsto \frac{\left(z0 \cdot z1\right) \cdot z0}{\color{blue}{\left(1 - z1\right) \cdot \left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right)}} \]
              9. times-fracN/A

                \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)}} \]
              10. lower-*.f64N/A

                \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)}} \]
              11. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1}} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)} \]
              12. lower-/.f6455.5%

                \[\leadsto \frac{z0 \cdot z1}{1 - z1} \cdot \color{blue}{\frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot 0.5\right)\right)\right)}} \]
            3. Applied rewrites55.5%

              \[\leadsto \color{blue}{\frac{z0 \cdot z1}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)}} \]
          4. Recombined 2 regimes into one program.
          5. Add Preprocessing

          Alternative 7: 63.3% accurate, 0.8× speedup?

          \[\begin{array}{l} \mathbf{if}\;\tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right) \leq 400:\\ \;\;\;\;z0 \cdot \frac{z0 \cdot z1}{\left(1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)\right) \cdot \left(1 - z1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}\\ \end{array} \]
          (FPCore (z1 z0 z3 z2)
            :precision binary64
            (if (<= (tan (* PI (- (+ z2 z2) -0.5))) 400.0)
            (*
             z0
             (/
              (* z0 z1)
              (*
               (- 1.0 (cos (* (atan (* (tan (* 0.5 PI)) (/ z0 z3))) 2.0)))
               (- 1.0 z1))))
            (*
             (/ (* z1 z0) (- 1.0 z1))
             (/
              z0
              (- 1.0 (cos (* (atan (* (/ z0 (* (* z3 PI) z2)) -0.5)) 2.0)))))))
          double code(double z1, double z0, double z3, double z2) {
          	double tmp;
          	if (tan((((double) M_PI) * ((z2 + z2) - -0.5))) <= 400.0) {
          		tmp = z0 * ((z0 * z1) / ((1.0 - cos((atan((tan((0.5 * ((double) M_PI))) * (z0 / z3))) * 2.0))) * (1.0 - z1)));
          	} else {
          		tmp = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - cos((atan(((z0 / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0))));
          	}
          	return tmp;
          }
          
          public static double code(double z1, double z0, double z3, double z2) {
          	double tmp;
          	if (Math.tan((Math.PI * ((z2 + z2) - -0.5))) <= 400.0) {
          		tmp = z0 * ((z0 * z1) / ((1.0 - Math.cos((Math.atan((Math.tan((0.5 * Math.PI)) * (z0 / z3))) * 2.0))) * (1.0 - z1)));
          	} else {
          		tmp = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - Math.cos((Math.atan(((z0 / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0))));
          	}
          	return tmp;
          }
          
          def code(z1, z0, z3, z2):
          	tmp = 0
          	if math.tan((math.pi * ((z2 + z2) - -0.5))) <= 400.0:
          		tmp = z0 * ((z0 * z1) / ((1.0 - math.cos((math.atan((math.tan((0.5 * math.pi)) * (z0 / z3))) * 2.0))) * (1.0 - z1)))
          	else:
          		tmp = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - math.cos((math.atan(((z0 / ((z3 * math.pi) * z2)) * -0.5)) * 2.0))))
          	return tmp
          
          function code(z1, z0, z3, z2)
          	tmp = 0.0
          	if (tan(Float64(pi * Float64(Float64(z2 + z2) - -0.5))) <= 400.0)
          		tmp = Float64(z0 * Float64(Float64(z0 * z1) / Float64(Float64(1.0 - cos(Float64(atan(Float64(tan(Float64(0.5 * pi)) * Float64(z0 / z3))) * 2.0))) * Float64(1.0 - z1))));
          	else
          		tmp = Float64(Float64(Float64(z1 * z0) / Float64(1.0 - z1)) * Float64(z0 / Float64(1.0 - cos(Float64(atan(Float64(Float64(z0 / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0)))));
          	end
          	return tmp
          end
          
          function tmp_2 = code(z1, z0, z3, z2)
          	tmp = 0.0;
          	if (tan((pi * ((z2 + z2) - -0.5))) <= 400.0)
          		tmp = z0 * ((z0 * z1) / ((1.0 - cos((atan((tan((0.5 * pi)) * (z0 / z3))) * 2.0))) * (1.0 - z1)));
          	else
          		tmp = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - cos((atan(((z0 / ((z3 * pi) * z2)) * -0.5)) * 2.0))));
          	end
          	tmp_2 = tmp;
          end
          
          code[z1_, z0_, z3_, z2_] := If[LessEqual[N[Tan[N[(Pi * N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 400.0], N[(z0 * N[(N[(z0 * z1), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[Tan[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision] * N[(z0 / z3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z1 * z0), $MachinePrecision] / N[(1.0 - z1), $MachinePrecision]), $MachinePrecision] * N[(z0 / N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(z0 / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          \mathbf{if}\;\tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right) \leq 400:\\
          \;\;\;\;z0 \cdot \frac{z0 \cdot z1}{\left(1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)\right) \cdot \left(1 - z1\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (tan.f64 (*.f64 (PI.f64) (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)))) < 400

            1. Initial program 46.2%

              \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
            2. Taylor expanded in z2 around 0

              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
            3. Step-by-step derivation
              1. Applied rewrites47.2%

                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{0.5}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
              2. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                3. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{\left(z0 \cdot z0\right) \cdot z1}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{\color{blue}{\left(z0 \cdot z0\right)} \cdot z1}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                5. associate-*l*N/A

                  \[\leadsto \frac{\color{blue}{z0 \cdot \left(z0 \cdot z1\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                6. lift-*.f64N/A

                  \[\leadsto \frac{z0 \cdot \color{blue}{\left(z0 \cdot z1\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                7. associate-/l*N/A

                  \[\leadsto \color{blue}{z0 \cdot \frac{z0 \cdot z1}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                8. lower-*.f64N/A

                  \[\leadsto \color{blue}{z0 \cdot \frac{z0 \cdot z1}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                9. lower-/.f6455.4%

                  \[\leadsto z0 \cdot \color{blue}{\frac{z0 \cdot z1}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot 0.5\right)\right)\right)\right) \cdot \left(1 - z1\right)}} \]
              3. Applied rewrites55.4%

                \[\leadsto \color{blue}{z0 \cdot \frac{z0 \cdot z1}{\left(1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)\right) \cdot \left(1 - z1\right)}} \]

              if 400 < (tan.f64 (*.f64 (PI.f64) (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64))))

              1. Initial program 46.2%

                \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
              2. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                2. lift-/.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                3. lift-tan.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                4. tan-quotN/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                5. frac-timesN/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                6. *-commutativeN/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                7. lower-/.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
              3. Applied rewrites53.5%

                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
              4. Taylor expanded in z2 around 0

                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                2. lower-/.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                5. lower-PI.f6447.0%

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
              6. Applied rewrites47.0%

                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
              7. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                3. lift-*.f64N/A

                  \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                4. associate-*r*N/A

                  \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                5. lift-*.f64N/A

                  \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\color{blue}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                6. *-commutativeN/A

                  \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\color{blue}{\left(1 - z1\right) \cdot \left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right)}} \]
                7. times-fracN/A

                  \[\leadsto \color{blue}{\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)}} \]
              8. Applied rewrites54.6%

                \[\leadsto \color{blue}{\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}} \]
            4. Recombined 2 regimes into one program.
            5. Add Preprocessing

            Alternative 8: 57.0% accurate, 0.3× speedup?

            \[\begin{array}{l} t_0 := \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)}\\ t_1 := \frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-312}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{-136}:\\ \;\;\;\;\frac{z0 \cdot z0}{\left(1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)\right) \cdot 1} \cdot z1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
            (FPCore (z1 z0 z3 z2)
              :precision binary64
              (let* ((t_0
                    (/
                     (* z1 (* z0 z0))
                     (*
                      (-
                       1.0
                       (cos
                        (*
                         -2.0
                         (atan (* (/ z0 z3) (tan (* PI (- (+ z2 z2) -0.5))))))))
                      (- 1.0 z1))))
                   (t_1
                    (*
                     (/ (* z1 z0) (- 1.0 z1))
                     (/
                      z0
                      (-
                       1.0
                       (cos (* (atan (* (/ z0 (* (* z3 PI) z2)) -0.5)) 2.0)))))))
              (if (<= t_0 -2e-312)
                t_1
                (if (<= t_0 1e-136)
                  (*
                   (/
                    (* z0 z0)
                    (*
                     (- 1.0 (cos (* (atan (* (tan (* 0.5 PI)) (/ z0 z3))) 2.0)))
                     1.0))
                   z1)
                  t_1))))
            double code(double z1, double z0, double z3, double z2) {
            	double t_0 = (z1 * (z0 * z0)) / ((1.0 - cos((-2.0 * atan(((z0 / z3) * tan((((double) M_PI) * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
            	double t_1 = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - cos((atan(((z0 / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0))));
            	double tmp;
            	if (t_0 <= -2e-312) {
            		tmp = t_1;
            	} else if (t_0 <= 1e-136) {
            		tmp = ((z0 * z0) / ((1.0 - cos((atan((tan((0.5 * ((double) M_PI))) * (z0 / z3))) * 2.0))) * 1.0)) * z1;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            public static double code(double z1, double z0, double z3, double z2) {
            	double t_0 = (z1 * (z0 * z0)) / ((1.0 - Math.cos((-2.0 * Math.atan(((z0 / z3) * Math.tan((Math.PI * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
            	double t_1 = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - Math.cos((Math.atan(((z0 / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0))));
            	double tmp;
            	if (t_0 <= -2e-312) {
            		tmp = t_1;
            	} else if (t_0 <= 1e-136) {
            		tmp = ((z0 * z0) / ((1.0 - Math.cos((Math.atan((Math.tan((0.5 * Math.PI)) * (z0 / z3))) * 2.0))) * 1.0)) * z1;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(z1, z0, z3, z2):
            	t_0 = (z1 * (z0 * z0)) / ((1.0 - math.cos((-2.0 * math.atan(((z0 / z3) * math.tan((math.pi * ((z2 + z2) - -0.5)))))))) * (1.0 - z1))
            	t_1 = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - math.cos((math.atan(((z0 / ((z3 * math.pi) * z2)) * -0.5)) * 2.0))))
            	tmp = 0
            	if t_0 <= -2e-312:
            		tmp = t_1
            	elif t_0 <= 1e-136:
            		tmp = ((z0 * z0) / ((1.0 - math.cos((math.atan((math.tan((0.5 * math.pi)) * (z0 / z3))) * 2.0))) * 1.0)) * z1
            	else:
            		tmp = t_1
            	return tmp
            
            function code(z1, z0, z3, z2)
            	t_0 = Float64(Float64(z1 * Float64(z0 * z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(Float64(z0 / z3) * tan(Float64(pi * Float64(Float64(z2 + z2) - -0.5)))))))) * Float64(1.0 - z1)))
            	t_1 = Float64(Float64(Float64(z1 * z0) / Float64(1.0 - z1)) * Float64(z0 / Float64(1.0 - cos(Float64(atan(Float64(Float64(z0 / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0)))))
            	tmp = 0.0
            	if (t_0 <= -2e-312)
            		tmp = t_1;
            	elseif (t_0 <= 1e-136)
            		tmp = Float64(Float64(Float64(z0 * z0) / Float64(Float64(1.0 - cos(Float64(atan(Float64(tan(Float64(0.5 * pi)) * Float64(z0 / z3))) * 2.0))) * 1.0)) * z1);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(z1, z0, z3, z2)
            	t_0 = (z1 * (z0 * z0)) / ((1.0 - cos((-2.0 * atan(((z0 / z3) * tan((pi * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
            	t_1 = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - cos((atan(((z0 / ((z3 * pi) * z2)) * -0.5)) * 2.0))));
            	tmp = 0.0;
            	if (t_0 <= -2e-312)
            		tmp = t_1;
            	elseif (t_0 <= 1e-136)
            		tmp = ((z0 * z0) / ((1.0 - cos((atan((tan((0.5 * pi)) * (z0 / z3))) * 2.0))) * 1.0)) * z1;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[(N[(z1 * N[(z0 * z0), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(N[(z0 / z3), $MachinePrecision] * N[Tan[N[(Pi * N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(z1 * z0), $MachinePrecision] / N[(1.0 - z1), $MachinePrecision]), $MachinePrecision] * N[(z0 / N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(z0 / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-312], t$95$1, If[LessEqual[t$95$0, 1e-136], N[(N[(N[(z0 * z0), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[Tan[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision] * N[(z0 / z3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision] * z1), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            t_0 := \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)}\\
            t_1 := \frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}\\
            \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-312}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t\_0 \leq 10^{-136}:\\
            \;\;\;\;\frac{z0 \cdot z0}{\left(1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)\right) \cdot 1} \cdot z1\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 (*.f64 z1 (*.f64 z0 z0)) (*.f64 (-.f64 #s(literal 1 binary64) (cos.f64 (*.f64 #s(literal -2 binary64) (atan.f64 (*.f64 (/.f64 z0 z3) (tan.f64 (*.f64 (PI.f64) (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64))))))))) (-.f64 #s(literal 1 binary64) z1))) < -2.0000000000018713e-312 or 1e-136 < (/.f64 (*.f64 z1 (*.f64 z0 z0)) (*.f64 (-.f64 #s(literal 1 binary64) (cos.f64 (*.f64 #s(literal -2 binary64) (atan.f64 (*.f64 (/.f64 z0 z3) (tan.f64 (*.f64 (PI.f64) (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64))))))))) (-.f64 #s(literal 1 binary64) z1)))

              1. Initial program 46.2%

                \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
              2. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                2. lift-/.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                3. lift-tan.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                4. tan-quotN/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                5. frac-timesN/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                6. *-commutativeN/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                7. lower-/.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
              3. Applied rewrites53.5%

                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
              4. Taylor expanded in z2 around 0

                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                2. lower-/.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                5. lower-PI.f6447.0%

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
              6. Applied rewrites47.0%

                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
              7. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                3. lift-*.f64N/A

                  \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                4. associate-*r*N/A

                  \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                5. lift-*.f64N/A

                  \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\color{blue}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                6. *-commutativeN/A

                  \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\color{blue}{\left(1 - z1\right) \cdot \left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right)}} \]
                7. times-fracN/A

                  \[\leadsto \color{blue}{\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)}} \]
              8. Applied rewrites54.6%

                \[\leadsto \color{blue}{\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}} \]

              if -2.0000000000018713e-312 < (/.f64 (*.f64 z1 (*.f64 z0 z0)) (*.f64 (-.f64 #s(literal 1 binary64) (cos.f64 (*.f64 #s(literal -2 binary64) (atan.f64 (*.f64 (/.f64 z0 z3) (tan.f64 (*.f64 (PI.f64) (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64))))))))) (-.f64 #s(literal 1 binary64) z1))) < 1e-136

              1. Initial program 46.2%

                \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
              2. Taylor expanded in z2 around 0

                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
              3. Step-by-step derivation
                1. Applied rewrites47.2%

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{0.5}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                2. Taylor expanded in z1 around 0

                  \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot 0.5\right)\right)\right)\right) \cdot \color{blue}{1}} \]
                3. Step-by-step derivation
                  1. Applied rewrites31.7%

                    \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot 0.5\right)\right)\right)\right) \cdot \color{blue}{1}} \]
                  2. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1}} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1} \]
                    3. associate-/l*N/A

                      \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1}} \]
                    4. *-commutativeN/A

                      \[\leadsto \color{blue}{\frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1} \cdot z1} \]
                    5. lower-*.f64N/A

                      \[\leadsto \color{blue}{\frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1} \cdot z1} \]
                  3. Applied rewrites31.8%

                    \[\leadsto \color{blue}{\frac{z0 \cdot z0}{\left(1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)\right) \cdot 1} \cdot z1} \]
                4. Recombined 2 regimes into one program.
                5. Add Preprocessing

                Alternative 9: 55.9% accurate, 0.3× speedup?

                \[\begin{array}{l} t_0 := \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)}\\ t_1 := \frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-312}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\left(z0 \cdot z1\right) \cdot \frac{z0}{\left(1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)\right) \cdot 1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                (FPCore (z1 z0 z3 z2)
                  :precision binary64
                  (let* ((t_0
                        (/
                         (* z1 (* z0 z0))
                         (*
                          (-
                           1.0
                           (cos
                            (*
                             -2.0
                             (atan (* (/ z0 z3) (tan (* PI (- (+ z2 z2) -0.5))))))))
                          (- 1.0 z1))))
                       (t_1
                        (*
                         (/ (* z1 z0) (- 1.0 z1))
                         (/
                          z0
                          (-
                           1.0
                           (cos (* (atan (* (/ z0 (* (* z3 PI) z2)) -0.5)) 2.0)))))))
                  (if (<= t_0 -2e-312)
                    t_1
                    (if (<= t_0 INFINITY)
                      (*
                       (* z0 z1)
                       (/
                        z0
                        (*
                         (- 1.0 (cos (* (atan (* (tan (* 0.5 PI)) (/ z0 z3))) 2.0)))
                         1.0)))
                      t_1))))
                double code(double z1, double z0, double z3, double z2) {
                	double t_0 = (z1 * (z0 * z0)) / ((1.0 - cos((-2.0 * atan(((z0 / z3) * tan((((double) M_PI) * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
                	double t_1 = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - cos((atan(((z0 / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0))));
                	double tmp;
                	if (t_0 <= -2e-312) {
                		tmp = t_1;
                	} else if (t_0 <= ((double) INFINITY)) {
                		tmp = (z0 * z1) * (z0 / ((1.0 - cos((atan((tan((0.5 * ((double) M_PI))) * (z0 / z3))) * 2.0))) * 1.0));
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                public static double code(double z1, double z0, double z3, double z2) {
                	double t_0 = (z1 * (z0 * z0)) / ((1.0 - Math.cos((-2.0 * Math.atan(((z0 / z3) * Math.tan((Math.PI * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
                	double t_1 = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - Math.cos((Math.atan(((z0 / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0))));
                	double tmp;
                	if (t_0 <= -2e-312) {
                		tmp = t_1;
                	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                		tmp = (z0 * z1) * (z0 / ((1.0 - Math.cos((Math.atan((Math.tan((0.5 * Math.PI)) * (z0 / z3))) * 2.0))) * 1.0));
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(z1, z0, z3, z2):
                	t_0 = (z1 * (z0 * z0)) / ((1.0 - math.cos((-2.0 * math.atan(((z0 / z3) * math.tan((math.pi * ((z2 + z2) - -0.5)))))))) * (1.0 - z1))
                	t_1 = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - math.cos((math.atan(((z0 / ((z3 * math.pi) * z2)) * -0.5)) * 2.0))))
                	tmp = 0
                	if t_0 <= -2e-312:
                		tmp = t_1
                	elif t_0 <= math.inf:
                		tmp = (z0 * z1) * (z0 / ((1.0 - math.cos((math.atan((math.tan((0.5 * math.pi)) * (z0 / z3))) * 2.0))) * 1.0))
                	else:
                		tmp = t_1
                	return tmp
                
                function code(z1, z0, z3, z2)
                	t_0 = Float64(Float64(z1 * Float64(z0 * z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(Float64(z0 / z3) * tan(Float64(pi * Float64(Float64(z2 + z2) - -0.5)))))))) * Float64(1.0 - z1)))
                	t_1 = Float64(Float64(Float64(z1 * z0) / Float64(1.0 - z1)) * Float64(z0 / Float64(1.0 - cos(Float64(atan(Float64(Float64(z0 / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0)))))
                	tmp = 0.0
                	if (t_0 <= -2e-312)
                		tmp = t_1;
                	elseif (t_0 <= Inf)
                		tmp = Float64(Float64(z0 * z1) * Float64(z0 / Float64(Float64(1.0 - cos(Float64(atan(Float64(tan(Float64(0.5 * pi)) * Float64(z0 / z3))) * 2.0))) * 1.0)));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                function tmp_2 = code(z1, z0, z3, z2)
                	t_0 = (z1 * (z0 * z0)) / ((1.0 - cos((-2.0 * atan(((z0 / z3) * tan((pi * ((z2 + z2) - -0.5)))))))) * (1.0 - z1));
                	t_1 = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - cos((atan(((z0 / ((z3 * pi) * z2)) * -0.5)) * 2.0))));
                	tmp = 0.0;
                	if (t_0 <= -2e-312)
                		tmp = t_1;
                	elseif (t_0 <= Inf)
                		tmp = (z0 * z1) * (z0 / ((1.0 - cos((atan((tan((0.5 * pi)) * (z0 / z3))) * 2.0))) * 1.0));
                	else
                		tmp = t_1;
                	end
                	tmp_2 = tmp;
                end
                
                code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[(N[(z1 * N[(z0 * z0), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(N[(z0 / z3), $MachinePrecision] * N[Tan[N[(Pi * N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(z1 * z0), $MachinePrecision] / N[(1.0 - z1), $MachinePrecision]), $MachinePrecision] * N[(z0 / N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(z0 / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-312], t$95$1, If[LessEqual[t$95$0, Infinity], N[(N[(z0 * z1), $MachinePrecision] * N[(z0 / N[(N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[Tan[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision] * N[(z0 / z3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                
                \begin{array}{l}
                t_0 := \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)}\\
                t_1 := \frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}\\
                \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-312}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;t\_0 \leq \infty:\\
                \;\;\;\;\left(z0 \cdot z1\right) \cdot \frac{z0}{\left(1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)\right) \cdot 1}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (/.f64 (*.f64 z1 (*.f64 z0 z0)) (*.f64 (-.f64 #s(literal 1 binary64) (cos.f64 (*.f64 #s(literal -2 binary64) (atan.f64 (*.f64 (/.f64 z0 z3) (tan.f64 (*.f64 (PI.f64) (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64))))))))) (-.f64 #s(literal 1 binary64) z1))) < -2.0000000000018713e-312 or +inf.0 < (/.f64 (*.f64 z1 (*.f64 z0 z0)) (*.f64 (-.f64 #s(literal 1 binary64) (cos.f64 (*.f64 #s(literal -2 binary64) (atan.f64 (*.f64 (/.f64 z0 z3) (tan.f64 (*.f64 (PI.f64) (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64))))))))) (-.f64 #s(literal 1 binary64) z1)))

                  1. Initial program 46.2%

                    \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                    2. lift-/.f64N/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    3. lift-tan.f64N/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    4. tan-quotN/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    5. frac-timesN/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                    6. *-commutativeN/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    7. lower-/.f64N/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                  3. Applied rewrites53.5%

                    \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                  4. Taylor expanded in z2 around 0

                    \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                  5. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    2. lower-/.f64N/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    5. lower-PI.f6447.0%

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                  6. Applied rewrites47.0%

                    \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                  7. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    3. lift-*.f64N/A

                      \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    4. associate-*r*N/A

                      \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    5. lift-*.f64N/A

                      \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\color{blue}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                    6. *-commutativeN/A

                      \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\color{blue}{\left(1 - z1\right) \cdot \left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right)}} \]
                    7. times-fracN/A

                      \[\leadsto \color{blue}{\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)}} \]
                  8. Applied rewrites54.6%

                    \[\leadsto \color{blue}{\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}} \]

                  if -2.0000000000018713e-312 < (/.f64 (*.f64 z1 (*.f64 z0 z0)) (*.f64 (-.f64 #s(literal 1 binary64) (cos.f64 (*.f64 #s(literal -2 binary64) (atan.f64 (*.f64 (/.f64 z0 z3) (tan.f64 (*.f64 (PI.f64) (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64))))))))) (-.f64 #s(literal 1 binary64) z1))) < +inf.0

                  1. Initial program 46.2%

                    \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                  2. Taylor expanded in z2 around 0

                    \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                  3. Step-by-step derivation
                    1. Applied rewrites47.2%

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \color{blue}{0.5}\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    2. Taylor expanded in z1 around 0

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot 0.5\right)\right)\right)\right) \cdot \color{blue}{1}} \]
                    3. Step-by-step derivation
                      1. Applied rewrites31.7%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot 0.5\right)\right)\right)\right) \cdot \color{blue}{1}} \]
                      2. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1}} \]
                        2. lift-*.f64N/A

                          \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1} \]
                        3. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1} \]
                        4. associate-*l*N/A

                          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1} \]
                        5. lift-*.f64N/A

                          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1} \]
                        6. associate-/l*N/A

                          \[\leadsto \color{blue}{\left(z1 \cdot z0\right) \cdot \frac{z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1}} \]
                        7. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(z1 \cdot z0\right) \cdot \frac{z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1}} \]
                        8. lift-*.f64N/A

                          \[\leadsto \color{blue}{\left(z1 \cdot z0\right)} \cdot \frac{z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1} \]
                        9. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(z0 \cdot z1\right)} \cdot \frac{z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1} \]
                        10. lift-*.f64N/A

                          \[\leadsto \color{blue}{\left(z0 \cdot z1\right)} \cdot \frac{z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \frac{1}{2}\right)\right)\right)\right) \cdot 1} \]
                        11. lower-/.f6436.4%

                          \[\leadsto \left(z0 \cdot z1\right) \cdot \color{blue}{\frac{z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot 0.5\right)\right)\right)\right) \cdot 1}} \]
                      3. Applied rewrites36.4%

                        \[\leadsto \color{blue}{\left(z0 \cdot z1\right) \cdot \frac{z0}{\left(1 - \cos \left(\tan^{-1} \left(\tan \left(0.5 \cdot \pi\right) \cdot \frac{z0}{z3}\right) \cdot 2\right)\right) \cdot 1}} \]
                    4. Recombined 2 regimes into one program.
                    5. Add Preprocessing

                    Alternative 10: 55.7% accurate, 1.0× speedup?

                    \[\begin{array}{l} t_0 := \left(z2 + z2\right) - -0.5\\ \mathbf{if}\;\pi \cdot t\_0 \leq 5 \cdot 10^{+206}:\\ \;\;\;\;\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z0 \cdot z0}{\cos \left(\tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(t\_0 \cdot \pi\right)\right) \cdot -2\right) - 1}\\ \end{array} \]
                    (FPCore (z1 z0 z3 z2)
                      :precision binary64
                      (let* ((t_0 (- (+ z2 z2) -0.5)))
                      (if (<= (* PI t_0) 5e+206)
                        (*
                         (/ (* z1 z0) (- 1.0 z1))
                         (/
                          z0
                          (- 1.0 (cos (* (atan (* (/ z0 (* (* z3 PI) z2)) -0.5)) 2.0)))))
                        (/
                         (* z0 z0)
                         (- (cos (* (atan (* (/ z0 z3) (tan (* t_0 PI)))) -2.0)) 1.0)))))
                    double code(double z1, double z0, double z3, double z2) {
                    	double t_0 = (z2 + z2) - -0.5;
                    	double tmp;
                    	if ((((double) M_PI) * t_0) <= 5e+206) {
                    		tmp = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - cos((atan(((z0 / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0))));
                    	} else {
                    		tmp = (z0 * z0) / (cos((atan(((z0 / z3) * tan((t_0 * ((double) M_PI))))) * -2.0)) - 1.0);
                    	}
                    	return tmp;
                    }
                    
                    public static double code(double z1, double z0, double z3, double z2) {
                    	double t_0 = (z2 + z2) - -0.5;
                    	double tmp;
                    	if ((Math.PI * t_0) <= 5e+206) {
                    		tmp = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - Math.cos((Math.atan(((z0 / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0))));
                    	} else {
                    		tmp = (z0 * z0) / (Math.cos((Math.atan(((z0 / z3) * Math.tan((t_0 * Math.PI)))) * -2.0)) - 1.0);
                    	}
                    	return tmp;
                    }
                    
                    def code(z1, z0, z3, z2):
                    	t_0 = (z2 + z2) - -0.5
                    	tmp = 0
                    	if (math.pi * t_0) <= 5e+206:
                    		tmp = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - math.cos((math.atan(((z0 / ((z3 * math.pi) * z2)) * -0.5)) * 2.0))))
                    	else:
                    		tmp = (z0 * z0) / (math.cos((math.atan(((z0 / z3) * math.tan((t_0 * math.pi)))) * -2.0)) - 1.0)
                    	return tmp
                    
                    function code(z1, z0, z3, z2)
                    	t_0 = Float64(Float64(z2 + z2) - -0.5)
                    	tmp = 0.0
                    	if (Float64(pi * t_0) <= 5e+206)
                    		tmp = Float64(Float64(Float64(z1 * z0) / Float64(1.0 - z1)) * Float64(z0 / Float64(1.0 - cos(Float64(atan(Float64(Float64(z0 / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0)))));
                    	else
                    		tmp = Float64(Float64(z0 * z0) / Float64(cos(Float64(atan(Float64(Float64(z0 / z3) * tan(Float64(t_0 * pi)))) * -2.0)) - 1.0));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(z1, z0, z3, z2)
                    	t_0 = (z2 + z2) - -0.5;
                    	tmp = 0.0;
                    	if ((pi * t_0) <= 5e+206)
                    		tmp = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - cos((atan(((z0 / ((z3 * pi) * z2)) * -0.5)) * 2.0))));
                    	else
                    		tmp = (z0 * z0) / (cos((atan(((z0 / z3) * tan((t_0 * pi)))) * -2.0)) - 1.0);
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]}, If[LessEqual[N[(Pi * t$95$0), $MachinePrecision], 5e+206], N[(N[(N[(z1 * z0), $MachinePrecision] / N[(1.0 - z1), $MachinePrecision]), $MachinePrecision] * N[(z0 / N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(z0 / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z0 * z0), $MachinePrecision] / N[(N[Cos[N[(N[ArcTan[N[(N[(z0 / z3), $MachinePrecision] * N[Tan[N[(t$95$0 * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    t_0 := \left(z2 + z2\right) - -0.5\\
                    \mathbf{if}\;\pi \cdot t\_0 \leq 5 \cdot 10^{+206}:\\
                    \;\;\;\;\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{z0 \cdot z0}{\cos \left(\tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(t\_0 \cdot \pi\right)\right) \cdot -2\right) - 1}\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (*.f64 (PI.f64) (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64))) < 5.0000000000000002e206

                      1. Initial program 46.2%

                        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      2. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lift-tan.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. tan-quotN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. frac-timesN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        6. *-commutativeN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        7. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      3. Applied rewrites53.5%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      4. Taylor expanded in z2 around 0

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      5. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. lower-PI.f6447.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      6. Applied rewrites47.0%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      7. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        2. lift-*.f64N/A

                          \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. associate-*r*N/A

                          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. lift-*.f64N/A

                          \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\color{blue}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        6. *-commutativeN/A

                          \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\color{blue}{\left(1 - z1\right) \cdot \left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right)}} \]
                        7. times-fracN/A

                          \[\leadsto \color{blue}{\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)}} \]
                      8. Applied rewrites54.6%

                        \[\leadsto \color{blue}{\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}} \]

                      if 5.0000000000000002e206 < (*.f64 (PI.f64) (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)))

                      1. Initial program 46.2%

                        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      2. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lift-tan.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. tan-quotN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. frac-timesN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        6. *-commutativeN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        7. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      3. Applied rewrites53.5%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      4. Taylor expanded in z1 around inf

                        \[\leadsto \color{blue}{-1 \cdot \frac{{z0}^{2}}{1 - \cos \left(-2 \cdot \tan^{-1} \left(-1 \cdot \frac{z0 \cdot \cos \left(2 \cdot \left(z2 \cdot \pi\right)\right)}{z3 \cdot \sin \left(2 \cdot \left(z2 \cdot \pi\right)\right)}\right)\right)}} \]
                      5. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\frac{{z0}^{2}}{1 - \cos \left(-2 \cdot \tan^{-1} \left(-1 \cdot \frac{z0 \cdot \cos \left(2 \cdot \left(z2 \cdot \mathsf{PI}\left(\right)\right)\right)}{z3 \cdot \sin \left(2 \cdot \left(z2 \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)}} \]
                        2. lower-/.f64N/A

                          \[\leadsto -1 \cdot \frac{{z0}^{2}}{\color{blue}{1 - \cos \left(-2 \cdot \tan^{-1} \left(-1 \cdot \frac{z0 \cdot \cos \left(2 \cdot \left(z2 \cdot \mathsf{PI}\left(\right)\right)\right)}{z3 \cdot \sin \left(2 \cdot \left(z2 \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)}} \]
                        3. lower-pow.f64N/A

                          \[\leadsto -1 \cdot \frac{{z0}^{2}}{\color{blue}{1} - \cos \left(-2 \cdot \tan^{-1} \left(-1 \cdot \frac{z0 \cdot \cos \left(2 \cdot \left(z2 \cdot \mathsf{PI}\left(\right)\right)\right)}{z3 \cdot \sin \left(2 \cdot \left(z2 \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)} \]
                        4. lower--.f64N/A

                          \[\leadsto -1 \cdot \frac{{z0}^{2}}{1 - \color{blue}{\cos \left(-2 \cdot \tan^{-1} \left(-1 \cdot \frac{z0 \cdot \cos \left(2 \cdot \left(z2 \cdot \mathsf{PI}\left(\right)\right)\right)}{z3 \cdot \sin \left(2 \cdot \left(z2 \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)}} \]
                        5. lower-cos.f64N/A

                          \[\leadsto -1 \cdot \frac{{z0}^{2}}{1 - \cos \left(-2 \cdot \tan^{-1} \left(-1 \cdot \frac{z0 \cdot \cos \left(2 \cdot \left(z2 \cdot \mathsf{PI}\left(\right)\right)\right)}{z3 \cdot \sin \left(2 \cdot \left(z2 \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)} \]
                      6. Applied rewrites38.9%

                        \[\leadsto \color{blue}{-1 \cdot \frac{{z0}^{2}}{1 - \cos \left(-2 \cdot \tan^{-1} \left(-1 \cdot \frac{z0 \cdot \cos \left(2 \cdot \left(z2 \cdot \pi\right)\right)}{z3 \cdot \sin \left(2 \cdot \left(z2 \cdot \pi\right)\right)}\right)\right)}} \]
                      7. Applied rewrites31.5%

                        \[\leadsto \frac{z0 \cdot z0}{\color{blue}{\cos \left(\tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right) \cdot -2\right) - 1}} \]
                    3. Recombined 2 regimes into one program.
                    4. Add Preprocessing

                    Alternative 11: 55.7% accurate, 1.3× speedup?

                    \[\begin{array}{l} t_0 := \frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{\left|z0\right|}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}\\ \mathbf{if}\;\left|z0\right| \leq 5 \cdot 10^{-30}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\left|z0\right| \leq 3.7 \cdot 10^{+153}:\\ \;\;\;\;z1 \cdot \frac{\left|z0\right| \cdot \left|z0\right|}{\left(1 - \cos \left(\tan^{-1} \left(\frac{\left|z0\right|}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right) \cdot \left(1 - z1\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                    (FPCore (z1 z0 z3 z2)
                      :precision binary64
                      (let* ((t_0
                            (/
                             (* (* z1 (fabs z0)) (fabs z0))
                             (*
                              (-
                               1.0
                               (cos
                                (* -2.0 (atan (* -0.5 (/ (fabs z0) (* z2 (* z3 PI))))))))
                              (- 1.0 z1)))))
                      (if (<= (fabs z0) 5e-30)
                        t_0
                        (if (<= (fabs z0) 3.7e+153)
                          (*
                           z1
                           (/
                            (* (fabs z0) (fabs z0))
                            (*
                             (-
                              1.0
                              (cos
                               (* (atan (* (/ (fabs z0) (* (* z3 PI) z2)) -0.5)) 2.0)))
                             (- 1.0 z1))))
                          t_0))))
                    double code(double z1, double z0, double z3, double z2) {
                    	double t_0 = ((z1 * fabs(z0)) * fabs(z0)) / ((1.0 - cos((-2.0 * atan((-0.5 * (fabs(z0) / (z2 * (z3 * ((double) M_PI))))))))) * (1.0 - z1));
                    	double tmp;
                    	if (fabs(z0) <= 5e-30) {
                    		tmp = t_0;
                    	} else if (fabs(z0) <= 3.7e+153) {
                    		tmp = z1 * ((fabs(z0) * fabs(z0)) / ((1.0 - cos((atan(((fabs(z0) / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0))) * (1.0 - z1)));
                    	} else {
                    		tmp = t_0;
                    	}
                    	return tmp;
                    }
                    
                    public static double code(double z1, double z0, double z3, double z2) {
                    	double t_0 = ((z1 * Math.abs(z0)) * Math.abs(z0)) / ((1.0 - Math.cos((-2.0 * Math.atan((-0.5 * (Math.abs(z0) / (z2 * (z3 * Math.PI)))))))) * (1.0 - z1));
                    	double tmp;
                    	if (Math.abs(z0) <= 5e-30) {
                    		tmp = t_0;
                    	} else if (Math.abs(z0) <= 3.7e+153) {
                    		tmp = z1 * ((Math.abs(z0) * Math.abs(z0)) / ((1.0 - Math.cos((Math.atan(((Math.abs(z0) / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0))) * (1.0 - z1)));
                    	} else {
                    		tmp = t_0;
                    	}
                    	return tmp;
                    }
                    
                    def code(z1, z0, z3, z2):
                    	t_0 = ((z1 * math.fabs(z0)) * math.fabs(z0)) / ((1.0 - math.cos((-2.0 * math.atan((-0.5 * (math.fabs(z0) / (z2 * (z3 * math.pi)))))))) * (1.0 - z1))
                    	tmp = 0
                    	if math.fabs(z0) <= 5e-30:
                    		tmp = t_0
                    	elif math.fabs(z0) <= 3.7e+153:
                    		tmp = z1 * ((math.fabs(z0) * math.fabs(z0)) / ((1.0 - math.cos((math.atan(((math.fabs(z0) / ((z3 * math.pi) * z2)) * -0.5)) * 2.0))) * (1.0 - z1)))
                    	else:
                    		tmp = t_0
                    	return tmp
                    
                    function code(z1, z0, z3, z2)
                    	t_0 = Float64(Float64(Float64(z1 * abs(z0)) * abs(z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(-0.5 * Float64(abs(z0) / Float64(z2 * Float64(z3 * pi)))))))) * Float64(1.0 - z1)))
                    	tmp = 0.0
                    	if (abs(z0) <= 5e-30)
                    		tmp = t_0;
                    	elseif (abs(z0) <= 3.7e+153)
                    		tmp = Float64(z1 * Float64(Float64(abs(z0) * abs(z0)) / Float64(Float64(1.0 - cos(Float64(atan(Float64(Float64(abs(z0) / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0))) * Float64(1.0 - z1))));
                    	else
                    		tmp = t_0;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(z1, z0, z3, z2)
                    	t_0 = ((z1 * abs(z0)) * abs(z0)) / ((1.0 - cos((-2.0 * atan((-0.5 * (abs(z0) / (z2 * (z3 * pi)))))))) * (1.0 - z1));
                    	tmp = 0.0;
                    	if (abs(z0) <= 5e-30)
                    		tmp = t_0;
                    	elseif (abs(z0) <= 3.7e+153)
                    		tmp = z1 * ((abs(z0) * abs(z0)) / ((1.0 - cos((atan(((abs(z0) / ((z3 * pi) * z2)) * -0.5)) * 2.0))) * (1.0 - z1)));
                    	else
                    		tmp = t_0;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[(N[(N[(z1 * N[Abs[z0], $MachinePrecision]), $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(-0.5 * N[(N[Abs[z0], $MachinePrecision] / N[(z2 * N[(z3 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[z0], $MachinePrecision], 5e-30], t$95$0, If[LessEqual[N[Abs[z0], $MachinePrecision], 3.7e+153], N[(z1 * N[(N[(N[Abs[z0], $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(N[Abs[z0], $MachinePrecision] / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                    
                    \begin{array}{l}
                    t_0 := \frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{\left|z0\right|}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}\\
                    \mathbf{if}\;\left|z0\right| \leq 5 \cdot 10^{-30}:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;\left|z0\right| \leq 3.7 \cdot 10^{+153}:\\
                    \;\;\;\;z1 \cdot \frac{\left|z0\right| \cdot \left|z0\right|}{\left(1 - \cos \left(\tan^{-1} \left(\frac{\left|z0\right|}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right) \cdot \left(1 - z1\right)}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_0\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z0 < 4.9999999999999997e-30 or 3.7000000000000002e153 < z0

                      1. Initial program 46.2%

                        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      2. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lift-tan.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. tan-quotN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. frac-timesN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        6. *-commutativeN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        7. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      3. Applied rewrites53.5%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      4. Taylor expanded in z2 around 0

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      5. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. lower-PI.f6447.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      6. Applied rewrites47.0%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      7. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. associate-*r*N/A

                          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. lower-*.f64N/A

                          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. lower-*.f6452.0%

                          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      8. Applied rewrites52.0%

                        \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]

                      if 4.9999999999999997e-30 < z0 < 3.7000000000000002e153

                      1. Initial program 46.2%

                        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      2. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lift-tan.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. tan-quotN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. frac-timesN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        6. *-commutativeN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        7. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      3. Applied rewrites53.5%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      4. Taylor expanded in z2 around 0

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      5. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. lower-PI.f6447.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      6. Applied rewrites47.0%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      7. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        2. lift-*.f64N/A

                          \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. associate-/l*N/A

                          \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        4. lower-*.f64N/A

                          \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        5. lower-/.f6448.9%

                          \[\leadsto z1 \cdot \color{blue}{\frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                      8. Applied rewrites48.9%

                        \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right) \cdot \left(1 - z1\right)}} \]
                    3. Recombined 2 regimes into one program.
                    4. Add Preprocessing

                    Alternative 12: 54.8% accurate, 1.3× speedup?

                    \[\begin{array}{l} \mathbf{if}\;\left|z0\right| \leq 3.7 \cdot 10^{+153}:\\ \;\;\;\;\frac{\left|z0\right| \cdot \left|z0\right|}{1 - \cos \left(\tan^{-1} \left(\frac{\left|z0\right|}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)} \cdot \frac{z1}{1 - z1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{\left|z0\right|}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}\\ \end{array} \]
                    (FPCore (z1 z0 z3 z2)
                      :precision binary64
                      (if (<= (fabs z0) 3.7e+153)
                      (*
                       (/
                        (* (fabs z0) (fabs z0))
                        (-
                         1.0
                         (cos (* (atan (* (/ (fabs z0) (* (* z3 PI) z2)) -0.5)) 2.0))))
                       (/ z1 (- 1.0 z1)))
                      (/
                       (* (* z1 (fabs z0)) (fabs z0))
                       (*
                        (-
                         1.0
                         (cos (* -2.0 (atan (* -0.5 (/ (fabs z0) (* z2 (* z3 PI))))))))
                        (- 1.0 z1)))))
                    double code(double z1, double z0, double z3, double z2) {
                    	double tmp;
                    	if (fabs(z0) <= 3.7e+153) {
                    		tmp = ((fabs(z0) * fabs(z0)) / (1.0 - cos((atan(((fabs(z0) / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0)))) * (z1 / (1.0 - z1));
                    	} else {
                    		tmp = ((z1 * fabs(z0)) * fabs(z0)) / ((1.0 - cos((-2.0 * atan((-0.5 * (fabs(z0) / (z2 * (z3 * ((double) M_PI))))))))) * (1.0 - z1));
                    	}
                    	return tmp;
                    }
                    
                    public static double code(double z1, double z0, double z3, double z2) {
                    	double tmp;
                    	if (Math.abs(z0) <= 3.7e+153) {
                    		tmp = ((Math.abs(z0) * Math.abs(z0)) / (1.0 - Math.cos((Math.atan(((Math.abs(z0) / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0)))) * (z1 / (1.0 - z1));
                    	} else {
                    		tmp = ((z1 * Math.abs(z0)) * Math.abs(z0)) / ((1.0 - Math.cos((-2.0 * Math.atan((-0.5 * (Math.abs(z0) / (z2 * (z3 * Math.PI)))))))) * (1.0 - z1));
                    	}
                    	return tmp;
                    }
                    
                    def code(z1, z0, z3, z2):
                    	tmp = 0
                    	if math.fabs(z0) <= 3.7e+153:
                    		tmp = ((math.fabs(z0) * math.fabs(z0)) / (1.0 - math.cos((math.atan(((math.fabs(z0) / ((z3 * math.pi) * z2)) * -0.5)) * 2.0)))) * (z1 / (1.0 - z1))
                    	else:
                    		tmp = ((z1 * math.fabs(z0)) * math.fabs(z0)) / ((1.0 - math.cos((-2.0 * math.atan((-0.5 * (math.fabs(z0) / (z2 * (z3 * math.pi)))))))) * (1.0 - z1))
                    	return tmp
                    
                    function code(z1, z0, z3, z2)
                    	tmp = 0.0
                    	if (abs(z0) <= 3.7e+153)
                    		tmp = Float64(Float64(Float64(abs(z0) * abs(z0)) / Float64(1.0 - cos(Float64(atan(Float64(Float64(abs(z0) / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0)))) * Float64(z1 / Float64(1.0 - z1)));
                    	else
                    		tmp = Float64(Float64(Float64(z1 * abs(z0)) * abs(z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(-0.5 * Float64(abs(z0) / Float64(z2 * Float64(z3 * pi)))))))) * Float64(1.0 - z1)));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(z1, z0, z3, z2)
                    	tmp = 0.0;
                    	if (abs(z0) <= 3.7e+153)
                    		tmp = ((abs(z0) * abs(z0)) / (1.0 - cos((atan(((abs(z0) / ((z3 * pi) * z2)) * -0.5)) * 2.0)))) * (z1 / (1.0 - z1));
                    	else
                    		tmp = ((z1 * abs(z0)) * abs(z0)) / ((1.0 - cos((-2.0 * atan((-0.5 * (abs(z0) / (z2 * (z3 * pi)))))))) * (1.0 - z1));
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[z1_, z0_, z3_, z2_] := If[LessEqual[N[Abs[z0], $MachinePrecision], 3.7e+153], N[(N[(N[(N[Abs[z0], $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(N[Abs[z0], $MachinePrecision] / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z1 / N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z1 * N[Abs[z0], $MachinePrecision]), $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(-0.5 * N[(N[Abs[z0], $MachinePrecision] / N[(z2 * N[(z3 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                    
                    \begin{array}{l}
                    \mathbf{if}\;\left|z0\right| \leq 3.7 \cdot 10^{+153}:\\
                    \;\;\;\;\frac{\left|z0\right| \cdot \left|z0\right|}{1 - \cos \left(\tan^{-1} \left(\frac{\left|z0\right|}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)} \cdot \frac{z1}{1 - z1}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{\left(z1 \cdot \left|z0\right|\right) \cdot \left|z0\right|}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{\left|z0\right|}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z0 < 3.7000000000000002e153

                      1. Initial program 46.2%

                        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      2. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lift-tan.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. tan-quotN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. frac-timesN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        6. *-commutativeN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        7. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      3. Applied rewrites53.5%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      4. Taylor expanded in z2 around 0

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      5. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. lower-PI.f6447.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      6. Applied rewrites47.0%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      7. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        2. lift-*.f64N/A

                          \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. *-commutativeN/A

                          \[\leadsto \frac{\color{blue}{\left(z0 \cdot z0\right) \cdot z1}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. lift-*.f64N/A

                          \[\leadsto \frac{\left(z0 \cdot z0\right) \cdot z1}{\color{blue}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        5. times-fracN/A

                          \[\leadsto \color{blue}{\frac{z0 \cdot z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)} \cdot \frac{z1}{1 - z1}} \]
                        6. lower-*.f64N/A

                          \[\leadsto \color{blue}{\frac{z0 \cdot z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)} \cdot \frac{z1}{1 - z1}} \]
                      8. Applied rewrites51.0%

                        \[\leadsto \color{blue}{\frac{z0 \cdot z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)} \cdot \frac{z1}{1 - z1}} \]

                      if 3.7000000000000002e153 < z0

                      1. Initial program 46.2%

                        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      2. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lift-tan.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. tan-quotN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. frac-timesN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        6. *-commutativeN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        7. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      3. Applied rewrites53.5%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      4. Taylor expanded in z2 around 0

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      5. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. lower-PI.f6447.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      6. Applied rewrites47.0%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      7. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. associate-*r*N/A

                          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. lower-*.f64N/A

                          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. lower-*.f6452.0%

                          \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      8. Applied rewrites52.0%

                        \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    3. Recombined 2 regimes into one program.
                    4. Add Preprocessing

                    Alternative 13: 54.6% accurate, 1.4× speedup?

                    \[\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)} \]
                    (FPCore (z1 z0 z3 z2)
                      :precision binary64
                      (*
                     (/ (* z1 z0) (- 1.0 z1))
                     (/ z0 (- 1.0 (cos (* (atan (* (/ z0 (* (* z3 PI) z2)) -0.5)) 2.0))))))
                    double code(double z1, double z0, double z3, double z2) {
                    	return ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - cos((atan(((z0 / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0))));
                    }
                    
                    public static double code(double z1, double z0, double z3, double z2) {
                    	return ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - Math.cos((Math.atan(((z0 / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0))));
                    }
                    
                    def code(z1, z0, z3, z2):
                    	return ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - math.cos((math.atan(((z0 / ((z3 * math.pi) * z2)) * -0.5)) * 2.0))))
                    
                    function code(z1, z0, z3, z2)
                    	return Float64(Float64(Float64(z1 * z0) / Float64(1.0 - z1)) * Float64(z0 / Float64(1.0 - cos(Float64(atan(Float64(Float64(z0 / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0)))))
                    end
                    
                    function tmp = code(z1, z0, z3, z2)
                    	tmp = ((z1 * z0) / (1.0 - z1)) * (z0 / (1.0 - cos((atan(((z0 / ((z3 * pi) * z2)) * -0.5)) * 2.0))));
                    end
                    
                    code[z1_, z0_, z3_, z2_] := N[(N[(N[(z1 * z0), $MachinePrecision] / N[(1.0 - z1), $MachinePrecision]), $MachinePrecision] * N[(z0 / N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(z0 / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                    
                    \frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}
                    
                    Derivation
                    1. Initial program 46.2%

                      \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    2. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      2. lift-/.f64N/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      3. lift-tan.f64N/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      4. tan-quotN/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      5. frac-timesN/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      6. *-commutativeN/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      7. lower-/.f64N/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                    3. Applied rewrites53.5%

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                    4. Taylor expanded in z2 around 0

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                    5. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      2. lower-/.f64N/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      3. lower-*.f64N/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      4. lower-*.f64N/A

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      5. lower-PI.f6447.0%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                    6. Applied rewrites47.0%

                      \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                    7. Step-by-step derivation
                      1. lift-/.f64N/A

                        \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      3. lift-*.f64N/A

                        \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      4. associate-*r*N/A

                        \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      5. lift-*.f64N/A

                        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\color{blue}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                      6. *-commutativeN/A

                        \[\leadsto \frac{\left(z1 \cdot z0\right) \cdot z0}{\color{blue}{\left(1 - z1\right) \cdot \left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right)}} \]
                      7. times-fracN/A

                        \[\leadsto \color{blue}{\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)}} \]
                    8. Applied rewrites54.6%

                      \[\leadsto \color{blue}{\frac{z1 \cdot z0}{1 - z1} \cdot \frac{z0}{1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)}} \]
                    9. Add Preprocessing

                    Alternative 14: 52.9% accurate, 1.3× speedup?

                    \[\begin{array}{l} t_0 := 1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\\ \mathbf{if}\;z1 \leq -6.8 \cdot 10^{-29}:\\ \;\;\;\;z1 \cdot \frac{z0 \cdot z0}{t\_0 \cdot \left(1 - z1\right)}\\ \mathbf{elif}\;z1 \leq 2.15 \cdot 10^{+17}:\\ \;\;\;\;z0 \cdot \frac{z0 \cdot z1}{1 \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}\\ \end{array} \]
                    (FPCore (z1 z0 z3 z2)
                      :precision binary64
                      (let* ((t_0
                            (-
                             1.0
                             (cos (* (atan (* (/ z0 (* (* z3 PI) z2)) -0.5)) 2.0)))))
                      (if (<= z1 -6.8e-29)
                        (* z1 (/ (* z0 z0) (* t_0 (- 1.0 z1))))
                        (if (<= z1 2.15e+17)
                          (* z0 (/ (* z0 z1) (* 1.0 t_0)))
                          (/
                           (* z1 (* z0 z0))
                           (*
                            (- 1.0 (cos (* -2.0 (atan (* -0.5 (/ z0 (* z2 (* z3 PI))))))))
                            (- 1.0 z1)))))))
                    double code(double z1, double z0, double z3, double z2) {
                    	double t_0 = 1.0 - cos((atan(((z0 / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0));
                    	double tmp;
                    	if (z1 <= -6.8e-29) {
                    		tmp = z1 * ((z0 * z0) / (t_0 * (1.0 - z1)));
                    	} else if (z1 <= 2.15e+17) {
                    		tmp = z0 * ((z0 * z1) / (1.0 * t_0));
                    	} else {
                    		tmp = (z1 * (z0 * z0)) / ((1.0 - cos((-2.0 * atan((-0.5 * (z0 / (z2 * (z3 * ((double) M_PI))))))))) * (1.0 - z1));
                    	}
                    	return tmp;
                    }
                    
                    public static double code(double z1, double z0, double z3, double z2) {
                    	double t_0 = 1.0 - Math.cos((Math.atan(((z0 / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0));
                    	double tmp;
                    	if (z1 <= -6.8e-29) {
                    		tmp = z1 * ((z0 * z0) / (t_0 * (1.0 - z1)));
                    	} else if (z1 <= 2.15e+17) {
                    		tmp = z0 * ((z0 * z1) / (1.0 * t_0));
                    	} else {
                    		tmp = (z1 * (z0 * z0)) / ((1.0 - Math.cos((-2.0 * Math.atan((-0.5 * (z0 / (z2 * (z3 * Math.PI)))))))) * (1.0 - z1));
                    	}
                    	return tmp;
                    }
                    
                    def code(z1, z0, z3, z2):
                    	t_0 = 1.0 - math.cos((math.atan(((z0 / ((z3 * math.pi) * z2)) * -0.5)) * 2.0))
                    	tmp = 0
                    	if z1 <= -6.8e-29:
                    		tmp = z1 * ((z0 * z0) / (t_0 * (1.0 - z1)))
                    	elif z1 <= 2.15e+17:
                    		tmp = z0 * ((z0 * z1) / (1.0 * t_0))
                    	else:
                    		tmp = (z1 * (z0 * z0)) / ((1.0 - math.cos((-2.0 * math.atan((-0.5 * (z0 / (z2 * (z3 * math.pi)))))))) * (1.0 - z1))
                    	return tmp
                    
                    function code(z1, z0, z3, z2)
                    	t_0 = Float64(1.0 - cos(Float64(atan(Float64(Float64(z0 / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0)))
                    	tmp = 0.0
                    	if (z1 <= -6.8e-29)
                    		tmp = Float64(z1 * Float64(Float64(z0 * z0) / Float64(t_0 * Float64(1.0 - z1))));
                    	elseif (z1 <= 2.15e+17)
                    		tmp = Float64(z0 * Float64(Float64(z0 * z1) / Float64(1.0 * t_0)));
                    	else
                    		tmp = Float64(Float64(z1 * Float64(z0 * z0)) / Float64(Float64(1.0 - cos(Float64(-2.0 * atan(Float64(-0.5 * Float64(z0 / Float64(z2 * Float64(z3 * pi)))))))) * Float64(1.0 - z1)));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(z1, z0, z3, z2)
                    	t_0 = 1.0 - cos((atan(((z0 / ((z3 * pi) * z2)) * -0.5)) * 2.0));
                    	tmp = 0.0;
                    	if (z1 <= -6.8e-29)
                    		tmp = z1 * ((z0 * z0) / (t_0 * (1.0 - z1)));
                    	elseif (z1 <= 2.15e+17)
                    		tmp = z0 * ((z0 * z1) / (1.0 * t_0));
                    	else
                    		tmp = (z1 * (z0 * z0)) / ((1.0 - cos((-2.0 * atan((-0.5 * (z0 / (z2 * (z3 * pi)))))))) * (1.0 - z1));
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(z0 / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z1, -6.8e-29], N[(z1 * N[(N[(z0 * z0), $MachinePrecision] / N[(t$95$0 * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z1, 2.15e+17], N[(z0 * N[(N[(z0 * z1), $MachinePrecision] / N[(1.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z1 * N[(z0 * z0), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 - N[Cos[N[(-2.0 * N[ArcTan[N[(-0.5 * N[(z0 / N[(z2 * N[(z3 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    t_0 := 1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\\
                    \mathbf{if}\;z1 \leq -6.8 \cdot 10^{-29}:\\
                    \;\;\;\;z1 \cdot \frac{z0 \cdot z0}{t\_0 \cdot \left(1 - z1\right)}\\
                    
                    \mathbf{elif}\;z1 \leq 2.15 \cdot 10^{+17}:\\
                    \;\;\;\;z0 \cdot \frac{z0 \cdot z1}{1 \cdot t\_0}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if z1 < -6.7999999999999994e-29

                      1. Initial program 46.2%

                        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      2. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lift-tan.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. tan-quotN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. frac-timesN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        6. *-commutativeN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        7. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      3. Applied rewrites53.5%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      4. Taylor expanded in z2 around 0

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      5. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. lower-PI.f6447.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      6. Applied rewrites47.0%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      7. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        2. lift-*.f64N/A

                          \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. associate-/l*N/A

                          \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        4. lower-*.f64N/A

                          \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        5. lower-/.f6448.9%

                          \[\leadsto z1 \cdot \color{blue}{\frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                      8. Applied rewrites48.9%

                        \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right) \cdot \left(1 - z1\right)}} \]

                      if -6.7999999999999994e-29 < z1 < 2.15e17

                      1. Initial program 46.2%

                        \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      2. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lift-tan.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. tan-quotN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. frac-timesN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        6. *-commutativeN/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        7. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      3. Applied rewrites53.5%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      4. Taylor expanded in z2 around 0

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      5. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. lower-/.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        3. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        4. lower-*.f64N/A

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        5. lower-PI.f6447.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                      6. Applied rewrites47.0%

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      7. Taylor expanded in z1 around 0

                        \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \color{blue}{1}} \]
                      8. Step-by-step derivation
                        1. Applied rewrites32.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \color{blue}{1}} \]
                        2. Step-by-step derivation
                          1. lift-/.f64N/A

                            \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                          2. lift-*.f64N/A

                            \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                          3. lift-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                          4. associate-*l*N/A

                            \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                          5. lift-*.f64N/A

                            \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                          6. *-commutativeN/A

                            \[\leadsto \frac{\color{blue}{z0 \cdot \left(z1 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                          7. associate-/l*N/A

                            \[\leadsto \color{blue}{z0 \cdot \frac{z1 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                          8. lower-*.f64N/A

                            \[\leadsto \color{blue}{z0 \cdot \frac{z1 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                        3. Applied rewrites36.2%

                          \[\leadsto \color{blue}{z0 \cdot \frac{z0 \cdot z1}{1 \cdot \left(1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right)}} \]

                        if 2.15e17 < z1

                        1. Initial program 46.2%

                          \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                          2. lift-/.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          3. lift-tan.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          4. tan-quotN/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          5. frac-timesN/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                          6. *-commutativeN/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          7. lower-/.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        3. Applied rewrites53.5%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        4. Taylor expanded in z2 around 0

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        5. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          2. lower-/.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          3. lower-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          4. lower-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          5. lower-PI.f6447.0%

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        6. Applied rewrites47.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                      9. Recombined 3 regimes into one program.
                      10. Add Preprocessing

                      Alternative 15: 51.8% accurate, 1.3× speedup?

                      \[\begin{array}{l} t_0 := 1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\\ t_1 := z1 \cdot \frac{z0 \cdot z0}{t\_0 \cdot \left(1 - z1\right)}\\ \mathbf{if}\;z1 \leq -6.8 \cdot 10^{-29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z1 \leq 2.15 \cdot 10^{+17}:\\ \;\;\;\;z0 \cdot \frac{z0 \cdot z1}{1 \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                      (FPCore (z1 z0 z3 z2)
                        :precision binary64
                        (let* ((t_0
                              (- 1.0 (cos (* (atan (* (/ z0 (* (* z3 PI) z2)) -0.5)) 2.0))))
                             (t_1 (* z1 (/ (* z0 z0) (* t_0 (- 1.0 z1))))))
                        (if (<= z1 -6.8e-29)
                          t_1
                          (if (<= z1 2.15e+17) (* z0 (/ (* z0 z1) (* 1.0 t_0))) t_1))))
                      double code(double z1, double z0, double z3, double z2) {
                      	double t_0 = 1.0 - cos((atan(((z0 / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0));
                      	double t_1 = z1 * ((z0 * z0) / (t_0 * (1.0 - z1)));
                      	double tmp;
                      	if (z1 <= -6.8e-29) {
                      		tmp = t_1;
                      	} else if (z1 <= 2.15e+17) {
                      		tmp = z0 * ((z0 * z1) / (1.0 * t_0));
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      public static double code(double z1, double z0, double z3, double z2) {
                      	double t_0 = 1.0 - Math.cos((Math.atan(((z0 / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0));
                      	double t_1 = z1 * ((z0 * z0) / (t_0 * (1.0 - z1)));
                      	double tmp;
                      	if (z1 <= -6.8e-29) {
                      		tmp = t_1;
                      	} else if (z1 <= 2.15e+17) {
                      		tmp = z0 * ((z0 * z1) / (1.0 * t_0));
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      def code(z1, z0, z3, z2):
                      	t_0 = 1.0 - math.cos((math.atan(((z0 / ((z3 * math.pi) * z2)) * -0.5)) * 2.0))
                      	t_1 = z1 * ((z0 * z0) / (t_0 * (1.0 - z1)))
                      	tmp = 0
                      	if z1 <= -6.8e-29:
                      		tmp = t_1
                      	elif z1 <= 2.15e+17:
                      		tmp = z0 * ((z0 * z1) / (1.0 * t_0))
                      	else:
                      		tmp = t_1
                      	return tmp
                      
                      function code(z1, z0, z3, z2)
                      	t_0 = Float64(1.0 - cos(Float64(atan(Float64(Float64(z0 / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0)))
                      	t_1 = Float64(z1 * Float64(Float64(z0 * z0) / Float64(t_0 * Float64(1.0 - z1))))
                      	tmp = 0.0
                      	if (z1 <= -6.8e-29)
                      		tmp = t_1;
                      	elseif (z1 <= 2.15e+17)
                      		tmp = Float64(z0 * Float64(Float64(z0 * z1) / Float64(1.0 * t_0)));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(z1, z0, z3, z2)
                      	t_0 = 1.0 - cos((atan(((z0 / ((z3 * pi) * z2)) * -0.5)) * 2.0));
                      	t_1 = z1 * ((z0 * z0) / (t_0 * (1.0 - z1)));
                      	tmp = 0.0;
                      	if (z1 <= -6.8e-29)
                      		tmp = t_1;
                      	elseif (z1 <= 2.15e+17)
                      		tmp = z0 * ((z0 * z1) / (1.0 * t_0));
                      	else
                      		tmp = t_1;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(z0 / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z1 * N[(N[(z0 * z0), $MachinePrecision] / N[(t$95$0 * N[(1.0 - z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z1, -6.8e-29], t$95$1, If[LessEqual[z1, 2.15e+17], N[(z0 * N[(N[(z0 * z1), $MachinePrecision] / N[(1.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                      
                      \begin{array}{l}
                      t_0 := 1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\\
                      t_1 := z1 \cdot \frac{z0 \cdot z0}{t\_0 \cdot \left(1 - z1\right)}\\
                      \mathbf{if}\;z1 \leq -6.8 \cdot 10^{-29}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;z1 \leq 2.15 \cdot 10^{+17}:\\
                      \;\;\;\;z0 \cdot \frac{z0 \cdot z1}{1 \cdot t\_0}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if z1 < -6.7999999999999994e-29 or 2.15e17 < z1

                        1. Initial program 46.2%

                          \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                          2. lift-/.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          3. lift-tan.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          4. tan-quotN/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          5. frac-timesN/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                          6. *-commutativeN/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          7. lower-/.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        3. Applied rewrites53.5%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        4. Taylor expanded in z2 around 0

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        5. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          2. lower-/.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          3. lower-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          4. lower-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          5. lower-PI.f6447.0%

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        6. Applied rewrites47.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        7. Step-by-step derivation
                          1. lift-/.f64N/A

                            \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                          2. lift-*.f64N/A

                            \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          3. associate-/l*N/A

                            \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                          4. lower-*.f64N/A

                            \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                          5. lower-/.f6448.9%

                            \[\leadsto z1 \cdot \color{blue}{\frac{z0 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)}} \]
                        8. Applied rewrites48.9%

                          \[\leadsto \color{blue}{z1 \cdot \frac{z0 \cdot z0}{\left(1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right) \cdot \left(1 - z1\right)}} \]

                        if -6.7999999999999994e-29 < z1 < 2.15e17

                        1. Initial program 46.2%

                          \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        2. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                          2. lift-/.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          3. lift-tan.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          4. tan-quotN/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          5. frac-timesN/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                          6. *-commutativeN/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          7. lower-/.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        3. Applied rewrites53.5%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        4. Taylor expanded in z2 around 0

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        5. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          2. lower-/.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          3. lower-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          4. lower-*.f64N/A

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          5. lower-PI.f6447.0%

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                        6. Applied rewrites47.0%

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                        7. Taylor expanded in z1 around 0

                          \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \color{blue}{1}} \]
                        8. Step-by-step derivation
                          1. Applied rewrites32.0%

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \color{blue}{1}} \]
                          2. Step-by-step derivation
                            1. lift-/.f64N/A

                              \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                            2. lift-*.f64N/A

                              \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                            3. lift-*.f64N/A

                              \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                            4. associate-*l*N/A

                              \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                            5. lift-*.f64N/A

                              \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                            6. *-commutativeN/A

                              \[\leadsto \frac{\color{blue}{z0 \cdot \left(z1 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                            7. associate-/l*N/A

                              \[\leadsto \color{blue}{z0 \cdot \frac{z1 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                            8. lower-*.f64N/A

                              \[\leadsto \color{blue}{z0 \cdot \frac{z1 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                          3. Applied rewrites36.2%

                            \[\leadsto \color{blue}{z0 \cdot \frac{z0 \cdot z1}{1 \cdot \left(1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right)}} \]
                        9. Recombined 2 regimes into one program.
                        10. Add Preprocessing

                        Alternative 16: 38.2% accurate, 1.4× speedup?

                        \[\begin{array}{l} t_0 := \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\\ \mathbf{if}\;z1 \leq 2.45 \cdot 10^{+17}:\\ \;\;\;\;z0 \cdot \frac{z0 \cdot z1}{1 \cdot \left(1 - t\_0\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\left(-z0\right) \cdot z0\right) \cdot z1}{\left(t\_0 - 1\right) \cdot 1}\\ \end{array} \]
                        (FPCore (z1 z0 z3 z2)
                          :precision binary64
                          (let* ((t_0 (cos (* (atan (* (/ z0 (* (* z3 PI) z2)) -0.5)) 2.0))))
                          (if (<= z1 2.45e+17)
                            (* z0 (/ (* z0 z1) (* 1.0 (- 1.0 t_0))))
                            (/ (* (* (- z0) z0) z1) (* (- t_0 1.0) 1.0)))))
                        double code(double z1, double z0, double z3, double z2) {
                        	double t_0 = cos((atan(((z0 / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0));
                        	double tmp;
                        	if (z1 <= 2.45e+17) {
                        		tmp = z0 * ((z0 * z1) / (1.0 * (1.0 - t_0)));
                        	} else {
                        		tmp = ((-z0 * z0) * z1) / ((t_0 - 1.0) * 1.0);
                        	}
                        	return tmp;
                        }
                        
                        public static double code(double z1, double z0, double z3, double z2) {
                        	double t_0 = Math.cos((Math.atan(((z0 / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0));
                        	double tmp;
                        	if (z1 <= 2.45e+17) {
                        		tmp = z0 * ((z0 * z1) / (1.0 * (1.0 - t_0)));
                        	} else {
                        		tmp = ((-z0 * z0) * z1) / ((t_0 - 1.0) * 1.0);
                        	}
                        	return tmp;
                        }
                        
                        def code(z1, z0, z3, z2):
                        	t_0 = math.cos((math.atan(((z0 / ((z3 * math.pi) * z2)) * -0.5)) * 2.0))
                        	tmp = 0
                        	if z1 <= 2.45e+17:
                        		tmp = z0 * ((z0 * z1) / (1.0 * (1.0 - t_0)))
                        	else:
                        		tmp = ((-z0 * z0) * z1) / ((t_0 - 1.0) * 1.0)
                        	return tmp
                        
                        function code(z1, z0, z3, z2)
                        	t_0 = cos(Float64(atan(Float64(Float64(z0 / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0))
                        	tmp = 0.0
                        	if (z1 <= 2.45e+17)
                        		tmp = Float64(z0 * Float64(Float64(z0 * z1) / Float64(1.0 * Float64(1.0 - t_0))));
                        	else
                        		tmp = Float64(Float64(Float64(Float64(-z0) * z0) * z1) / Float64(Float64(t_0 - 1.0) * 1.0));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(z1, z0, z3, z2)
                        	t_0 = cos((atan(((z0 / ((z3 * pi) * z2)) * -0.5)) * 2.0));
                        	tmp = 0.0;
                        	if (z1 <= 2.45e+17)
                        		tmp = z0 * ((z0 * z1) / (1.0 * (1.0 - t_0)));
                        	else
                        		tmp = ((-z0 * z0) * z1) / ((t_0 - 1.0) * 1.0);
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[z1_, z0_, z3_, z2_] := Block[{t$95$0 = N[Cos[N[(N[ArcTan[N[(N[(z0 / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z1, 2.45e+17], N[(z0 * N[(N[(z0 * z1), $MachinePrecision] / N[(1.0 * N[(1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-z0) * z0), $MachinePrecision] * z1), $MachinePrecision] / N[(N[(t$95$0 - 1.0), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        t_0 := \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\\
                        \mathbf{if}\;z1 \leq 2.45 \cdot 10^{+17}:\\
                        \;\;\;\;z0 \cdot \frac{z0 \cdot z1}{1 \cdot \left(1 - t\_0\right)}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{\left(\left(-z0\right) \cdot z0\right) \cdot z1}{\left(t\_0 - 1\right) \cdot 1}\\
                        
                        
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if z1 < 2.45e17

                          1. Initial program 46.2%

                            \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          2. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                            2. lift-/.f64N/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            3. lift-tan.f64N/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            4. tan-quotN/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            5. frac-timesN/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                            6. *-commutativeN/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            7. lower-/.f64N/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                          3. Applied rewrites53.5%

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                          4. Taylor expanded in z2 around 0

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                          5. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            2. lower-/.f64N/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            3. lower-*.f64N/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            4. lower-*.f64N/A

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            5. lower-PI.f6447.0%

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                          6. Applied rewrites47.0%

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                          7. Taylor expanded in z1 around 0

                            \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \color{blue}{1}} \]
                          8. Step-by-step derivation
                            1. Applied rewrites32.0%

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \color{blue}{1}} \]
                            2. Step-by-step derivation
                              1. lift-/.f64N/A

                                \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                              2. lift-*.f64N/A

                                \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                              3. lift-*.f64N/A

                                \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                              4. associate-*l*N/A

                                \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                              5. lift-*.f64N/A

                                \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                              6. *-commutativeN/A

                                \[\leadsto \frac{\color{blue}{z0 \cdot \left(z1 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                              7. associate-/l*N/A

                                \[\leadsto \color{blue}{z0 \cdot \frac{z1 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                              8. lower-*.f64N/A

                                \[\leadsto \color{blue}{z0 \cdot \frac{z1 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                            3. Applied rewrites36.2%

                              \[\leadsto \color{blue}{z0 \cdot \frac{z0 \cdot z1}{1 \cdot \left(1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right)}} \]

                            if 2.45e17 < z1

                            1. Initial program 46.2%

                              \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            2. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                              2. lift-/.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              3. lift-tan.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              4. tan-quotN/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              5. frac-timesN/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                              6. *-commutativeN/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              7. lower-/.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                            3. Applied rewrites53.5%

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                            4. Taylor expanded in z2 around 0

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                            5. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              2. lower-/.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              3. lower-*.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              4. lower-*.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              5. lower-PI.f6447.0%

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            6. Applied rewrites47.0%

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                            7. Taylor expanded in z1 around 0

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \color{blue}{1}} \]
                            8. Step-by-step derivation
                              1. Applied rewrites32.0%

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \color{blue}{1}} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                                2. frac-2negN/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(z1 \cdot \left(z0 \cdot z0\right)\right)}{\mathsf{neg}\left(\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1\right)}} \]
                                3. lower-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(z1 \cdot \left(z0 \cdot z0\right)\right)}{\mathsf{neg}\left(\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1\right)}} \]
                              3. Applied rewrites30.3%

                                \[\leadsto \color{blue}{\frac{\left(\left(-z0\right) \cdot z0\right) \cdot z1}{\left(\cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right) - 1\right) \cdot 1}} \]
                            9. Recombined 2 regimes into one program.
                            10. Add Preprocessing

                            Alternative 17: 36.2% accurate, 1.4× speedup?

                            \[z0 \cdot \frac{z0 \cdot z1}{1 \cdot \left(1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right)} \]
                            (FPCore (z1 z0 z3 z2)
                              :precision binary64
                              (*
                             z0
                             (/
                              (* z0 z1)
                              (*
                               1.0
                               (- 1.0 (cos (* (atan (* (/ z0 (* (* z3 PI) z2)) -0.5)) 2.0)))))))
                            double code(double z1, double z0, double z3, double z2) {
                            	return z0 * ((z0 * z1) / (1.0 * (1.0 - cos((atan(((z0 / ((z3 * ((double) M_PI)) * z2)) * -0.5)) * 2.0)))));
                            }
                            
                            public static double code(double z1, double z0, double z3, double z2) {
                            	return z0 * ((z0 * z1) / (1.0 * (1.0 - Math.cos((Math.atan(((z0 / ((z3 * Math.PI) * z2)) * -0.5)) * 2.0)))));
                            }
                            
                            def code(z1, z0, z3, z2):
                            	return z0 * ((z0 * z1) / (1.0 * (1.0 - math.cos((math.atan(((z0 / ((z3 * math.pi) * z2)) * -0.5)) * 2.0)))))
                            
                            function code(z1, z0, z3, z2)
                            	return Float64(z0 * Float64(Float64(z0 * z1) / Float64(1.0 * Float64(1.0 - cos(Float64(atan(Float64(Float64(z0 / Float64(Float64(z3 * pi) * z2)) * -0.5)) * 2.0))))))
                            end
                            
                            function tmp = code(z1, z0, z3, z2)
                            	tmp = z0 * ((z0 * z1) / (1.0 * (1.0 - cos((atan(((z0 / ((z3 * pi) * z2)) * -0.5)) * 2.0)))));
                            end
                            
                            code[z1_, z0_, z3_, z2_] := N[(z0 * N[(N[(z0 * z1), $MachinePrecision] / N[(1.0 * N[(1.0 - N[Cos[N[(N[ArcTan[N[(N[(z0 / N[(N[(z3 * Pi), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                            
                            z0 \cdot \frac{z0 \cdot z1}{1 \cdot \left(1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right)}
                            
                            Derivation
                            1. Initial program 46.2%

                              \[\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            2. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0}{z3} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                              2. lift-/.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\color{blue}{\frac{z0}{z3}} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              3. lift-tan.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              4. tan-quotN/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0}{z3} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              5. frac-timesN/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{z3 \cdot \cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                              6. *-commutativeN/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\color{blue}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              7. lower-/.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{z0 \cdot \sin \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}{\cos \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                            3. Applied rewrites53.5%

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{\cos \left(\left(z2 + z2\right) \cdot \pi\right) \cdot z0}{\left(-\sin \left(\left(z2 + z2\right) \cdot \pi\right)\right) \cdot z3}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                            4. Taylor expanded in z2 around 0

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                            5. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \color{blue}{\frac{z0}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              2. lower-/.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{\color{blue}{z2 \cdot \left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              3. lower-*.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \color{blue}{\left(z3 \cdot \mathsf{PI}\left(\right)\right)}}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              4. lower-*.f64N/A

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                              5. lower-PI.f6447.0%

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \left(1 - z1\right)} \]
                            6. Applied rewrites47.0%

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)}\right)\right) \cdot \left(1 - z1\right)} \]
                            7. Taylor expanded in z1 around 0

                              \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \color{blue}{1}} \]
                            8. Step-by-step derivation
                              1. Applied rewrites32.0%

                                \[\leadsto \frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(-0.5 \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot \color{blue}{1}} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{z1 \cdot \left(z0 \cdot z0\right)}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                                2. lift-*.f64N/A

                                  \[\leadsto \frac{\color{blue}{z1 \cdot \left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                                3. lift-*.f64N/A

                                  \[\leadsto \frac{z1 \cdot \color{blue}{\left(z0 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                                4. associate-*l*N/A

                                  \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right) \cdot z0}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                                5. lift-*.f64N/A

                                  \[\leadsto \frac{\color{blue}{\left(z1 \cdot z0\right)} \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                                6. *-commutativeN/A

                                  \[\leadsto \frac{\color{blue}{z0 \cdot \left(z1 \cdot z0\right)}}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1} \]
                                7. associate-/l*N/A

                                  \[\leadsto \color{blue}{z0 \cdot \frac{z1 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                                8. lower-*.f64N/A

                                  \[\leadsto \color{blue}{z0 \cdot \frac{z1 \cdot z0}{\left(1 - \cos \left(-2 \cdot \tan^{-1} \left(\frac{-1}{2} \cdot \frac{z0}{z2 \cdot \left(z3 \cdot \pi\right)}\right)\right)\right) \cdot 1}} \]
                              3. Applied rewrites36.2%

                                \[\leadsto \color{blue}{z0 \cdot \frac{z0 \cdot z1}{1 \cdot \left(1 - \cos \left(\tan^{-1} \left(\frac{z0}{\left(z3 \cdot \pi\right) \cdot z2} \cdot -0.5\right) \cdot 2\right)\right)}} \]
                              4. Add Preprocessing

                              Reproduce

                              ?
                              herbie shell --seed 2025250 
                              (FPCore (z1 z0 z3 z2)
                                :name "(/ (* z1 (* z0 z0)) (* (- 1 (cos (* -2 (atan (* (/ z0 z3) (tan (* PI (- (+ z2 z2) -1/2)))))))) (- 1 z1)))"
                                :precision binary64
                                (/ (* z1 (* z0 z0)) (* (- 1.0 (cos (* -2.0 (atan (* (/ z0 z3) (tan (* PI (- (+ z2 z2) -0.5)))))))) (- 1.0 z1))))