(/ 1 (sqrt (- (pow (* (tan (* (- (+ z2 z2) -1/2) PI)) (/ z0 z1)) 2) -1)))

Percentage Accurate: 44.5% → 74.5%
Time: 11.8s
Alternatives: 23
Speedup: 1.0×

Specification

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

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

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

Alternative 1: 74.5% accurate, 0.1× speedup?

\[\begin{array}{l} t_0 := \tan \left(0.5 \cdot \pi\right)\\ t_1 := t\_0 \cdot t\_0\\ t_2 := 2 \cdot \left(\pi + t\_1 \cdot \pi\right)\\ t_3 := \left(z2 + z2\right) - -0.5\\ t_4 := \left(-1.3333333333333333 \cdot \left(\pi \cdot \pi\right)\right) \cdot \pi\\ t_5 := \frac{\left|z0\right|}{\left|z1\right|}\\ \mathbf{if}\;\tan \left(t\_3 \cdot \pi\right) \cdot t\_5 \leq 50000:\\ \;\;\;\;\frac{1}{\sqrt{{\left(\frac{\left|z0\right| \cdot \left(\left(\left(\left(\pi + \pi\right) \cdot \left(t\_2 \cdot t\_0\right) + \left(t\_4 - \left(\left(\left(-2 \cdot \left(\pi \cdot \pi\right)\right) \cdot t\_2 - t\_4 \cdot t\_1\right) + \left(-4 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(t\_2 \cdot t\_1\right)\right)\right) \cdot z2\right) \cdot z2 + t\_2\right) \cdot z2 - \tan \left(\pi \cdot -0.5\right)\right)}{\left|z1\right|}\right)}^{2} - -1}}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\left(-\tan^{-1} \left(\tan \left(\pi \cdot t\_3\right) \cdot t\_5\right)\right) + 0.5 \cdot \pi\right)\\ \end{array} \]
(FPCore (z2 z0 z1)
  :precision binary64
  (let* ((t_0 (tan (* 0.5 PI)))
       (t_1 (* t_0 t_0))
       (t_2 (* 2.0 (+ PI (* t_1 PI))))
       (t_3 (- (+ z2 z2) -0.5))
       (t_4 (* (* -1.3333333333333333 (* PI PI)) PI))
       (t_5 (/ (fabs z0) (fabs z1))))
  (if (<= (* (tan (* t_3 PI)) t_5) 50000.0)
    (/
     1.0
     (sqrt
      (-
       (pow
        (/
         (*
          (fabs z0)
          (-
           (*
            (+
             (*
              (+
               (* (+ PI PI) (* t_2 t_0))
               (*
                (-
                 t_4
                 (+
                  (- (* (* -2.0 (* PI PI)) t_2) (* t_4 t_1))
                  (* (* -4.0 (* PI PI)) (* t_2 t_1))))
                z2))
              z2)
             t_2)
            z2)
           (tan (* PI -0.5))))
         (fabs z1))
        2.0)
       -1.0)))
    (sin (+ (- (atan (* (tan (* PI t_3)) t_5))) (* 0.5 PI))))))
double code(double z2, double z0, double z1) {
	double t_0 = tan((0.5 * ((double) M_PI)));
	double t_1 = t_0 * t_0;
	double t_2 = 2.0 * (((double) M_PI) + (t_1 * ((double) M_PI)));
	double t_3 = (z2 + z2) - -0.5;
	double t_4 = (-1.3333333333333333 * (((double) M_PI) * ((double) M_PI))) * ((double) M_PI);
	double t_5 = fabs(z0) / fabs(z1);
	double tmp;
	if ((tan((t_3 * ((double) M_PI))) * t_5) <= 50000.0) {
		tmp = 1.0 / sqrt((pow(((fabs(z0) * (((((((((double) M_PI) + ((double) M_PI)) * (t_2 * t_0)) + ((t_4 - ((((-2.0 * (((double) M_PI) * ((double) M_PI))) * t_2) - (t_4 * t_1)) + ((-4.0 * (((double) M_PI) * ((double) M_PI))) * (t_2 * t_1)))) * z2)) * z2) + t_2) * z2) - tan((((double) M_PI) * -0.5)))) / fabs(z1)), 2.0) - -1.0));
	} else {
		tmp = sin((-atan((tan((((double) M_PI) * t_3)) * t_5)) + (0.5 * ((double) M_PI))));
	}
	return tmp;
}
public static double code(double z2, double z0, double z1) {
	double t_0 = Math.tan((0.5 * Math.PI));
	double t_1 = t_0 * t_0;
	double t_2 = 2.0 * (Math.PI + (t_1 * Math.PI));
	double t_3 = (z2 + z2) - -0.5;
	double t_4 = (-1.3333333333333333 * (Math.PI * Math.PI)) * Math.PI;
	double t_5 = Math.abs(z0) / Math.abs(z1);
	double tmp;
	if ((Math.tan((t_3 * Math.PI)) * t_5) <= 50000.0) {
		tmp = 1.0 / Math.sqrt((Math.pow(((Math.abs(z0) * (((((((Math.PI + Math.PI) * (t_2 * t_0)) + ((t_4 - ((((-2.0 * (Math.PI * Math.PI)) * t_2) - (t_4 * t_1)) + ((-4.0 * (Math.PI * Math.PI)) * (t_2 * t_1)))) * z2)) * z2) + t_2) * z2) - Math.tan((Math.PI * -0.5)))) / Math.abs(z1)), 2.0) - -1.0));
	} else {
		tmp = Math.sin((-Math.atan((Math.tan((Math.PI * t_3)) * t_5)) + (0.5 * Math.PI)));
	}
	return tmp;
}
def code(z2, z0, z1):
	t_0 = math.tan((0.5 * math.pi))
	t_1 = t_0 * t_0
	t_2 = 2.0 * (math.pi + (t_1 * math.pi))
	t_3 = (z2 + z2) - -0.5
	t_4 = (-1.3333333333333333 * (math.pi * math.pi)) * math.pi
	t_5 = math.fabs(z0) / math.fabs(z1)
	tmp = 0
	if (math.tan((t_3 * math.pi)) * t_5) <= 50000.0:
		tmp = 1.0 / math.sqrt((math.pow(((math.fabs(z0) * (((((((math.pi + math.pi) * (t_2 * t_0)) + ((t_4 - ((((-2.0 * (math.pi * math.pi)) * t_2) - (t_4 * t_1)) + ((-4.0 * (math.pi * math.pi)) * (t_2 * t_1)))) * z2)) * z2) + t_2) * z2) - math.tan((math.pi * -0.5)))) / math.fabs(z1)), 2.0) - -1.0))
	else:
		tmp = math.sin((-math.atan((math.tan((math.pi * t_3)) * t_5)) + (0.5 * math.pi)))
	return tmp
function code(z2, z0, z1)
	t_0 = tan(Float64(0.5 * pi))
	t_1 = Float64(t_0 * t_0)
	t_2 = Float64(2.0 * Float64(pi + Float64(t_1 * pi)))
	t_3 = Float64(Float64(z2 + z2) - -0.5)
	t_4 = Float64(Float64(-1.3333333333333333 * Float64(pi * pi)) * pi)
	t_5 = Float64(abs(z0) / abs(z1))
	tmp = 0.0
	if (Float64(tan(Float64(t_3 * pi)) * t_5) <= 50000.0)
		tmp = Float64(1.0 / sqrt(Float64((Float64(Float64(abs(z0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(pi + pi) * Float64(t_2 * t_0)) + Float64(Float64(t_4 - Float64(Float64(Float64(Float64(-2.0 * Float64(pi * pi)) * t_2) - Float64(t_4 * t_1)) + Float64(Float64(-4.0 * Float64(pi * pi)) * Float64(t_2 * t_1)))) * z2)) * z2) + t_2) * z2) - tan(Float64(pi * -0.5)))) / abs(z1)) ^ 2.0) - -1.0)));
	else
		tmp = sin(Float64(Float64(-atan(Float64(tan(Float64(pi * t_3)) * t_5))) + Float64(0.5 * pi)));
	end
	return tmp
end
function tmp_2 = code(z2, z0, z1)
	t_0 = tan((0.5 * pi));
	t_1 = t_0 * t_0;
	t_2 = 2.0 * (pi + (t_1 * pi));
	t_3 = (z2 + z2) - -0.5;
	t_4 = (-1.3333333333333333 * (pi * pi)) * pi;
	t_5 = abs(z0) / abs(z1);
	tmp = 0.0;
	if ((tan((t_3 * pi)) * t_5) <= 50000.0)
		tmp = 1.0 / sqrt(((((abs(z0) * (((((((pi + pi) * (t_2 * t_0)) + ((t_4 - ((((-2.0 * (pi * pi)) * t_2) - (t_4 * t_1)) + ((-4.0 * (pi * pi)) * (t_2 * t_1)))) * z2)) * z2) + t_2) * z2) - tan((pi * -0.5)))) / abs(z1)) ^ 2.0) - -1.0));
	else
		tmp = sin((-atan((tan((pi * t_3)) * t_5)) + (0.5 * pi)));
	end
	tmp_2 = tmp;
end
code[z2_, z0_, z1_] := Block[{t$95$0 = N[Tan[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(Pi + N[(t$95$1 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]}, Block[{t$95$4 = N[(N[(-1.3333333333333333 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$5 = N[(N[Abs[z0], $MachinePrecision] / N[Abs[z1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Tan[N[(t$95$3 * Pi), $MachinePrecision]], $MachinePrecision] * t$95$5), $MachinePrecision], 50000.0], N[(1.0 / N[Sqrt[N[(N[Power[N[(N[(N[Abs[z0], $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(Pi + Pi), $MachinePrecision] * N[(t$95$2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 - N[(N[(N[(N[(-2.0 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(t$95$4 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(-4.0 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision] + t$95$2), $MachinePrecision] * z2), $MachinePrecision] - N[Tan[N[(Pi * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Abs[z1], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sin[N[((-N[ArcTan[N[(N[Tan[N[(Pi * t$95$3), $MachinePrecision]], $MachinePrecision] * t$95$5), $MachinePrecision]], $MachinePrecision]) + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := \tan \left(0.5 \cdot \pi\right)\\
t_1 := t\_0 \cdot t\_0\\
t_2 := 2 \cdot \left(\pi + t\_1 \cdot \pi\right)\\
t_3 := \left(z2 + z2\right) - -0.5\\
t_4 := \left(-1.3333333333333333 \cdot \left(\pi \cdot \pi\right)\right) \cdot \pi\\
t_5 := \frac{\left|z0\right|}{\left|z1\right|}\\
\mathbf{if}\;\tan \left(t\_3 \cdot \pi\right) \cdot t\_5 \leq 50000:\\
\;\;\;\;\frac{1}{\sqrt{{\left(\frac{\left|z0\right| \cdot \left(\left(\left(\left(\pi + \pi\right) \cdot \left(t\_2 \cdot t\_0\right) + \left(t\_4 - \left(\left(\left(-2 \cdot \left(\pi \cdot \pi\right)\right) \cdot t\_2 - t\_4 \cdot t\_1\right) + \left(-4 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(t\_2 \cdot t\_1\right)\right)\right) \cdot z2\right) \cdot z2 + t\_2\right) \cdot z2 - \tan \left(\pi \cdot -0.5\right)\right)}{\left|z1\right|}\right)}^{2} - -1}}\\

\mathbf{else}:\\
\;\;\;\;\sin \left(\left(-\tan^{-1} \left(\tan \left(\pi \cdot t\_3\right) \cdot t\_5\right)\right) + 0.5 \cdot \pi\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (tan.f64 (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64))) (/.f64 z0 z1)) < 5e4

    1. Initial program 44.5%

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

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

      \[\leadsto \frac{1}{\sqrt{{\left(\color{blue}{\left(z2 \cdot \left(\left(2 \cdot \pi + z2 \cdot \left(z2 \cdot \left(-1.3333333333333333 \cdot {\pi}^{3} - \left(-4 \cdot \frac{{\pi}^{2} \cdot \left({\sin \left(0.5 \cdot \pi\right)}^{2} \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{{\cos \left(0.5 \cdot \pi\right)}^{2}} + \left(-2 \cdot \left({\pi}^{2} \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right) + 1.3333333333333333 \cdot \frac{{\pi}^{3} \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)\right) - -2 \cdot \frac{\pi \cdot \left(\sin \left(0.5 \cdot \pi\right) \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{\cos \left(0.5 \cdot \pi\right)}\right)\right) - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right) + \frac{\sin \left(0.5 \cdot \pi\right)}{\cos \left(0.5 \cdot \pi\right)}\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
    4. Applied rewrites72.9%

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

    if 5e4 < (*.f64 (tan.f64 (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64))) (/.f64 z0 z1))

    1. Initial program 44.5%

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

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

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

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

        \[\leadsto \frac{1}{\sqrt{\color{blue}{{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} + \left(\mathsf{neg}\left(-1\right)\right)}}} \]
      5. metadata-evalN/A

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

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

        \[\leadsto \frac{1}{\sqrt{1 + \color{blue}{{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2}}}} \]
      8. unpow2N/A

        \[\leadsto \frac{1}{\sqrt{1 + \color{blue}{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}}} \]
      9. cos-atan-revN/A

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

        \[\leadsto \color{blue}{\cos \tan^{-1} \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)} \]
      11. lower-atan.f6419.0%

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

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

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

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

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

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

        \[\leadsto \sin \left(\left(\mathsf{neg}\left(\tan^{-1} \left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) + \frac{\color{blue}{\pi}}{2}\right) \]
      6. mult-flipN/A

        \[\leadsto \sin \left(\left(\mathsf{neg}\left(\tan^{-1} \left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) + \color{blue}{\pi \cdot \frac{1}{2}}\right) \]
      7. metadata-evalN/A

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

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

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

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

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

Alternative 2: 71.3% accurate, 0.2× speedup?

\[\begin{array}{l} t_0 := \sin \left(0.5 \cdot \pi\right)\\ t_1 := \tan \left(\pi \cdot -0.5\right)\\ t_2 := {t\_1}^{2} - -1\\ t_3 := \cos \left(0.5 \cdot \pi\right)\\ t_4 := 2 \cdot \pi - -2 \cdot \frac{\pi \cdot {t\_0}^{2}}{{t\_3}^{2}}\\ \mathbf{if}\;z2 \leq -7.2 \cdot 10^{+15}:\\ \;\;\;\;\frac{1}{\sqrt{{\left(\frac{\left(\left(\left(\left(\pi \cdot \left(t\_2 \cdot \left(\pi \cdot t\_1\right)\right)\right) \cdot 4\right) \cdot z2 + t\_2 \cdot \left(\pi + \pi\right)\right) \cdot z2 - t\_1\right) \cdot z0}{z1}\right)}^{2} - -1}}\\ \mathbf{elif}\;z2 \leq 3.3 \cdot 10^{-6}:\\ \;\;\;\;\frac{1}{\sqrt{\left(\left({\tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)}^{2} \cdot \frac{z0}{z1}\right) \cdot \frac{1}{z1}\right) \cdot z0 - -1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\frac{\frac{{\left(z2 \cdot \left(2 \cdot \frac{z0 \cdot \left(z2 \cdot \left(\pi \cdot \left(t\_0 \cdot t\_4\right)\right)\right)}{t\_3} + z0 \cdot t\_4\right) + \frac{z0 \cdot t\_0}{t\_3}\right)}^{2}}{z1}}{z1} - -1}}\\ \end{array} \]
(FPCore (z2 z0 z1)
  :precision binary64
  (let* ((t_0 (sin (* 0.5 PI)))
       (t_1 (tan (* PI -0.5)))
       (t_2 (- (pow t_1 2.0) -1.0))
       (t_3 (cos (* 0.5 PI)))
       (t_4
        (-
         (* 2.0 PI)
         (* -2.0 (/ (* PI (pow t_0 2.0)) (pow t_3 2.0))))))
  (if (<= z2 -7.2e+15)
    (/
     1.0
     (sqrt
      (-
       (pow
        (/
         (*
          (-
           (*
            (+
             (* (* (* PI (* t_2 (* PI t_1))) 4.0) z2)
             (* t_2 (+ PI PI)))
            z2)
           t_1)
          z0)
         z1)
        2.0)
       -1.0)))
    (if (<= z2 3.3e-6)
      (/
       1.0
       (sqrt
        (-
         (*
          (*
           (* (pow (tan (* PI (- (+ z2 z2) -0.5))) 2.0) (/ z0 z1))
           (/ 1.0 z1))
          z0)
         -1.0)))
      (/
       1.0
       (sqrt
        (-
         (/
          (/
           (pow
            (+
             (*
              z2
              (+
               (* 2.0 (/ (* z0 (* z2 (* PI (* t_0 t_4)))) t_3))
               (* z0 t_4)))
             (/ (* z0 t_0) t_3))
            2.0)
           z1)
          z1)
         -1.0)))))))
double code(double z2, double z0, double z1) {
	double t_0 = sin((0.5 * ((double) M_PI)));
	double t_1 = tan((((double) M_PI) * -0.5));
	double t_2 = pow(t_1, 2.0) - -1.0;
	double t_3 = cos((0.5 * ((double) M_PI)));
	double t_4 = (2.0 * ((double) M_PI)) - (-2.0 * ((((double) M_PI) * pow(t_0, 2.0)) / pow(t_3, 2.0)));
	double tmp;
	if (z2 <= -7.2e+15) {
		tmp = 1.0 / sqrt((pow(((((((((((double) M_PI) * (t_2 * (((double) M_PI) * t_1))) * 4.0) * z2) + (t_2 * (((double) M_PI) + ((double) M_PI)))) * z2) - t_1) * z0) / z1), 2.0) - -1.0));
	} else if (z2 <= 3.3e-6) {
		tmp = 1.0 / sqrt(((((pow(tan((((double) M_PI) * ((z2 + z2) - -0.5))), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
	} else {
		tmp = 1.0 / sqrt((((pow(((z2 * ((2.0 * ((z0 * (z2 * (((double) M_PI) * (t_0 * t_4)))) / t_3)) + (z0 * t_4))) + ((z0 * t_0) / t_3)), 2.0) / z1) / z1) - -1.0));
	}
	return tmp;
}
public static double code(double z2, double z0, double z1) {
	double t_0 = Math.sin((0.5 * Math.PI));
	double t_1 = Math.tan((Math.PI * -0.5));
	double t_2 = Math.pow(t_1, 2.0) - -1.0;
	double t_3 = Math.cos((0.5 * Math.PI));
	double t_4 = (2.0 * Math.PI) - (-2.0 * ((Math.PI * Math.pow(t_0, 2.0)) / Math.pow(t_3, 2.0)));
	double tmp;
	if (z2 <= -7.2e+15) {
		tmp = 1.0 / Math.sqrt((Math.pow(((((((((Math.PI * (t_2 * (Math.PI * t_1))) * 4.0) * z2) + (t_2 * (Math.PI + Math.PI))) * z2) - t_1) * z0) / z1), 2.0) - -1.0));
	} else if (z2 <= 3.3e-6) {
		tmp = 1.0 / Math.sqrt(((((Math.pow(Math.tan((Math.PI * ((z2 + z2) - -0.5))), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
	} else {
		tmp = 1.0 / Math.sqrt((((Math.pow(((z2 * ((2.0 * ((z0 * (z2 * (Math.PI * (t_0 * t_4)))) / t_3)) + (z0 * t_4))) + ((z0 * t_0) / t_3)), 2.0) / z1) / z1) - -1.0));
	}
	return tmp;
}
def code(z2, z0, z1):
	t_0 = math.sin((0.5 * math.pi))
	t_1 = math.tan((math.pi * -0.5))
	t_2 = math.pow(t_1, 2.0) - -1.0
	t_3 = math.cos((0.5 * math.pi))
	t_4 = (2.0 * math.pi) - (-2.0 * ((math.pi * math.pow(t_0, 2.0)) / math.pow(t_3, 2.0)))
	tmp = 0
	if z2 <= -7.2e+15:
		tmp = 1.0 / math.sqrt((math.pow(((((((((math.pi * (t_2 * (math.pi * t_1))) * 4.0) * z2) + (t_2 * (math.pi + math.pi))) * z2) - t_1) * z0) / z1), 2.0) - -1.0))
	elif z2 <= 3.3e-6:
		tmp = 1.0 / math.sqrt(((((math.pow(math.tan((math.pi * ((z2 + z2) - -0.5))), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0))
	else:
		tmp = 1.0 / math.sqrt((((math.pow(((z2 * ((2.0 * ((z0 * (z2 * (math.pi * (t_0 * t_4)))) / t_3)) + (z0 * t_4))) + ((z0 * t_0) / t_3)), 2.0) / z1) / z1) - -1.0))
	return tmp
function code(z2, z0, z1)
	t_0 = sin(Float64(0.5 * pi))
	t_1 = tan(Float64(pi * -0.5))
	t_2 = Float64((t_1 ^ 2.0) - -1.0)
	t_3 = cos(Float64(0.5 * pi))
	t_4 = Float64(Float64(2.0 * pi) - Float64(-2.0 * Float64(Float64(pi * (t_0 ^ 2.0)) / (t_3 ^ 2.0))))
	tmp = 0.0
	if (z2 <= -7.2e+15)
		tmp = Float64(1.0 / sqrt(Float64((Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(pi * Float64(t_2 * Float64(pi * t_1))) * 4.0) * z2) + Float64(t_2 * Float64(pi + pi))) * z2) - t_1) * z0) / z1) ^ 2.0) - -1.0)));
	elseif (z2 <= 3.3e-6)
		tmp = Float64(1.0 / sqrt(Float64(Float64(Float64(Float64((tan(Float64(pi * Float64(Float64(z2 + z2) - -0.5))) ^ 2.0) * Float64(z0 / z1)) * Float64(1.0 / z1)) * z0) - -1.0)));
	else
		tmp = Float64(1.0 / sqrt(Float64(Float64(Float64((Float64(Float64(z2 * Float64(Float64(2.0 * Float64(Float64(z0 * Float64(z2 * Float64(pi * Float64(t_0 * t_4)))) / t_3)) + Float64(z0 * t_4))) + Float64(Float64(z0 * t_0) / t_3)) ^ 2.0) / z1) / z1) - -1.0)));
	end
	return tmp
end
function tmp_2 = code(z2, z0, z1)
	t_0 = sin((0.5 * pi));
	t_1 = tan((pi * -0.5));
	t_2 = (t_1 ^ 2.0) - -1.0;
	t_3 = cos((0.5 * pi));
	t_4 = (2.0 * pi) - (-2.0 * ((pi * (t_0 ^ 2.0)) / (t_3 ^ 2.0)));
	tmp = 0.0;
	if (z2 <= -7.2e+15)
		tmp = 1.0 / sqrt(((((((((((pi * (t_2 * (pi * t_1))) * 4.0) * z2) + (t_2 * (pi + pi))) * z2) - t_1) * z0) / z1) ^ 2.0) - -1.0));
	elseif (z2 <= 3.3e-6)
		tmp = 1.0 / sqrt((((((tan((pi * ((z2 + z2) - -0.5))) ^ 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
	else
		tmp = 1.0 / sqrt(((((((z2 * ((2.0 * ((z0 * (z2 * (pi * (t_0 * t_4)))) / t_3)) + (z0 * t_4))) + ((z0 * t_0) / t_3)) ^ 2.0) / z1) / z1) - -1.0));
	end
	tmp_2 = tmp;
end
code[z2_, z0_, z1_] := Block[{t$95$0 = N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Tan[N[(Pi * -0.5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[t$95$1, 2.0], $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$3 = N[Cos[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[(2.0 * Pi), $MachinePrecision] - N[(-2.0 * N[(N[(Pi * N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z2, -7.2e+15], N[(1.0 / N[Sqrt[N[(N[Power[N[(N[(N[(N[(N[(N[(N[(N[(Pi * N[(t$95$2 * N[(Pi * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision] * z2), $MachinePrecision] + N[(t$95$2 * N[(Pi + Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision] - t$95$1), $MachinePrecision] * z0), $MachinePrecision] / z1), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 3.3e-6], N[(1.0 / N[Sqrt[N[(N[(N[(N[(N[Power[N[Tan[N[(Pi * N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] * N[(1.0 / z1), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sqrt[N[(N[(N[(N[Power[N[(N[(z2 * N[(N[(2.0 * N[(N[(z0 * N[(z2 * N[(Pi * N[(t$95$0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(z0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z0 * t$95$0), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / z1), $MachinePrecision] / z1), $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := \sin \left(0.5 \cdot \pi\right)\\
t_1 := \tan \left(\pi \cdot -0.5\right)\\
t_2 := {t\_1}^{2} - -1\\
t_3 := \cos \left(0.5 \cdot \pi\right)\\
t_4 := 2 \cdot \pi - -2 \cdot \frac{\pi \cdot {t\_0}^{2}}{{t\_3}^{2}}\\
\mathbf{if}\;z2 \leq -7.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{1}{\sqrt{{\left(\frac{\left(\left(\left(\left(\pi \cdot \left(t\_2 \cdot \left(\pi \cdot t\_1\right)\right)\right) \cdot 4\right) \cdot z2 + t\_2 \cdot \left(\pi + \pi\right)\right) \cdot z2 - t\_1\right) \cdot z0}{z1}\right)}^{2} - -1}}\\

\mathbf{elif}\;z2 \leq 3.3 \cdot 10^{-6}:\\
\;\;\;\;\frac{1}{\sqrt{\left(\left({\tan \left(\pi \cdot \left(\left(z2 + z2\right) - -0.5\right)\right)}^{2} \cdot \frac{z0}{z1}\right) \cdot \frac{1}{z1}\right) \cdot z0 - -1}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{\frac{\frac{{\left(z2 \cdot \left(2 \cdot \frac{z0 \cdot \left(z2 \cdot \left(\pi \cdot \left(t\_0 \cdot t\_4\right)\right)\right)}{t\_3} + z0 \cdot t\_4\right) + \frac{z0 \cdot t\_0}{t\_3}\right)}^{2}}{z1}}{z1} - -1}}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z2 < -7.2e15

    1. Initial program 44.5%

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

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

      \[\leadsto \frac{1}{\sqrt{{\left(\color{blue}{\left(z2 \cdot \left(\left(2 \cdot \pi + z2 \cdot \left(z2 \cdot \left(-1.3333333333333333 \cdot {\pi}^{3} - \left(-4 \cdot \frac{{\pi}^{2} \cdot \left({\sin \left(0.5 \cdot \pi\right)}^{2} \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{{\cos \left(0.5 \cdot \pi\right)}^{2}} + \left(-2 \cdot \left({\pi}^{2} \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right) + 1.3333333333333333 \cdot \frac{{\pi}^{3} \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)\right) - -2 \cdot \frac{\pi \cdot \left(\sin \left(0.5 \cdot \pi\right) \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{\cos \left(0.5 \cdot \pi\right)}\right)\right) - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right) + \frac{\sin \left(0.5 \cdot \pi\right)}{\cos \left(0.5 \cdot \pi\right)}\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
    4. Applied rewrites72.9%

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

      \[\leadsto \frac{1}{\sqrt{{\left(\frac{z0 \cdot \left(\left(\left(4 \cdot \frac{\pi \cdot \left(\sin \left(\frac{1}{2} \cdot \pi\right) \cdot \left(\pi + \frac{\pi \cdot {\sin \left(\frac{1}{2} \cdot \pi\right)}^{2}}{{\cos \left(\frac{1}{2} \cdot \pi\right)}^{2}}\right)\right)}{\cos \left(\frac{1}{2} \cdot \pi\right)}\right) \cdot z2 + 2 \cdot \left(\pi + \left(\tan \left(0.5 \cdot \pi\right) \cdot \tan \left(0.5 \cdot \pi\right)\right) \cdot \pi\right)\right) \cdot z2 - \tan \left(\pi \cdot -0.5\right)\right)}{z1}\right)}^{2} - -1}} \]
    6. Step-by-step derivation
      1. Applied rewrites69.6%

        \[\leadsto \frac{1}{\sqrt{{\left(\frac{z0 \cdot \left(\left(\left(4 \cdot \frac{\pi \cdot \left(\sin \left(0.5 \cdot \pi\right) \cdot \left(\pi + \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{\cos \left(0.5 \cdot \pi\right)}\right) \cdot z2 + 2 \cdot \left(\pi + \left(\tan \left(0.5 \cdot \pi\right) \cdot \tan \left(0.5 \cdot \pi\right)\right) \cdot \pi\right)\right) \cdot z2 - \tan \left(\pi \cdot -0.5\right)\right)}{z1}\right)}^{2} - -1}} \]
      2. Applied rewrites69.6%

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

      if -7.2e15 < z2 < 3.3000000000000002e-6

      1. Initial program 44.5%

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\sqrt{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)\right) \cdot \color{blue}{\frac{z0}{z1}} - -1}} \]
        8. mult-flipN/A

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

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

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

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

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

      if 3.3000000000000002e-6 < z2

      1. Initial program 44.5%

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\sqrt{\color{blue}{\frac{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right)}{z1}} - -1}} \]
      3. Applied rewrites48.6%

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

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

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

    Alternative 3: 70.7% accurate, 0.3× speedup?

    \[\begin{array}{l} t_0 := \tan \left(\pi \cdot -0.5\right)\\ t_1 := {t\_0}^{2} - -1\\ t_2 := \left(z2 + z2\right) - -0.5\\ t_3 := \frac{\left|z0\right|}{\left|z1\right|}\\ \mathbf{if}\;\tan \left(t\_2 \cdot \pi\right) \cdot t\_3 \leq 50000:\\ \;\;\;\;\frac{1}{\sqrt{{\left(\frac{\left(\left(\left(\left(\pi \cdot \left(t\_1 \cdot \left(\pi \cdot t\_0\right)\right)\right) \cdot 4\right) \cdot z2 + t\_1 \cdot \left(\pi + \pi\right)\right) \cdot z2 - t\_0\right) \cdot \left|z0\right|}{\left|z1\right|}\right)}^{2} - -1}}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\left(-\tan^{-1} \left(\tan \left(\pi \cdot t\_2\right) \cdot t\_3\right)\right) + 0.5 \cdot \pi\right)\\ \end{array} \]
    (FPCore (z2 z0 z1)
      :precision binary64
      (let* ((t_0 (tan (* PI -0.5)))
           (t_1 (- (pow t_0 2.0) -1.0))
           (t_2 (- (+ z2 z2) -0.5))
           (t_3 (/ (fabs z0) (fabs z1))))
      (if (<= (* (tan (* t_2 PI)) t_3) 50000.0)
        (/
         1.0
         (sqrt
          (-
           (pow
            (/
             (*
              (-
               (*
                (+
                 (* (* (* PI (* t_1 (* PI t_0))) 4.0) z2)
                 (* t_1 (+ PI PI)))
                z2)
               t_0)
              (fabs z0))
             (fabs z1))
            2.0)
           -1.0)))
        (sin (+ (- (atan (* (tan (* PI t_2)) t_3))) (* 0.5 PI))))))
    double code(double z2, double z0, double z1) {
    	double t_0 = tan((((double) M_PI) * -0.5));
    	double t_1 = pow(t_0, 2.0) - -1.0;
    	double t_2 = (z2 + z2) - -0.5;
    	double t_3 = fabs(z0) / fabs(z1);
    	double tmp;
    	if ((tan((t_2 * ((double) M_PI))) * t_3) <= 50000.0) {
    		tmp = 1.0 / sqrt((pow(((((((((((double) M_PI) * (t_1 * (((double) M_PI) * t_0))) * 4.0) * z2) + (t_1 * (((double) M_PI) + ((double) M_PI)))) * z2) - t_0) * fabs(z0)) / fabs(z1)), 2.0) - -1.0));
    	} else {
    		tmp = sin((-atan((tan((((double) M_PI) * t_2)) * t_3)) + (0.5 * ((double) M_PI))));
    	}
    	return tmp;
    }
    
    public static double code(double z2, double z0, double z1) {
    	double t_0 = Math.tan((Math.PI * -0.5));
    	double t_1 = Math.pow(t_0, 2.0) - -1.0;
    	double t_2 = (z2 + z2) - -0.5;
    	double t_3 = Math.abs(z0) / Math.abs(z1);
    	double tmp;
    	if ((Math.tan((t_2 * Math.PI)) * t_3) <= 50000.0) {
    		tmp = 1.0 / Math.sqrt((Math.pow(((((((((Math.PI * (t_1 * (Math.PI * t_0))) * 4.0) * z2) + (t_1 * (Math.PI + Math.PI))) * z2) - t_0) * Math.abs(z0)) / Math.abs(z1)), 2.0) - -1.0));
    	} else {
    		tmp = Math.sin((-Math.atan((Math.tan((Math.PI * t_2)) * t_3)) + (0.5 * Math.PI)));
    	}
    	return tmp;
    }
    
    def code(z2, z0, z1):
    	t_0 = math.tan((math.pi * -0.5))
    	t_1 = math.pow(t_0, 2.0) - -1.0
    	t_2 = (z2 + z2) - -0.5
    	t_3 = math.fabs(z0) / math.fabs(z1)
    	tmp = 0
    	if (math.tan((t_2 * math.pi)) * t_3) <= 50000.0:
    		tmp = 1.0 / math.sqrt((math.pow(((((((((math.pi * (t_1 * (math.pi * t_0))) * 4.0) * z2) + (t_1 * (math.pi + math.pi))) * z2) - t_0) * math.fabs(z0)) / math.fabs(z1)), 2.0) - -1.0))
    	else:
    		tmp = math.sin((-math.atan((math.tan((math.pi * t_2)) * t_3)) + (0.5 * math.pi)))
    	return tmp
    
    function code(z2, z0, z1)
    	t_0 = tan(Float64(pi * -0.5))
    	t_1 = Float64((t_0 ^ 2.0) - -1.0)
    	t_2 = Float64(Float64(z2 + z2) - -0.5)
    	t_3 = Float64(abs(z0) / abs(z1))
    	tmp = 0.0
    	if (Float64(tan(Float64(t_2 * pi)) * t_3) <= 50000.0)
    		tmp = Float64(1.0 / sqrt(Float64((Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(pi * Float64(t_1 * Float64(pi * t_0))) * 4.0) * z2) + Float64(t_1 * Float64(pi + pi))) * z2) - t_0) * abs(z0)) / abs(z1)) ^ 2.0) - -1.0)));
    	else
    		tmp = sin(Float64(Float64(-atan(Float64(tan(Float64(pi * t_2)) * t_3))) + Float64(0.5 * pi)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(z2, z0, z1)
    	t_0 = tan((pi * -0.5));
    	t_1 = (t_0 ^ 2.0) - -1.0;
    	t_2 = (z2 + z2) - -0.5;
    	t_3 = abs(z0) / abs(z1);
    	tmp = 0.0;
    	if ((tan((t_2 * pi)) * t_3) <= 50000.0)
    		tmp = 1.0 / sqrt(((((((((((pi * (t_1 * (pi * t_0))) * 4.0) * z2) + (t_1 * (pi + pi))) * z2) - t_0) * abs(z0)) / abs(z1)) ^ 2.0) - -1.0));
    	else
    		tmp = sin((-atan((tan((pi * t_2)) * t_3)) + (0.5 * pi)));
    	end
    	tmp_2 = tmp;
    end
    
    code[z2_, z0_, z1_] := Block[{t$95$0 = N[Tan[N[(Pi * -0.5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[t$95$0, 2.0], $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]}, Block[{t$95$3 = N[(N[Abs[z0], $MachinePrecision] / N[Abs[z1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Tan[N[(t$95$2 * Pi), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], 50000.0], N[(1.0 / N[Sqrt[N[(N[Power[N[(N[(N[(N[(N[(N[(N[(N[(Pi * N[(t$95$1 * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision] * z2), $MachinePrecision] + N[(t$95$1 * N[(Pi + Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision] - t$95$0), $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[Abs[z1], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sin[N[((-N[ArcTan[N[(N[Tan[N[(Pi * t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]], $MachinePrecision]) + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
    
    \begin{array}{l}
    t_0 := \tan \left(\pi \cdot -0.5\right)\\
    t_1 := {t\_0}^{2} - -1\\
    t_2 := \left(z2 + z2\right) - -0.5\\
    t_3 := \frac{\left|z0\right|}{\left|z1\right|}\\
    \mathbf{if}\;\tan \left(t\_2 \cdot \pi\right) \cdot t\_3 \leq 50000:\\
    \;\;\;\;\frac{1}{\sqrt{{\left(\frac{\left(\left(\left(\left(\pi \cdot \left(t\_1 \cdot \left(\pi \cdot t\_0\right)\right)\right) \cdot 4\right) \cdot z2 + t\_1 \cdot \left(\pi + \pi\right)\right) \cdot z2 - t\_0\right) \cdot \left|z0\right|}{\left|z1\right|}\right)}^{2} - -1}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sin \left(\left(-\tan^{-1} \left(\tan \left(\pi \cdot t\_2\right) \cdot t\_3\right)\right) + 0.5 \cdot \pi\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 (tan.f64 (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64))) (/.f64 z0 z1)) < 5e4

      1. Initial program 44.5%

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

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

        \[\leadsto \frac{1}{\sqrt{{\left(\color{blue}{\left(z2 \cdot \left(\left(2 \cdot \pi + z2 \cdot \left(z2 \cdot \left(-1.3333333333333333 \cdot {\pi}^{3} - \left(-4 \cdot \frac{{\pi}^{2} \cdot \left({\sin \left(0.5 \cdot \pi\right)}^{2} \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{{\cos \left(0.5 \cdot \pi\right)}^{2}} + \left(-2 \cdot \left({\pi}^{2} \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right) + 1.3333333333333333 \cdot \frac{{\pi}^{3} \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)\right) - -2 \cdot \frac{\pi \cdot \left(\sin \left(0.5 \cdot \pi\right) \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{\cos \left(0.5 \cdot \pi\right)}\right)\right) - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right) + \frac{\sin \left(0.5 \cdot \pi\right)}{\cos \left(0.5 \cdot \pi\right)}\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
      4. Applied rewrites72.9%

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

        \[\leadsto \frac{1}{\sqrt{{\left(\frac{z0 \cdot \left(\left(\left(4 \cdot \frac{\pi \cdot \left(\sin \left(\frac{1}{2} \cdot \pi\right) \cdot \left(\pi + \frac{\pi \cdot {\sin \left(\frac{1}{2} \cdot \pi\right)}^{2}}{{\cos \left(\frac{1}{2} \cdot \pi\right)}^{2}}\right)\right)}{\cos \left(\frac{1}{2} \cdot \pi\right)}\right) \cdot z2 + 2 \cdot \left(\pi + \left(\tan \left(0.5 \cdot \pi\right) \cdot \tan \left(0.5 \cdot \pi\right)\right) \cdot \pi\right)\right) \cdot z2 - \tan \left(\pi \cdot -0.5\right)\right)}{z1}\right)}^{2} - -1}} \]
      6. Step-by-step derivation
        1. Applied rewrites69.6%

          \[\leadsto \frac{1}{\sqrt{{\left(\frac{z0 \cdot \left(\left(\left(4 \cdot \frac{\pi \cdot \left(\sin \left(0.5 \cdot \pi\right) \cdot \left(\pi + \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{\cos \left(0.5 \cdot \pi\right)}\right) \cdot z2 + 2 \cdot \left(\pi + \left(\tan \left(0.5 \cdot \pi\right) \cdot \tan \left(0.5 \cdot \pi\right)\right) \cdot \pi\right)\right) \cdot z2 - \tan \left(\pi \cdot -0.5\right)\right)}{z1}\right)}^{2} - -1}} \]
        2. Applied rewrites69.6%

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

        if 5e4 < (*.f64 (tan.f64 (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64))) (/.f64 z0 z1))

        1. Initial program 44.5%

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

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

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

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

            \[\leadsto \frac{1}{\sqrt{\color{blue}{{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} + \left(\mathsf{neg}\left(-1\right)\right)}}} \]
          5. metadata-evalN/A

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

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

            \[\leadsto \frac{1}{\sqrt{1 + \color{blue}{{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2}}}} \]
          8. unpow2N/A

            \[\leadsto \frac{1}{\sqrt{1 + \color{blue}{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}}} \]
          9. cos-atan-revN/A

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

            \[\leadsto \color{blue}{\cos \tan^{-1} \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)} \]
          11. lower-atan.f6419.0%

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

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

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

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

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

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

            \[\leadsto \sin \left(\left(\mathsf{neg}\left(\tan^{-1} \left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) + \frac{\color{blue}{\pi}}{2}\right) \]
          6. mult-flipN/A

            \[\leadsto \sin \left(\left(\mathsf{neg}\left(\tan^{-1} \left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)\right)\right) + \color{blue}{\pi \cdot \frac{1}{2}}\right) \]
          7. metadata-evalN/A

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

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

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

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

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

      Alternative 4: 60.8% accurate, 0.3× speedup?

      \[\begin{array}{l} t_0 := \left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\\ t_1 := \frac{1}{\sqrt{{\left(\frac{z0 \cdot \left(\left(2 \cdot \left(\pi + \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right) \cdot z2 - \tan \left(\pi \cdot -0.5\right)\right)}{z1}\right)}^{2} - -1}}\\ t_2 := \tan t\_0\\ t_3 := \left|z0\right| \cdot \left|t\_2\right|\\ t_4 := \sqrt{{\left(t\_2 \cdot z0\right)}^{2}}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+278}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq -1 \cdot 10^{+32}:\\ \;\;\;\;\frac{1}{\frac{t\_4 - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{t\_4}}{z1}}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+17}:\\ \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_2 \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}}\\ \mathbf{elif}\;t\_0 \leq 10^{+176}:\\ \;\;\;\;\frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{t\_3}}{t\_3}\right) \cdot t\_3}{z1}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
      (FPCore (z2 z0 z1)
        :precision binary64
        (let* ((t_0 (* (- (+ z2 z2) -0.5) PI))
             (t_1
              (/
               1.0
               (sqrt
                (-
                 (pow
                  (/
                   (*
                    z0
                    (-
                     (*
                      (*
                       2.0
                       (+
                        PI
                        (/
                         (* PI (pow (sin (* 0.5 PI)) 2.0))
                         (pow (cos (* 0.5 PI)) 2.0))))
                      z2)
                     (tan (* PI -0.5))))
                   z1)
                  2.0)
                 -1.0))))
             (t_2 (tan t_0))
             (t_3 (* (fabs z0) (fabs t_2)))
             (t_4 (sqrt (pow (* t_2 z0) 2.0))))
        (if (<= t_0 -1e+278)
          t_1
          (if (<= t_0 -1e+32)
            (/ 1.0 (/ (- t_4 (/ (* -0.5 (* z1 z1)) t_4)) z1))
            (if (<= t_0 2e+17)
              (/
               1.0
               (sqrt (sqrt (pow (- (pow (* t_2 (/ z0 z1)) 2.0) -1.0) 2.0))))
              (if (<= t_0 1e+176)
                (/
                 1.0
                 (/ (* (- 1.0 (/ (/ (* (* z1 z1) -0.5) t_3) t_3)) t_3) z1))
                t_1))))))
      double code(double z2, double z0, double z1) {
      	double t_0 = ((z2 + z2) - -0.5) * ((double) M_PI);
      	double t_1 = 1.0 / sqrt((pow(((z0 * (((2.0 * (((double) M_PI) + ((((double) M_PI) * pow(sin((0.5 * ((double) M_PI))), 2.0)) / pow(cos((0.5 * ((double) M_PI))), 2.0)))) * z2) - tan((((double) M_PI) * -0.5)))) / z1), 2.0) - -1.0));
      	double t_2 = tan(t_0);
      	double t_3 = fabs(z0) * fabs(t_2);
      	double t_4 = sqrt(pow((t_2 * z0), 2.0));
      	double tmp;
      	if (t_0 <= -1e+278) {
      		tmp = t_1;
      	} else if (t_0 <= -1e+32) {
      		tmp = 1.0 / ((t_4 - ((-0.5 * (z1 * z1)) / t_4)) / z1);
      	} else if (t_0 <= 2e+17) {
      		tmp = 1.0 / sqrt(sqrt(pow((pow((t_2 * (z0 / z1)), 2.0) - -1.0), 2.0)));
      	} else if (t_0 <= 1e+176) {
      		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_3) / t_3)) * t_3) / z1);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      public static double code(double z2, double z0, double z1) {
      	double t_0 = ((z2 + z2) - -0.5) * Math.PI;
      	double t_1 = 1.0 / Math.sqrt((Math.pow(((z0 * (((2.0 * (Math.PI + ((Math.PI * Math.pow(Math.sin((0.5 * Math.PI)), 2.0)) / Math.pow(Math.cos((0.5 * Math.PI)), 2.0)))) * z2) - Math.tan((Math.PI * -0.5)))) / z1), 2.0) - -1.0));
      	double t_2 = Math.tan(t_0);
      	double t_3 = Math.abs(z0) * Math.abs(t_2);
      	double t_4 = Math.sqrt(Math.pow((t_2 * z0), 2.0));
      	double tmp;
      	if (t_0 <= -1e+278) {
      		tmp = t_1;
      	} else if (t_0 <= -1e+32) {
      		tmp = 1.0 / ((t_4 - ((-0.5 * (z1 * z1)) / t_4)) / z1);
      	} else if (t_0 <= 2e+17) {
      		tmp = 1.0 / Math.sqrt(Math.sqrt(Math.pow((Math.pow((t_2 * (z0 / z1)), 2.0) - -1.0), 2.0)));
      	} else if (t_0 <= 1e+176) {
      		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_3) / t_3)) * t_3) / z1);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(z2, z0, z1):
      	t_0 = ((z2 + z2) - -0.5) * math.pi
      	t_1 = 1.0 / math.sqrt((math.pow(((z0 * (((2.0 * (math.pi + ((math.pi * math.pow(math.sin((0.5 * math.pi)), 2.0)) / math.pow(math.cos((0.5 * math.pi)), 2.0)))) * z2) - math.tan((math.pi * -0.5)))) / z1), 2.0) - -1.0))
      	t_2 = math.tan(t_0)
      	t_3 = math.fabs(z0) * math.fabs(t_2)
      	t_4 = math.sqrt(math.pow((t_2 * z0), 2.0))
      	tmp = 0
      	if t_0 <= -1e+278:
      		tmp = t_1
      	elif t_0 <= -1e+32:
      		tmp = 1.0 / ((t_4 - ((-0.5 * (z1 * z1)) / t_4)) / z1)
      	elif t_0 <= 2e+17:
      		tmp = 1.0 / math.sqrt(math.sqrt(math.pow((math.pow((t_2 * (z0 / z1)), 2.0) - -1.0), 2.0)))
      	elif t_0 <= 1e+176:
      		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_3) / t_3)) * t_3) / z1)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(z2, z0, z1)
      	t_0 = Float64(Float64(Float64(z2 + z2) - -0.5) * pi)
      	t_1 = Float64(1.0 / sqrt(Float64((Float64(Float64(z0 * Float64(Float64(Float64(2.0 * Float64(pi + Float64(Float64(pi * (sin(Float64(0.5 * pi)) ^ 2.0)) / (cos(Float64(0.5 * pi)) ^ 2.0)))) * z2) - tan(Float64(pi * -0.5)))) / z1) ^ 2.0) - -1.0)))
      	t_2 = tan(t_0)
      	t_3 = Float64(abs(z0) * abs(t_2))
      	t_4 = sqrt((Float64(t_2 * z0) ^ 2.0))
      	tmp = 0.0
      	if (t_0 <= -1e+278)
      		tmp = t_1;
      	elseif (t_0 <= -1e+32)
      		tmp = Float64(1.0 / Float64(Float64(t_4 - Float64(Float64(-0.5 * Float64(z1 * z1)) / t_4)) / z1));
      	elseif (t_0 <= 2e+17)
      		tmp = Float64(1.0 / sqrt(sqrt((Float64((Float64(t_2 * Float64(z0 / z1)) ^ 2.0) - -1.0) ^ 2.0))));
      	elseif (t_0 <= 1e+176)
      		tmp = Float64(1.0 / Float64(Float64(Float64(1.0 - Float64(Float64(Float64(Float64(z1 * z1) * -0.5) / t_3) / t_3)) * t_3) / z1));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(z2, z0, z1)
      	t_0 = ((z2 + z2) - -0.5) * pi;
      	t_1 = 1.0 / sqrt(((((z0 * (((2.0 * (pi + ((pi * (sin((0.5 * pi)) ^ 2.0)) / (cos((0.5 * pi)) ^ 2.0)))) * z2) - tan((pi * -0.5)))) / z1) ^ 2.0) - -1.0));
      	t_2 = tan(t_0);
      	t_3 = abs(z0) * abs(t_2);
      	t_4 = sqrt(((t_2 * z0) ^ 2.0));
      	tmp = 0.0;
      	if (t_0 <= -1e+278)
      		tmp = t_1;
      	elseif (t_0 <= -1e+32)
      		tmp = 1.0 / ((t_4 - ((-0.5 * (z1 * z1)) / t_4)) / z1);
      	elseif (t_0 <= 2e+17)
      		tmp = 1.0 / sqrt(sqrt(((((t_2 * (z0 / z1)) ^ 2.0) - -1.0) ^ 2.0)));
      	elseif (t_0 <= 1e+176)
      		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_3) / t_3)) * t_3) / z1);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[z2_, z0_, z1_] := Block[{t$95$0 = N[(N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[Sqrt[N[(N[Power[N[(N[(z0 * N[(N[(N[(2.0 * N[(Pi + N[(N[(Pi * N[Power[N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Cos[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision] - N[Tan[N[(Pi * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Tan[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Abs[z0], $MachinePrecision] * N[Abs[t$95$2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[Power[N[(t$95$2 * z0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -1e+278], t$95$1, If[LessEqual[t$95$0, -1e+32], N[(1.0 / N[(N[(t$95$4 - N[(N[(-0.5 * N[(z1 * z1), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+17], N[(1.0 / N[Sqrt[N[Sqrt[N[Power[N[(N[Power[N[(t$95$2 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+176], N[(1.0 / N[(N[(N[(1.0 - N[(N[(N[(N[(z1 * z1), $MachinePrecision] * -0.5), $MachinePrecision] / t$95$3), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
      
      \begin{array}{l}
      t_0 := \left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\\
      t_1 := \frac{1}{\sqrt{{\left(\frac{z0 \cdot \left(\left(2 \cdot \left(\pi + \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right) \cdot z2 - \tan \left(\pi \cdot -0.5\right)\right)}{z1}\right)}^{2} - -1}}\\
      t_2 := \tan t\_0\\
      t_3 := \left|z0\right| \cdot \left|t\_2\right|\\
      t_4 := \sqrt{{\left(t\_2 \cdot z0\right)}^{2}}\\
      \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+278}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_0 \leq -1 \cdot 10^{+32}:\\
      \;\;\;\;\frac{1}{\frac{t\_4 - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{t\_4}}{z1}}\\
      
      \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+17}:\\
      \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_2 \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}}\\
      
      \mathbf{elif}\;t\_0 \leq 10^{+176}:\\
      \;\;\;\;\frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{t\_3}}{t\_3}\right) \cdot t\_3}{z1}}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64)) < -9.9999999999999996e277 or 1e176 < (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64))

        1. Initial program 44.5%

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

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

          \[\leadsto \frac{1}{\sqrt{{\left(\color{blue}{\left(z2 \cdot \left(\left(2 \cdot \pi + z2 \cdot \left(z2 \cdot \left(-1.3333333333333333 \cdot {\pi}^{3} - \left(-4 \cdot \frac{{\pi}^{2} \cdot \left({\sin \left(0.5 \cdot \pi\right)}^{2} \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{{\cos \left(0.5 \cdot \pi\right)}^{2}} + \left(-2 \cdot \left({\pi}^{2} \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right) + 1.3333333333333333 \cdot \frac{{\pi}^{3} \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)\right) - -2 \cdot \frac{\pi \cdot \left(\sin \left(0.5 \cdot \pi\right) \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{\cos \left(0.5 \cdot \pi\right)}\right)\right) - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right) + \frac{\sin \left(0.5 \cdot \pi\right)}{\cos \left(0.5 \cdot \pi\right)}\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
        4. Applied rewrites72.9%

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

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

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

          if -9.9999999999999996e277 < (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64)) < -1.0000000000000001e32

          1. Initial program 44.5%

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

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

              \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
          4. Applied rewrites38.8%

            \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
          5. Applied rewrites38.8%

            \[\leadsto \frac{1}{\frac{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}} - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}}}}{z1}} \]

          if -1.0000000000000001e32 < (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64)) < 2e17

          1. Initial program 44.5%

            \[\frac{1}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
          2. Step-by-step derivation
            1. rem-square-sqrtN/A

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

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

              \[\leadsto \frac{1}{\sqrt{\color{blue}{\sqrt{\left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right) \cdot \left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}}}} \]
            4. lower-*.f6450.4%

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

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

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

              \[\leadsto \frac{1}{\sqrt{\sqrt{\color{blue}{{\left({\left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}^{2} - -1\right)}^{2}}}}} \]
            3. lower-pow.f6450.4%

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

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

              \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\color{blue}{\left(\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \frac{z0}{z1}\right)}}^{2} - -1\right)}^{2}}}} \]
            6. lower-*.f6450.4%

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

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

              \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
            9. lower-*.f6450.4%

              \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
          5. Applied rewrites50.4%

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

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

          1. Initial program 44.5%

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

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

              \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
          4. Applied rewrites38.8%

            \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
          5. Applied rewrites38.7%

            \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
          6. Applied rewrites38.8%

            \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
          7. Applied rewrites35.1%

            \[\leadsto \frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}\right) \cdot \left(\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|\right)}{z1}} \]
        7. Recombined 4 regimes into one program.
        8. Add Preprocessing

        Alternative 5: 58.8% accurate, 0.3× speedup?

        \[\begin{array}{l} t_0 := \cos \left(0.5 \cdot \pi\right)\\ t_1 := \left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\\ t_2 := \sin \left(0.5 \cdot \pi\right)\\ t_3 := \tan t\_1\\ t_4 := \sqrt{{\left(t\_3 \cdot z0\right)}^{2}}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+278}:\\ \;\;\;\;\frac{1}{\sqrt{{\left(\frac{z0 \cdot \left(\left(2 \cdot \left(\pi + \frac{\pi \cdot {t\_2}^{2}}{{t\_0}^{2}}\right)\right) \cdot z2 - \tan \left(\pi \cdot -0.5\right)\right)}{z1}\right)}^{2} - -1}}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+32}:\\ \;\;\;\;\frac{1}{\frac{t\_4 - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{t\_4}}{z1}}\\ \mathbf{elif}\;t\_1 \leq 2:\\ \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_3 \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z1}{\sqrt{\sqrt{\frac{{z0}^{4} \cdot {\left(t\_2 + 2 \cdot \left(z2 \cdot \left(\pi \cdot t\_0\right)\right)\right)}^{4}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{4}}}}}\\ \end{array} \]
        (FPCore (z2 z0 z1)
          :precision binary64
          (let* ((t_0 (cos (* 0.5 PI)))
               (t_1 (* (- (+ z2 z2) -0.5) PI))
               (t_2 (sin (* 0.5 PI)))
               (t_3 (tan t_1))
               (t_4 (sqrt (pow (* t_3 z0) 2.0))))
          (if (<= t_1 -1e+278)
            (/
             1.0
             (sqrt
              (-
               (pow
                (/
                 (*
                  z0
                  (-
                   (*
                    (* 2.0 (+ PI (/ (* PI (pow t_2 2.0)) (pow t_0 2.0))))
                    z2)
                   (tan (* PI -0.5))))
                 z1)
                2.0)
               -1.0)))
            (if (<= t_1 -1e+32)
              (/ 1.0 (/ (- t_4 (/ (* -0.5 (* z1 z1)) t_4)) z1))
              (if (<= t_1 2.0)
                (/
                 1.0
                 (sqrt (sqrt (pow (- (pow (* t_3 (/ z0 z1)) 2.0) -1.0) 2.0))))
                (/
                 z1
                 (sqrt
                  (sqrt
                   (/
                    (*
                     (pow z0 4.0)
                     (pow (+ t_2 (* 2.0 (* z2 (* PI t_0)))) 4.0))
                    (pow (cos (* PI (+ 0.5 (* 2.0 z2)))) 4.0))))))))))
        double code(double z2, double z0, double z1) {
        	double t_0 = cos((0.5 * ((double) M_PI)));
        	double t_1 = ((z2 + z2) - -0.5) * ((double) M_PI);
        	double t_2 = sin((0.5 * ((double) M_PI)));
        	double t_3 = tan(t_1);
        	double t_4 = sqrt(pow((t_3 * z0), 2.0));
        	double tmp;
        	if (t_1 <= -1e+278) {
        		tmp = 1.0 / sqrt((pow(((z0 * (((2.0 * (((double) M_PI) + ((((double) M_PI) * pow(t_2, 2.0)) / pow(t_0, 2.0)))) * z2) - tan((((double) M_PI) * -0.5)))) / z1), 2.0) - -1.0));
        	} else if (t_1 <= -1e+32) {
        		tmp = 1.0 / ((t_4 - ((-0.5 * (z1 * z1)) / t_4)) / z1);
        	} else if (t_1 <= 2.0) {
        		tmp = 1.0 / sqrt(sqrt(pow((pow((t_3 * (z0 / z1)), 2.0) - -1.0), 2.0)));
        	} else {
        		tmp = z1 / sqrt(sqrt(((pow(z0, 4.0) * pow((t_2 + (2.0 * (z2 * (((double) M_PI) * t_0)))), 4.0)) / pow(cos((((double) M_PI) * (0.5 + (2.0 * z2)))), 4.0))));
        	}
        	return tmp;
        }
        
        public static double code(double z2, double z0, double z1) {
        	double t_0 = Math.cos((0.5 * Math.PI));
        	double t_1 = ((z2 + z2) - -0.5) * Math.PI;
        	double t_2 = Math.sin((0.5 * Math.PI));
        	double t_3 = Math.tan(t_1);
        	double t_4 = Math.sqrt(Math.pow((t_3 * z0), 2.0));
        	double tmp;
        	if (t_1 <= -1e+278) {
        		tmp = 1.0 / Math.sqrt((Math.pow(((z0 * (((2.0 * (Math.PI + ((Math.PI * Math.pow(t_2, 2.0)) / Math.pow(t_0, 2.0)))) * z2) - Math.tan((Math.PI * -0.5)))) / z1), 2.0) - -1.0));
        	} else if (t_1 <= -1e+32) {
        		tmp = 1.0 / ((t_4 - ((-0.5 * (z1 * z1)) / t_4)) / z1);
        	} else if (t_1 <= 2.0) {
        		tmp = 1.0 / Math.sqrt(Math.sqrt(Math.pow((Math.pow((t_3 * (z0 / z1)), 2.0) - -1.0), 2.0)));
        	} else {
        		tmp = z1 / Math.sqrt(Math.sqrt(((Math.pow(z0, 4.0) * Math.pow((t_2 + (2.0 * (z2 * (Math.PI * t_0)))), 4.0)) / Math.pow(Math.cos((Math.PI * (0.5 + (2.0 * z2)))), 4.0))));
        	}
        	return tmp;
        }
        
        def code(z2, z0, z1):
        	t_0 = math.cos((0.5 * math.pi))
        	t_1 = ((z2 + z2) - -0.5) * math.pi
        	t_2 = math.sin((0.5 * math.pi))
        	t_3 = math.tan(t_1)
        	t_4 = math.sqrt(math.pow((t_3 * z0), 2.0))
        	tmp = 0
        	if t_1 <= -1e+278:
        		tmp = 1.0 / math.sqrt((math.pow(((z0 * (((2.0 * (math.pi + ((math.pi * math.pow(t_2, 2.0)) / math.pow(t_0, 2.0)))) * z2) - math.tan((math.pi * -0.5)))) / z1), 2.0) - -1.0))
        	elif t_1 <= -1e+32:
        		tmp = 1.0 / ((t_4 - ((-0.5 * (z1 * z1)) / t_4)) / z1)
        	elif t_1 <= 2.0:
        		tmp = 1.0 / math.sqrt(math.sqrt(math.pow((math.pow((t_3 * (z0 / z1)), 2.0) - -1.0), 2.0)))
        	else:
        		tmp = z1 / math.sqrt(math.sqrt(((math.pow(z0, 4.0) * math.pow((t_2 + (2.0 * (z2 * (math.pi * t_0)))), 4.0)) / math.pow(math.cos((math.pi * (0.5 + (2.0 * z2)))), 4.0))))
        	return tmp
        
        function code(z2, z0, z1)
        	t_0 = cos(Float64(0.5 * pi))
        	t_1 = Float64(Float64(Float64(z2 + z2) - -0.5) * pi)
        	t_2 = sin(Float64(0.5 * pi))
        	t_3 = tan(t_1)
        	t_4 = sqrt((Float64(t_3 * z0) ^ 2.0))
        	tmp = 0.0
        	if (t_1 <= -1e+278)
        		tmp = Float64(1.0 / sqrt(Float64((Float64(Float64(z0 * Float64(Float64(Float64(2.0 * Float64(pi + Float64(Float64(pi * (t_2 ^ 2.0)) / (t_0 ^ 2.0)))) * z2) - tan(Float64(pi * -0.5)))) / z1) ^ 2.0) - -1.0)));
        	elseif (t_1 <= -1e+32)
        		tmp = Float64(1.0 / Float64(Float64(t_4 - Float64(Float64(-0.5 * Float64(z1 * z1)) / t_4)) / z1));
        	elseif (t_1 <= 2.0)
        		tmp = Float64(1.0 / sqrt(sqrt((Float64((Float64(t_3 * Float64(z0 / z1)) ^ 2.0) - -1.0) ^ 2.0))));
        	else
        		tmp = Float64(z1 / sqrt(sqrt(Float64(Float64((z0 ^ 4.0) * (Float64(t_2 + Float64(2.0 * Float64(z2 * Float64(pi * t_0)))) ^ 4.0)) / (cos(Float64(pi * Float64(0.5 + Float64(2.0 * z2)))) ^ 4.0)))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(z2, z0, z1)
        	t_0 = cos((0.5 * pi));
        	t_1 = ((z2 + z2) - -0.5) * pi;
        	t_2 = sin((0.5 * pi));
        	t_3 = tan(t_1);
        	t_4 = sqrt(((t_3 * z0) ^ 2.0));
        	tmp = 0.0;
        	if (t_1 <= -1e+278)
        		tmp = 1.0 / sqrt(((((z0 * (((2.0 * (pi + ((pi * (t_2 ^ 2.0)) / (t_0 ^ 2.0)))) * z2) - tan((pi * -0.5)))) / z1) ^ 2.0) - -1.0));
        	elseif (t_1 <= -1e+32)
        		tmp = 1.0 / ((t_4 - ((-0.5 * (z1 * z1)) / t_4)) / z1);
        	elseif (t_1 <= 2.0)
        		tmp = 1.0 / sqrt(sqrt(((((t_3 * (z0 / z1)) ^ 2.0) - -1.0) ^ 2.0)));
        	else
        		tmp = z1 / sqrt(sqrt((((z0 ^ 4.0) * ((t_2 + (2.0 * (z2 * (pi * t_0)))) ^ 4.0)) / (cos((pi * (0.5 + (2.0 * z2)))) ^ 4.0))));
        	end
        	tmp_2 = tmp;
        end
        
        code[z2_, z0_, z1_] := Block[{t$95$0 = N[Cos[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Tan[t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[Power[N[(t$95$3 * z0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, -1e+278], N[(1.0 / N[Sqrt[N[(N[Power[N[(N[(z0 * N[(N[(N[(2.0 * N[(Pi + N[(N[(Pi * N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z2), $MachinePrecision] - N[Tan[N[(Pi * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e+32], N[(1.0 / N[(N[(t$95$4 - N[(N[(-0.5 * N[(z1 * z1), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(1.0 / N[Sqrt[N[Sqrt[N[Power[N[(N[Power[N[(t$95$3 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(z1 / N[Sqrt[N[Sqrt[N[(N[(N[Power[z0, 4.0], $MachinePrecision] * N[Power[N[(t$95$2 + N[(2.0 * N[(z2 * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Cos[N[(Pi * N[(0.5 + N[(2.0 * z2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
        
        \begin{array}{l}
        t_0 := \cos \left(0.5 \cdot \pi\right)\\
        t_1 := \left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\\
        t_2 := \sin \left(0.5 \cdot \pi\right)\\
        t_3 := \tan t\_1\\
        t_4 := \sqrt{{\left(t\_3 \cdot z0\right)}^{2}}\\
        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+278}:\\
        \;\;\;\;\frac{1}{\sqrt{{\left(\frac{z0 \cdot \left(\left(2 \cdot \left(\pi + \frac{\pi \cdot {t\_2}^{2}}{{t\_0}^{2}}\right)\right) \cdot z2 - \tan \left(\pi \cdot -0.5\right)\right)}{z1}\right)}^{2} - -1}}\\
        
        \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+32}:\\
        \;\;\;\;\frac{1}{\frac{t\_4 - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{t\_4}}{z1}}\\
        
        \mathbf{elif}\;t\_1 \leq 2:\\
        \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_3 \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{z1}{\sqrt{\sqrt{\frac{{z0}^{4} \cdot {\left(t\_2 + 2 \cdot \left(z2 \cdot \left(\pi \cdot t\_0\right)\right)\right)}^{4}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{4}}}}}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64)) < -9.9999999999999996e277

          1. Initial program 44.5%

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

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

            \[\leadsto \frac{1}{\sqrt{{\left(\color{blue}{\left(z2 \cdot \left(\left(2 \cdot \pi + z2 \cdot \left(z2 \cdot \left(-1.3333333333333333 \cdot {\pi}^{3} - \left(-4 \cdot \frac{{\pi}^{2} \cdot \left({\sin \left(0.5 \cdot \pi\right)}^{2} \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{{\cos \left(0.5 \cdot \pi\right)}^{2}} + \left(-2 \cdot \left({\pi}^{2} \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right) + 1.3333333333333333 \cdot \frac{{\pi}^{3} \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)\right) - -2 \cdot \frac{\pi \cdot \left(\sin \left(0.5 \cdot \pi\right) \cdot \left(2 \cdot \pi - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right)\right)}{\cos \left(0.5 \cdot \pi\right)}\right)\right) - -2 \cdot \frac{\pi \cdot {\sin \left(0.5 \cdot \pi\right)}^{2}}{{\cos \left(0.5 \cdot \pi\right)}^{2}}\right) + \frac{\sin \left(0.5 \cdot \pi\right)}{\cos \left(0.5 \cdot \pi\right)}\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
          4. Applied rewrites72.9%

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

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

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

            if -9.9999999999999996e277 < (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64)) < -1.0000000000000001e32

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}} - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}}}}{z1}} \]

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

            1. Initial program 44.5%

              \[\frac{1}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
            2. Step-by-step derivation
              1. rem-square-sqrtN/A

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

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

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\sqrt{\left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right) \cdot \left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}}}} \]
              4. lower-*.f6450.4%

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

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{\color{blue}{{\left({\left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}^{2} - -1\right)}^{2}}}}} \]
              3. lower-pow.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\color{blue}{\left(\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \frac{z0}{z1}\right)}}^{2} - -1\right)}^{2}}}} \]
              6. lower-*.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
              9. lower-*.f6450.4%

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
            5. Applied rewrites50.4%

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

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

            1. Initial program 44.5%

              \[\frac{1}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
            2. Step-by-step derivation
              1. rem-square-sqrtN/A

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

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

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\sqrt{\left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right) \cdot \left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}}}} \]
              4. lower-*.f6450.4%

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

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

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

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

                \[\leadsto \frac{z1}{\sqrt{\sqrt{\frac{{z0}^{4} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{4}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{4}}}}} \]
              3. lower-sqrt.f64N/A

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

                \[\leadsto \frac{z1}{\sqrt{\sqrt{\frac{{z0}^{4} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{4}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{4}}}}} \]
            6. Applied rewrites31.5%

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

              \[\leadsto \frac{z1}{\sqrt{\sqrt{\frac{{z0}^{4} \cdot {\left(\sin \left(\frac{1}{2} \cdot \pi\right) + 2 \cdot \left(z2 \cdot \left(\pi \cdot \cos \left(\frac{1}{2} \cdot \pi\right)\right)\right)\right)}^{4}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{4}}}}} \]
            8. Step-by-step derivation
              1. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{z1}{\sqrt{\sqrt{\frac{{z0}^{4} \cdot {\left(\sin \left(\frac{1}{2} \cdot \pi\right) + 2 \cdot \left(z2 \cdot \left(\pi \cdot \cos \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)}^{4}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{4}}}}} \]
              11. lower-PI.f6440.4%

                \[\leadsto \frac{z1}{\sqrt{\sqrt{\frac{{z0}^{4} \cdot {\left(\sin \left(0.5 \cdot \pi\right) + 2 \cdot \left(z2 \cdot \left(\pi \cdot \cos \left(0.5 \cdot \pi\right)\right)\right)\right)}^{4}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{4}}}}} \]
            9. Applied rewrites40.4%

              \[\leadsto \frac{z1}{\sqrt{\sqrt{\frac{{z0}^{4} \cdot {\left(\sin \left(0.5 \cdot \pi\right) + 2 \cdot \left(z2 \cdot \left(\pi \cdot \cos \left(0.5 \cdot \pi\right)\right)\right)\right)}^{4}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{4}}}}} \]
          7. Recombined 4 regimes into one program.
          8. Add Preprocessing

          Alternative 6: 56.6% accurate, 0.4× speedup?

          \[\begin{array}{l} t_0 := \left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\\ t_1 := \tan t\_0\\ t_2 := \sqrt{{\left(t\_1 \cdot z0\right)}^{2}}\\ t_3 := \left|z0\right| \cdot \left|t\_1\right|\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+32}:\\ \;\;\;\;\frac{1}{\frac{t\_2 - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{t\_2}}{z1}}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+17}:\\ \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_1 \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}}\\ \mathbf{elif}\;t\_0 \leq 10^{+176}:\\ \;\;\;\;\frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{t\_3}}{t\_3}\right) \cdot t\_3}{z1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{t\_2 \cdot z1 + \frac{\left(z1 \cdot z1\right) \cdot 0.5}{t\_2} \cdot z1}{z1 \cdot z1}}\\ \end{array} \]
          (FPCore (z2 z0 z1)
            :precision binary64
            (let* ((t_0 (* (- (+ z2 z2) -0.5) PI))
                 (t_1 (tan t_0))
                 (t_2 (sqrt (pow (* t_1 z0) 2.0)))
                 (t_3 (* (fabs z0) (fabs t_1))))
            (if (<= t_0 -1e+32)
              (/ 1.0 (/ (- t_2 (/ (* -0.5 (* z1 z1)) t_2)) z1))
              (if (<= t_0 2e+17)
                (/
                 1.0
                 (sqrt (sqrt (pow (- (pow (* t_1 (/ z0 z1)) 2.0) -1.0) 2.0))))
                (if (<= t_0 1e+176)
                  (/
                   1.0
                   (/ (* (- 1.0 (/ (/ (* (* z1 z1) -0.5) t_3) t_3)) t_3) z1))
                  (/
                   1.0
                   (/
                    (+ (* t_2 z1) (* (/ (* (* z1 z1) 0.5) t_2) z1))
                    (* z1 z1))))))))
          double code(double z2, double z0, double z1) {
          	double t_0 = ((z2 + z2) - -0.5) * ((double) M_PI);
          	double t_1 = tan(t_0);
          	double t_2 = sqrt(pow((t_1 * z0), 2.0));
          	double t_3 = fabs(z0) * fabs(t_1);
          	double tmp;
          	if (t_0 <= -1e+32) {
          		tmp = 1.0 / ((t_2 - ((-0.5 * (z1 * z1)) / t_2)) / z1);
          	} else if (t_0 <= 2e+17) {
          		tmp = 1.0 / sqrt(sqrt(pow((pow((t_1 * (z0 / z1)), 2.0) - -1.0), 2.0)));
          	} else if (t_0 <= 1e+176) {
          		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_3) / t_3)) * t_3) / z1);
          	} else {
          		tmp = 1.0 / (((t_2 * z1) + ((((z1 * z1) * 0.5) / t_2) * z1)) / (z1 * z1));
          	}
          	return tmp;
          }
          
          public static double code(double z2, double z0, double z1) {
          	double t_0 = ((z2 + z2) - -0.5) * Math.PI;
          	double t_1 = Math.tan(t_0);
          	double t_2 = Math.sqrt(Math.pow((t_1 * z0), 2.0));
          	double t_3 = Math.abs(z0) * Math.abs(t_1);
          	double tmp;
          	if (t_0 <= -1e+32) {
          		tmp = 1.0 / ((t_2 - ((-0.5 * (z1 * z1)) / t_2)) / z1);
          	} else if (t_0 <= 2e+17) {
          		tmp = 1.0 / Math.sqrt(Math.sqrt(Math.pow((Math.pow((t_1 * (z0 / z1)), 2.0) - -1.0), 2.0)));
          	} else if (t_0 <= 1e+176) {
          		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_3) / t_3)) * t_3) / z1);
          	} else {
          		tmp = 1.0 / (((t_2 * z1) + ((((z1 * z1) * 0.5) / t_2) * z1)) / (z1 * z1));
          	}
          	return tmp;
          }
          
          def code(z2, z0, z1):
          	t_0 = ((z2 + z2) - -0.5) * math.pi
          	t_1 = math.tan(t_0)
          	t_2 = math.sqrt(math.pow((t_1 * z0), 2.0))
          	t_3 = math.fabs(z0) * math.fabs(t_1)
          	tmp = 0
          	if t_0 <= -1e+32:
          		tmp = 1.0 / ((t_2 - ((-0.5 * (z1 * z1)) / t_2)) / z1)
          	elif t_0 <= 2e+17:
          		tmp = 1.0 / math.sqrt(math.sqrt(math.pow((math.pow((t_1 * (z0 / z1)), 2.0) - -1.0), 2.0)))
          	elif t_0 <= 1e+176:
          		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_3) / t_3)) * t_3) / z1)
          	else:
          		tmp = 1.0 / (((t_2 * z1) + ((((z1 * z1) * 0.5) / t_2) * z1)) / (z1 * z1))
          	return tmp
          
          function code(z2, z0, z1)
          	t_0 = Float64(Float64(Float64(z2 + z2) - -0.5) * pi)
          	t_1 = tan(t_0)
          	t_2 = sqrt((Float64(t_1 * z0) ^ 2.0))
          	t_3 = Float64(abs(z0) * abs(t_1))
          	tmp = 0.0
          	if (t_0 <= -1e+32)
          		tmp = Float64(1.0 / Float64(Float64(t_2 - Float64(Float64(-0.5 * Float64(z1 * z1)) / t_2)) / z1));
          	elseif (t_0 <= 2e+17)
          		tmp = Float64(1.0 / sqrt(sqrt((Float64((Float64(t_1 * Float64(z0 / z1)) ^ 2.0) - -1.0) ^ 2.0))));
          	elseif (t_0 <= 1e+176)
          		tmp = Float64(1.0 / Float64(Float64(Float64(1.0 - Float64(Float64(Float64(Float64(z1 * z1) * -0.5) / t_3) / t_3)) * t_3) / z1));
          	else
          		tmp = Float64(1.0 / Float64(Float64(Float64(t_2 * z1) + Float64(Float64(Float64(Float64(z1 * z1) * 0.5) / t_2) * z1)) / Float64(z1 * z1)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(z2, z0, z1)
          	t_0 = ((z2 + z2) - -0.5) * pi;
          	t_1 = tan(t_0);
          	t_2 = sqrt(((t_1 * z0) ^ 2.0));
          	t_3 = abs(z0) * abs(t_1);
          	tmp = 0.0;
          	if (t_0 <= -1e+32)
          		tmp = 1.0 / ((t_2 - ((-0.5 * (z1 * z1)) / t_2)) / z1);
          	elseif (t_0 <= 2e+17)
          		tmp = 1.0 / sqrt(sqrt(((((t_1 * (z0 / z1)) ^ 2.0) - -1.0) ^ 2.0)));
          	elseif (t_0 <= 1e+176)
          		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_3) / t_3)) * t_3) / z1);
          	else
          		tmp = 1.0 / (((t_2 * z1) + ((((z1 * z1) * 0.5) / t_2) * z1)) / (z1 * z1));
          	end
          	tmp_2 = tmp;
          end
          
          code[z2_, z0_, z1_] := Block[{t$95$0 = N[(N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Tan[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[Power[N[(t$95$1 * z0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Abs[z0], $MachinePrecision] * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+32], N[(1.0 / N[(N[(t$95$2 - N[(N[(-0.5 * N[(z1 * z1), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+17], N[(1.0 / N[Sqrt[N[Sqrt[N[Power[N[(N[Power[N[(t$95$1 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+176], N[(1.0 / N[(N[(N[(1.0 - N[(N[(N[(N[(z1 * z1), $MachinePrecision] * -0.5), $MachinePrecision] / t$95$3), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(N[(t$95$2 * z1), $MachinePrecision] + N[(N[(N[(N[(z1 * z1), $MachinePrecision] * 0.5), $MachinePrecision] / t$95$2), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision] / N[(z1 * z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
          
          \begin{array}{l}
          t_0 := \left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\\
          t_1 := \tan t\_0\\
          t_2 := \sqrt{{\left(t\_1 \cdot z0\right)}^{2}}\\
          t_3 := \left|z0\right| \cdot \left|t\_1\right|\\
          \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+32}:\\
          \;\;\;\;\frac{1}{\frac{t\_2 - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{t\_2}}{z1}}\\
          
          \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+17}:\\
          \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_1 \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}}\\
          
          \mathbf{elif}\;t\_0 \leq 10^{+176}:\\
          \;\;\;\;\frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{t\_3}}{t\_3}\right) \cdot t\_3}{z1}}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{t\_2 \cdot z1 + \frac{\left(z1 \cdot z1\right) \cdot 0.5}{t\_2} \cdot z1}{z1 \cdot z1}}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64)) < -1.0000000000000001e32

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}} - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}}}}{z1}} \]

            if -1.0000000000000001e32 < (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64)) < 2e17

            1. Initial program 44.5%

              \[\frac{1}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
            2. Step-by-step derivation
              1. rem-square-sqrtN/A

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

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

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\sqrt{\left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right) \cdot \left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}}}} \]
              4. lower-*.f6450.4%

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

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{\color{blue}{{\left({\left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}^{2} - -1\right)}^{2}}}}} \]
              3. lower-pow.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\color{blue}{\left(\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \frac{z0}{z1}\right)}}^{2} - -1\right)}^{2}}}} \]
              6. lower-*.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
              9. lower-*.f6450.4%

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
            5. Applied rewrites50.4%

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

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

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites35.1%

              \[\leadsto \frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}\right) \cdot \left(\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|\right)}{z1}} \]

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

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites34.7%

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

          Alternative 7: 56.2% accurate, 0.5× speedup?

          \[\begin{array}{l} t_0 := \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\\ t_1 := \left|z0\right| \cdot \left|t\_0\right|\\ t_2 := \sqrt{{\left(t\_0 \cdot z0\right)}^{2}}\\ \mathbf{if}\;z2 \leq -1.92 \cdot 10^{+31}:\\ \;\;\;\;\frac{1}{\frac{t\_2 - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{t\_2}}{z1}}\\ \mathbf{elif}\;z2 \leq 2.65 \cdot 10^{+19}:\\ \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_0 \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}}\\ \mathbf{elif}\;z2 \leq 2.05 \cdot 10^{+176}:\\ \;\;\;\;\frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{t\_1}}{t\_1}\right) \cdot t\_1}{z1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{t\_1 \cdot z1 + \frac{\left(z1 \cdot z1\right) \cdot 0.5}{t\_1} \cdot z1}{z1 \cdot z1}}\\ \end{array} \]
          (FPCore (z2 z0 z1)
            :precision binary64
            (let* ((t_0 (tan (* (- (+ z2 z2) -0.5) PI)))
                 (t_1 (* (fabs z0) (fabs t_0)))
                 (t_2 (sqrt (pow (* t_0 z0) 2.0))))
            (if (<= z2 -1.92e+31)
              (/ 1.0 (/ (- t_2 (/ (* -0.5 (* z1 z1)) t_2)) z1))
              (if (<= z2 2.65e+19)
                (/
                 1.0
                 (sqrt (sqrt (pow (- (pow (* t_0 (/ z0 z1)) 2.0) -1.0) 2.0))))
                (if (<= z2 2.05e+176)
                  (/
                   1.0
                   (/ (* (- 1.0 (/ (/ (* (* z1 z1) -0.5) t_1) t_1)) t_1) z1))
                  (/
                   1.0
                   (/
                    (+ (* t_1 z1) (* (/ (* (* z1 z1) 0.5) t_1) z1))
                    (* z1 z1))))))))
          double code(double z2, double z0, double z1) {
          	double t_0 = tan((((z2 + z2) - -0.5) * ((double) M_PI)));
          	double t_1 = fabs(z0) * fabs(t_0);
          	double t_2 = sqrt(pow((t_0 * z0), 2.0));
          	double tmp;
          	if (z2 <= -1.92e+31) {
          		tmp = 1.0 / ((t_2 - ((-0.5 * (z1 * z1)) / t_2)) / z1);
          	} else if (z2 <= 2.65e+19) {
          		tmp = 1.0 / sqrt(sqrt(pow((pow((t_0 * (z0 / z1)), 2.0) - -1.0), 2.0)));
          	} else if (z2 <= 2.05e+176) {
          		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_1) / t_1)) * t_1) / z1);
          	} else {
          		tmp = 1.0 / (((t_1 * z1) + ((((z1 * z1) * 0.5) / t_1) * z1)) / (z1 * z1));
          	}
          	return tmp;
          }
          
          public static double code(double z2, double z0, double z1) {
          	double t_0 = Math.tan((((z2 + z2) - -0.5) * Math.PI));
          	double t_1 = Math.abs(z0) * Math.abs(t_0);
          	double t_2 = Math.sqrt(Math.pow((t_0 * z0), 2.0));
          	double tmp;
          	if (z2 <= -1.92e+31) {
          		tmp = 1.0 / ((t_2 - ((-0.5 * (z1 * z1)) / t_2)) / z1);
          	} else if (z2 <= 2.65e+19) {
          		tmp = 1.0 / Math.sqrt(Math.sqrt(Math.pow((Math.pow((t_0 * (z0 / z1)), 2.0) - -1.0), 2.0)));
          	} else if (z2 <= 2.05e+176) {
          		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_1) / t_1)) * t_1) / z1);
          	} else {
          		tmp = 1.0 / (((t_1 * z1) + ((((z1 * z1) * 0.5) / t_1) * z1)) / (z1 * z1));
          	}
          	return tmp;
          }
          
          def code(z2, z0, z1):
          	t_0 = math.tan((((z2 + z2) - -0.5) * math.pi))
          	t_1 = math.fabs(z0) * math.fabs(t_0)
          	t_2 = math.sqrt(math.pow((t_0 * z0), 2.0))
          	tmp = 0
          	if z2 <= -1.92e+31:
          		tmp = 1.0 / ((t_2 - ((-0.5 * (z1 * z1)) / t_2)) / z1)
          	elif z2 <= 2.65e+19:
          		tmp = 1.0 / math.sqrt(math.sqrt(math.pow((math.pow((t_0 * (z0 / z1)), 2.0) - -1.0), 2.0)))
          	elif z2 <= 2.05e+176:
          		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_1) / t_1)) * t_1) / z1)
          	else:
          		tmp = 1.0 / (((t_1 * z1) + ((((z1 * z1) * 0.5) / t_1) * z1)) / (z1 * z1))
          	return tmp
          
          function code(z2, z0, z1)
          	t_0 = tan(Float64(Float64(Float64(z2 + z2) - -0.5) * pi))
          	t_1 = Float64(abs(z0) * abs(t_0))
          	t_2 = sqrt((Float64(t_0 * z0) ^ 2.0))
          	tmp = 0.0
          	if (z2 <= -1.92e+31)
          		tmp = Float64(1.0 / Float64(Float64(t_2 - Float64(Float64(-0.5 * Float64(z1 * z1)) / t_2)) / z1));
          	elseif (z2 <= 2.65e+19)
          		tmp = Float64(1.0 / sqrt(sqrt((Float64((Float64(t_0 * Float64(z0 / z1)) ^ 2.0) - -1.0) ^ 2.0))));
          	elseif (z2 <= 2.05e+176)
          		tmp = Float64(1.0 / Float64(Float64(Float64(1.0 - Float64(Float64(Float64(Float64(z1 * z1) * -0.5) / t_1) / t_1)) * t_1) / z1));
          	else
          		tmp = Float64(1.0 / Float64(Float64(Float64(t_1 * z1) + Float64(Float64(Float64(Float64(z1 * z1) * 0.5) / t_1) * z1)) / Float64(z1 * z1)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(z2, z0, z1)
          	t_0 = tan((((z2 + z2) - -0.5) * pi));
          	t_1 = abs(z0) * abs(t_0);
          	t_2 = sqrt(((t_0 * z0) ^ 2.0));
          	tmp = 0.0;
          	if (z2 <= -1.92e+31)
          		tmp = 1.0 / ((t_2 - ((-0.5 * (z1 * z1)) / t_2)) / z1);
          	elseif (z2 <= 2.65e+19)
          		tmp = 1.0 / sqrt(sqrt(((((t_0 * (z0 / z1)) ^ 2.0) - -1.0) ^ 2.0)));
          	elseif (z2 <= 2.05e+176)
          		tmp = 1.0 / (((1.0 - ((((z1 * z1) * -0.5) / t_1) / t_1)) * t_1) / z1);
          	else
          		tmp = 1.0 / (((t_1 * z1) + ((((z1 * z1) * 0.5) / t_1) * z1)) / (z1 * z1));
          	end
          	tmp_2 = tmp;
          end
          
          code[z2_, z0_, z1_] := Block[{t$95$0 = N[Tan[N[(N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[z0], $MachinePrecision] * N[Abs[t$95$0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[Power[N[(t$95$0 * z0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z2, -1.92e+31], N[(1.0 / N[(N[(t$95$2 - N[(N[(-0.5 * N[(z1 * z1), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 2.65e+19], N[(1.0 / N[Sqrt[N[Sqrt[N[Power[N[(N[Power[N[(t$95$0 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 2.05e+176], N[(1.0 / N[(N[(N[(1.0 - N[(N[(N[(N[(z1 * z1), $MachinePrecision] * -0.5), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(N[(t$95$1 * z1), $MachinePrecision] + N[(N[(N[(N[(z1 * z1), $MachinePrecision] * 0.5), $MachinePrecision] / t$95$1), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision] / N[(z1 * z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
          
          \begin{array}{l}
          t_0 := \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\\
          t_1 := \left|z0\right| \cdot \left|t\_0\right|\\
          t_2 := \sqrt{{\left(t\_0 \cdot z0\right)}^{2}}\\
          \mathbf{if}\;z2 \leq -1.92 \cdot 10^{+31}:\\
          \;\;\;\;\frac{1}{\frac{t\_2 - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{t\_2}}{z1}}\\
          
          \mathbf{elif}\;z2 \leq 2.65 \cdot 10^{+19}:\\
          \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_0 \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}}\\
          
          \mathbf{elif}\;z2 \leq 2.05 \cdot 10^{+176}:\\
          \;\;\;\;\frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{t\_1}}{t\_1}\right) \cdot t\_1}{z1}}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{t\_1 \cdot z1 + \frac{\left(z1 \cdot z1\right) \cdot 0.5}{t\_1} \cdot z1}{z1 \cdot z1}}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if z2 < -1.9199999999999999e31

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}} - \frac{-0.5 \cdot \left(z1 \cdot z1\right)}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}}}}{z1}} \]

            if -1.9199999999999999e31 < z2 < 2.65e19

            1. Initial program 44.5%

              \[\frac{1}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
            2. Step-by-step derivation
              1. rem-square-sqrtN/A

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

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

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\sqrt{\left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right) \cdot \left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}}}} \]
              4. lower-*.f6450.4%

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

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{\color{blue}{{\left({\left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}^{2} - -1\right)}^{2}}}}} \]
              3. lower-pow.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\color{blue}{\left(\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \frac{z0}{z1}\right)}}^{2} - -1\right)}^{2}}}} \]
              6. lower-*.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
              9. lower-*.f6450.4%

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
            5. Applied rewrites50.4%

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

            if 2.65e19 < z2 < 2.05e176

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites35.1%

              \[\leadsto \frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}\right) \cdot \left(\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|\right)}{z1}} \]

            if 2.05e176 < z2

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites27.2%

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

          Alternative 8: 55.0% accurate, 0.5× speedup?

          \[\begin{array}{l} t_0 := \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\\ t_1 := \left|t\_0\right|\\ t_2 := \left|\left|z0\right|\right| \cdot t\_1\\ t_3 := \left|z1\right| \cdot \left|z1\right|\\ t_4 := t\_3 \cdot 0.5\\ \mathbf{if}\;z2 \leq -255000000:\\ \;\;\;\;e^{\log \left(\frac{\frac{\frac{t\_4}{t\_1} + t\_1 \cdot \left(\left|z0\right| \cdot \left|z0\right|\right)}{\left|z0\right|}}{\left|z1\right|}\right) \cdot -1}\\ \mathbf{elif}\;z2 \leq 2.65 \cdot 10^{+19}:\\ \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_0 \cdot \frac{\left|z0\right|}{\left|z1\right|}\right)}^{2} - -1\right)}^{2}}}}\\ \mathbf{elif}\;z2 \leq 2.05 \cdot 10^{+176}:\\ \;\;\;\;\frac{1}{\frac{\left(1 - \frac{\frac{t\_3 \cdot -0.5}{t\_2}}{t\_2}\right) \cdot t\_2}{\left|z1\right|}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{t\_2 \cdot \left|z1\right| + \frac{t\_4}{t\_2} \cdot \left|z1\right|}{t\_3}}\\ \end{array} \]
          (FPCore (z2 z0 z1)
            :precision binary64
            (let* ((t_0 (tan (* (- (+ z2 z2) -0.5) PI)))
                 (t_1 (fabs t_0))
                 (t_2 (* (fabs (fabs z0)) t_1))
                 (t_3 (* (fabs z1) (fabs z1)))
                 (t_4 (* t_3 0.5)))
            (if (<= z2 -255000000.0)
              (exp
               (*
                (log
                 (/
                  (/ (+ (/ t_4 t_1) (* t_1 (* (fabs z0) (fabs z0)))) (fabs z0))
                  (fabs z1)))
                -1.0))
              (if (<= z2 2.65e+19)
                (/
                 1.0
                 (sqrt
                  (sqrt
                   (pow
                    (- (pow (* t_0 (/ (fabs z0) (fabs z1))) 2.0) -1.0)
                    2.0))))
                (if (<= z2 2.05e+176)
                  (/
                   1.0
                   (/ (* (- 1.0 (/ (/ (* t_3 -0.5) t_2) t_2)) t_2) (fabs z1)))
                  (/
                   1.0
                   (/ (+ (* t_2 (fabs z1)) (* (/ t_4 t_2) (fabs z1))) t_3)))))))
          double code(double z2, double z0, double z1) {
          	double t_0 = tan((((z2 + z2) - -0.5) * ((double) M_PI)));
          	double t_1 = fabs(t_0);
          	double t_2 = fabs(fabs(z0)) * t_1;
          	double t_3 = fabs(z1) * fabs(z1);
          	double t_4 = t_3 * 0.5;
          	double tmp;
          	if (z2 <= -255000000.0) {
          		tmp = exp((log(((((t_4 / t_1) + (t_1 * (fabs(z0) * fabs(z0)))) / fabs(z0)) / fabs(z1))) * -1.0));
          	} else if (z2 <= 2.65e+19) {
          		tmp = 1.0 / sqrt(sqrt(pow((pow((t_0 * (fabs(z0) / fabs(z1))), 2.0) - -1.0), 2.0)));
          	} else if (z2 <= 2.05e+176) {
          		tmp = 1.0 / (((1.0 - (((t_3 * -0.5) / t_2) / t_2)) * t_2) / fabs(z1));
          	} else {
          		tmp = 1.0 / (((t_2 * fabs(z1)) + ((t_4 / t_2) * fabs(z1))) / t_3);
          	}
          	return tmp;
          }
          
          public static double code(double z2, double z0, double z1) {
          	double t_0 = Math.tan((((z2 + z2) - -0.5) * Math.PI));
          	double t_1 = Math.abs(t_0);
          	double t_2 = Math.abs(Math.abs(z0)) * t_1;
          	double t_3 = Math.abs(z1) * Math.abs(z1);
          	double t_4 = t_3 * 0.5;
          	double tmp;
          	if (z2 <= -255000000.0) {
          		tmp = Math.exp((Math.log(((((t_4 / t_1) + (t_1 * (Math.abs(z0) * Math.abs(z0)))) / Math.abs(z0)) / Math.abs(z1))) * -1.0));
          	} else if (z2 <= 2.65e+19) {
          		tmp = 1.0 / Math.sqrt(Math.sqrt(Math.pow((Math.pow((t_0 * (Math.abs(z0) / Math.abs(z1))), 2.0) - -1.0), 2.0)));
          	} else if (z2 <= 2.05e+176) {
          		tmp = 1.0 / (((1.0 - (((t_3 * -0.5) / t_2) / t_2)) * t_2) / Math.abs(z1));
          	} else {
          		tmp = 1.0 / (((t_2 * Math.abs(z1)) + ((t_4 / t_2) * Math.abs(z1))) / t_3);
          	}
          	return tmp;
          }
          
          def code(z2, z0, z1):
          	t_0 = math.tan((((z2 + z2) - -0.5) * math.pi))
          	t_1 = math.fabs(t_0)
          	t_2 = math.fabs(math.fabs(z0)) * t_1
          	t_3 = math.fabs(z1) * math.fabs(z1)
          	t_4 = t_3 * 0.5
          	tmp = 0
          	if z2 <= -255000000.0:
          		tmp = math.exp((math.log(((((t_4 / t_1) + (t_1 * (math.fabs(z0) * math.fabs(z0)))) / math.fabs(z0)) / math.fabs(z1))) * -1.0))
          	elif z2 <= 2.65e+19:
          		tmp = 1.0 / math.sqrt(math.sqrt(math.pow((math.pow((t_0 * (math.fabs(z0) / math.fabs(z1))), 2.0) - -1.0), 2.0)))
          	elif z2 <= 2.05e+176:
          		tmp = 1.0 / (((1.0 - (((t_3 * -0.5) / t_2) / t_2)) * t_2) / math.fabs(z1))
          	else:
          		tmp = 1.0 / (((t_2 * math.fabs(z1)) + ((t_4 / t_2) * math.fabs(z1))) / t_3)
          	return tmp
          
          function code(z2, z0, z1)
          	t_0 = tan(Float64(Float64(Float64(z2 + z2) - -0.5) * pi))
          	t_1 = abs(t_0)
          	t_2 = Float64(abs(abs(z0)) * t_1)
          	t_3 = Float64(abs(z1) * abs(z1))
          	t_4 = Float64(t_3 * 0.5)
          	tmp = 0.0
          	if (z2 <= -255000000.0)
          		tmp = exp(Float64(log(Float64(Float64(Float64(Float64(t_4 / t_1) + Float64(t_1 * Float64(abs(z0) * abs(z0)))) / abs(z0)) / abs(z1))) * -1.0));
          	elseif (z2 <= 2.65e+19)
          		tmp = Float64(1.0 / sqrt(sqrt((Float64((Float64(t_0 * Float64(abs(z0) / abs(z1))) ^ 2.0) - -1.0) ^ 2.0))));
          	elseif (z2 <= 2.05e+176)
          		tmp = Float64(1.0 / Float64(Float64(Float64(1.0 - Float64(Float64(Float64(t_3 * -0.5) / t_2) / t_2)) * t_2) / abs(z1)));
          	else
          		tmp = Float64(1.0 / Float64(Float64(Float64(t_2 * abs(z1)) + Float64(Float64(t_4 / t_2) * abs(z1))) / t_3));
          	end
          	return tmp
          end
          
          function tmp_2 = code(z2, z0, z1)
          	t_0 = tan((((z2 + z2) - -0.5) * pi));
          	t_1 = abs(t_0);
          	t_2 = abs(abs(z0)) * t_1;
          	t_3 = abs(z1) * abs(z1);
          	t_4 = t_3 * 0.5;
          	tmp = 0.0;
          	if (z2 <= -255000000.0)
          		tmp = exp((log(((((t_4 / t_1) + (t_1 * (abs(z0) * abs(z0)))) / abs(z0)) / abs(z1))) * -1.0));
          	elseif (z2 <= 2.65e+19)
          		tmp = 1.0 / sqrt(sqrt(((((t_0 * (abs(z0) / abs(z1))) ^ 2.0) - -1.0) ^ 2.0)));
          	elseif (z2 <= 2.05e+176)
          		tmp = 1.0 / (((1.0 - (((t_3 * -0.5) / t_2) / t_2)) * t_2) / abs(z1));
          	else
          		tmp = 1.0 / (((t_2 * abs(z1)) + ((t_4 / t_2) * abs(z1))) / t_3);
          	end
          	tmp_2 = tmp;
          end
          
          code[z2_, z0_, z1_] := Block[{t$95$0 = N[Tan[N[(N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Abs[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[N[Abs[z0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[Abs[z1], $MachinePrecision] * N[Abs[z1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * 0.5), $MachinePrecision]}, If[LessEqual[z2, -255000000.0], N[Exp[N[(N[Log[N[(N[(N[(N[(t$95$4 / t$95$1), $MachinePrecision] + N[(t$95$1 * N[(N[Abs[z0], $MachinePrecision] * N[Abs[z0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Abs[z0], $MachinePrecision]), $MachinePrecision] / N[Abs[z1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -1.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[z2, 2.65e+19], N[(1.0 / N[Sqrt[N[Sqrt[N[Power[N[(N[Power[N[(t$95$0 * N[(N[Abs[z0], $MachinePrecision] / N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 2.05e+176], N[(1.0 / N[(N[(N[(1.0 - N[(N[(N[(t$95$3 * -0.5), $MachinePrecision] / t$95$2), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] / N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(N[(t$95$2 * N[Abs[z1], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 / t$95$2), $MachinePrecision] * N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]]]
          
          \begin{array}{l}
          t_0 := \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\\
          t_1 := \left|t\_0\right|\\
          t_2 := \left|\left|z0\right|\right| \cdot t\_1\\
          t_3 := \left|z1\right| \cdot \left|z1\right|\\
          t_4 := t\_3 \cdot 0.5\\
          \mathbf{if}\;z2 \leq -255000000:\\
          \;\;\;\;e^{\log \left(\frac{\frac{\frac{t\_4}{t\_1} + t\_1 \cdot \left(\left|z0\right| \cdot \left|z0\right|\right)}{\left|z0\right|}}{\left|z1\right|}\right) \cdot -1}\\
          
          \mathbf{elif}\;z2 \leq 2.65 \cdot 10^{+19}:\\
          \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_0 \cdot \frac{\left|z0\right|}{\left|z1\right|}\right)}^{2} - -1\right)}^{2}}}}\\
          
          \mathbf{elif}\;z2 \leq 2.05 \cdot 10^{+176}:\\
          \;\;\;\;\frac{1}{\frac{\left(1 - \frac{\frac{t\_3 \cdot -0.5}{t\_2}}{t\_2}\right) \cdot t\_2}{\left|z1\right|}}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{t\_2 \cdot \left|z1\right| + \frac{t\_4}{t\_2} \cdot \left|z1\right|}{t\_3}}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if z2 < -2.55e8

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

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

              \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            7. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            8. Applied rewrites38.4%

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

                \[\leadsto \color{blue}{\frac{1}{\frac{1}{z1} \cdot \frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}}} \]
            10. Applied rewrites19.5%

              \[\leadsto \color{blue}{e^{\log \left(\frac{\frac{\frac{\left(z1 \cdot z1\right) \cdot 0.5}{\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|} + \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right| \cdot \left(z0 \cdot z0\right)}{z0}}{z1}\right) \cdot -1}} \]

            if -2.55e8 < z2 < 2.65e19

            1. Initial program 44.5%

              \[\frac{1}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
            2. Step-by-step derivation
              1. rem-square-sqrtN/A

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

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

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\sqrt{\left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right) \cdot \left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}}}} \]
              4. lower-*.f6450.4%

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

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{\color{blue}{{\left({\left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}^{2} - -1\right)}^{2}}}}} \]
              3. lower-pow.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\color{blue}{\left(\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \frac{z0}{z1}\right)}}^{2} - -1\right)}^{2}}}} \]
              6. lower-*.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
              9. lower-*.f6450.4%

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
            5. Applied rewrites50.4%

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

            if 2.65e19 < z2 < 2.05e176

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites35.1%

              \[\leadsto \frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}\right) \cdot \left(\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|\right)}{z1}} \]

            if 2.05e176 < z2

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites27.2%

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

          Alternative 9: 54.9% accurate, 0.6× speedup?

          \[\begin{array}{l} t_0 := \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\\ t_1 := \left|t\_0\right|\\ t_2 := \left|z0\right| \cdot t\_1\\ t_3 := \left|z1\right| \cdot \left|z1\right|\\ t_4 := t\_3 \cdot -0.5\\ \mathbf{if}\;z2 \leq -255000000:\\ \;\;\;\;\frac{1}{\frac{1}{\left|z1\right|} \cdot \frac{\frac{1}{\frac{t\_1}{{\left(t\_0 \cdot z0\right)}^{2} - t\_4}}}{z0}}\\ \mathbf{elif}\;z2 \leq 2.65 \cdot 10^{+19}:\\ \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_0 \cdot \frac{z0}{\left|z1\right|}\right)}^{2} - -1\right)}^{2}}}}\\ \mathbf{elif}\;z2 \leq 2.05 \cdot 10^{+176}:\\ \;\;\;\;\frac{1}{\frac{\left(1 - \frac{\frac{t\_4}{t\_2}}{t\_2}\right) \cdot t\_2}{\left|z1\right|}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{t\_2 \cdot \left|z1\right| + \frac{t\_3 \cdot 0.5}{t\_2} \cdot \left|z1\right|}{t\_3}}\\ \end{array} \]
          (FPCore (z2 z0 z1)
            :precision binary64
            (let* ((t_0 (tan (* (- (+ z2 z2) -0.5) PI)))
                 (t_1 (fabs t_0))
                 (t_2 (* (fabs z0) t_1))
                 (t_3 (* (fabs z1) (fabs z1)))
                 (t_4 (* t_3 -0.5)))
            (if (<= z2 -255000000.0)
              (/
               1.0
               (*
                (/ 1.0 (fabs z1))
                (/ (/ 1.0 (/ t_1 (- (pow (* t_0 z0) 2.0) t_4))) z0)))
              (if (<= z2 2.65e+19)
                (/
                 1.0
                 (sqrt
                  (sqrt (pow (- (pow (* t_0 (/ z0 (fabs z1))) 2.0) -1.0) 2.0))))
                (if (<= z2 2.05e+176)
                  (/ 1.0 (/ (* (- 1.0 (/ (/ t_4 t_2) t_2)) t_2) (fabs z1)))
                  (/
                   1.0
                   (/
                    (+ (* t_2 (fabs z1)) (* (/ (* t_3 0.5) t_2) (fabs z1)))
                    t_3)))))))
          double code(double z2, double z0, double z1) {
          	double t_0 = tan((((z2 + z2) - -0.5) * ((double) M_PI)));
          	double t_1 = fabs(t_0);
          	double t_2 = fabs(z0) * t_1;
          	double t_3 = fabs(z1) * fabs(z1);
          	double t_4 = t_3 * -0.5;
          	double tmp;
          	if (z2 <= -255000000.0) {
          		tmp = 1.0 / ((1.0 / fabs(z1)) * ((1.0 / (t_1 / (pow((t_0 * z0), 2.0) - t_4))) / z0));
          	} else if (z2 <= 2.65e+19) {
          		tmp = 1.0 / sqrt(sqrt(pow((pow((t_0 * (z0 / fabs(z1))), 2.0) - -1.0), 2.0)));
          	} else if (z2 <= 2.05e+176) {
          		tmp = 1.0 / (((1.0 - ((t_4 / t_2) / t_2)) * t_2) / fabs(z1));
          	} else {
          		tmp = 1.0 / (((t_2 * fabs(z1)) + (((t_3 * 0.5) / t_2) * fabs(z1))) / t_3);
          	}
          	return tmp;
          }
          
          public static double code(double z2, double z0, double z1) {
          	double t_0 = Math.tan((((z2 + z2) - -0.5) * Math.PI));
          	double t_1 = Math.abs(t_0);
          	double t_2 = Math.abs(z0) * t_1;
          	double t_3 = Math.abs(z1) * Math.abs(z1);
          	double t_4 = t_3 * -0.5;
          	double tmp;
          	if (z2 <= -255000000.0) {
          		tmp = 1.0 / ((1.0 / Math.abs(z1)) * ((1.0 / (t_1 / (Math.pow((t_0 * z0), 2.0) - t_4))) / z0));
          	} else if (z2 <= 2.65e+19) {
          		tmp = 1.0 / Math.sqrt(Math.sqrt(Math.pow((Math.pow((t_0 * (z0 / Math.abs(z1))), 2.0) - -1.0), 2.0)));
          	} else if (z2 <= 2.05e+176) {
          		tmp = 1.0 / (((1.0 - ((t_4 / t_2) / t_2)) * t_2) / Math.abs(z1));
          	} else {
          		tmp = 1.0 / (((t_2 * Math.abs(z1)) + (((t_3 * 0.5) / t_2) * Math.abs(z1))) / t_3);
          	}
          	return tmp;
          }
          
          def code(z2, z0, z1):
          	t_0 = math.tan((((z2 + z2) - -0.5) * math.pi))
          	t_1 = math.fabs(t_0)
          	t_2 = math.fabs(z0) * t_1
          	t_3 = math.fabs(z1) * math.fabs(z1)
          	t_4 = t_3 * -0.5
          	tmp = 0
          	if z2 <= -255000000.0:
          		tmp = 1.0 / ((1.0 / math.fabs(z1)) * ((1.0 / (t_1 / (math.pow((t_0 * z0), 2.0) - t_4))) / z0))
          	elif z2 <= 2.65e+19:
          		tmp = 1.0 / math.sqrt(math.sqrt(math.pow((math.pow((t_0 * (z0 / math.fabs(z1))), 2.0) - -1.0), 2.0)))
          	elif z2 <= 2.05e+176:
          		tmp = 1.0 / (((1.0 - ((t_4 / t_2) / t_2)) * t_2) / math.fabs(z1))
          	else:
          		tmp = 1.0 / (((t_2 * math.fabs(z1)) + (((t_3 * 0.5) / t_2) * math.fabs(z1))) / t_3)
          	return tmp
          
          function code(z2, z0, z1)
          	t_0 = tan(Float64(Float64(Float64(z2 + z2) - -0.5) * pi))
          	t_1 = abs(t_0)
          	t_2 = Float64(abs(z0) * t_1)
          	t_3 = Float64(abs(z1) * abs(z1))
          	t_4 = Float64(t_3 * -0.5)
          	tmp = 0.0
          	if (z2 <= -255000000.0)
          		tmp = Float64(1.0 / Float64(Float64(1.0 / abs(z1)) * Float64(Float64(1.0 / Float64(t_1 / Float64((Float64(t_0 * z0) ^ 2.0) - t_4))) / z0)));
          	elseif (z2 <= 2.65e+19)
          		tmp = Float64(1.0 / sqrt(sqrt((Float64((Float64(t_0 * Float64(z0 / abs(z1))) ^ 2.0) - -1.0) ^ 2.0))));
          	elseif (z2 <= 2.05e+176)
          		tmp = Float64(1.0 / Float64(Float64(Float64(1.0 - Float64(Float64(t_4 / t_2) / t_2)) * t_2) / abs(z1)));
          	else
          		tmp = Float64(1.0 / Float64(Float64(Float64(t_2 * abs(z1)) + Float64(Float64(Float64(t_3 * 0.5) / t_2) * abs(z1))) / t_3));
          	end
          	return tmp
          end
          
          function tmp_2 = code(z2, z0, z1)
          	t_0 = tan((((z2 + z2) - -0.5) * pi));
          	t_1 = abs(t_0);
          	t_2 = abs(z0) * t_1;
          	t_3 = abs(z1) * abs(z1);
          	t_4 = t_3 * -0.5;
          	tmp = 0.0;
          	if (z2 <= -255000000.0)
          		tmp = 1.0 / ((1.0 / abs(z1)) * ((1.0 / (t_1 / (((t_0 * z0) ^ 2.0) - t_4))) / z0));
          	elseif (z2 <= 2.65e+19)
          		tmp = 1.0 / sqrt(sqrt(((((t_0 * (z0 / abs(z1))) ^ 2.0) - -1.0) ^ 2.0)));
          	elseif (z2 <= 2.05e+176)
          		tmp = 1.0 / (((1.0 - ((t_4 / t_2) / t_2)) * t_2) / abs(z1));
          	else
          		tmp = 1.0 / (((t_2 * abs(z1)) + (((t_3 * 0.5) / t_2) * abs(z1))) / t_3);
          	end
          	tmp_2 = tmp;
          end
          
          code[z2_, z0_, z1_] := Block[{t$95$0 = N[Tan[N[(N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Abs[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[z0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[Abs[z1], $MachinePrecision] * N[Abs[z1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * -0.5), $MachinePrecision]}, If[LessEqual[z2, -255000000.0], N[(1.0 / N[(N[(1.0 / N[Abs[z1], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / N[(t$95$1 / N[(N[Power[N[(t$95$0 * z0), $MachinePrecision], 2.0], $MachinePrecision] - t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 2.65e+19], N[(1.0 / N[Sqrt[N[Sqrt[N[Power[N[(N[Power[N[(t$95$0 * N[(z0 / N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 2.05e+176], N[(1.0 / N[(N[(N[(1.0 - N[(N[(t$95$4 / t$95$2), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] / N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(N[(t$95$2 * N[Abs[z1], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$3 * 0.5), $MachinePrecision] / t$95$2), $MachinePrecision] * N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]]]
          
          \begin{array}{l}
          t_0 := \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\\
          t_1 := \left|t\_0\right|\\
          t_2 := \left|z0\right| \cdot t\_1\\
          t_3 := \left|z1\right| \cdot \left|z1\right|\\
          t_4 := t\_3 \cdot -0.5\\
          \mathbf{if}\;z2 \leq -255000000:\\
          \;\;\;\;\frac{1}{\frac{1}{\left|z1\right|} \cdot \frac{\frac{1}{\frac{t\_1}{{\left(t\_0 \cdot z0\right)}^{2} - t\_4}}}{z0}}\\
          
          \mathbf{elif}\;z2 \leq 2.65 \cdot 10^{+19}:\\
          \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_0 \cdot \frac{z0}{\left|z1\right|}\right)}^{2} - -1\right)}^{2}}}}\\
          
          \mathbf{elif}\;z2 \leq 2.05 \cdot 10^{+176}:\\
          \;\;\;\;\frac{1}{\frac{\left(1 - \frac{\frac{t\_4}{t\_2}}{t\_2}\right) \cdot t\_2}{\left|z1\right|}}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{t\_2 \cdot \left|z1\right| + \frac{t\_3 \cdot 0.5}{t\_2} \cdot \left|z1\right|}{t\_3}}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if z2 < -2.55e8

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

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

              \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            7. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            8. Applied rewrites38.4%

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

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

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}} \]
              3. add-to-fractionN/A

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\frac{\left(\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}} \]
              4. div-flipN/A

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\frac{1}{\frac{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}{\left(\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \left(z1 \cdot z1\right) \cdot \frac{1}{2}}}}{z0}} \]
            10. Applied rewrites38.5%

              \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\frac{1}{\frac{\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2} - \left(z1 \cdot z1\right) \cdot -0.5}}}{z0}} \]

            if -2.55e8 < z2 < 2.65e19

            1. Initial program 44.5%

              \[\frac{1}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
            2. Step-by-step derivation
              1. rem-square-sqrtN/A

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

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

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\sqrt{\left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right) \cdot \left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}}}} \]
              4. lower-*.f6450.4%

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

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{\color{blue}{{\left({\left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}^{2} - -1\right)}^{2}}}}} \]
              3. lower-pow.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\color{blue}{\left(\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \frac{z0}{z1}\right)}}^{2} - -1\right)}^{2}}}} \]
              6. lower-*.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
              9. lower-*.f6450.4%

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
            5. Applied rewrites50.4%

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

            if 2.65e19 < z2 < 2.05e176

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites35.1%

              \[\leadsto \frac{1}{\frac{\left(1 - \frac{\frac{\left(z1 \cdot z1\right) \cdot -0.5}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}\right) \cdot \left(\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|\right)}{z1}} \]

            if 2.05e176 < z2

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites27.2%

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

          Alternative 10: 54.8% accurate, 0.6× speedup?

          \[\begin{array}{l} t_0 := \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\\ t_1 := \left|t\_0\right|\\ t_2 := \frac{1}{\left|z1\right|}\\ t_3 := \left|z0\right| \cdot t\_1\\ t_4 := \left|z1\right| \cdot \left|z1\right|\\ t_5 := t\_4 \cdot 0.5\\ \mathbf{if}\;z2 \leq -255000000:\\ \;\;\;\;\frac{1}{t\_2 \cdot \frac{\frac{1}{\frac{t\_1}{{\left(t\_0 \cdot z0\right)}^{2} - t\_4 \cdot -0.5}}}{z0}}\\ \mathbf{elif}\;z2 \leq 9.8 \cdot 10^{+64}:\\ \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_0 \cdot \frac{z0}{\left|z1\right|}\right)}^{2} - -1\right)}^{2}}}}\\ \mathbf{elif}\;z2 \leq 2.3 \cdot 10^{+175}:\\ \;\;\;\;\frac{1}{t\_2 \cdot \frac{\left(t\_1 \cdot \left(z0 \cdot z0\right)\right) \cdot z0 + \frac{t\_5}{t\_1} \cdot z0}{z0 \cdot z0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{t\_3 \cdot \left|z1\right| + \frac{t\_5}{t\_3} \cdot \left|z1\right|}{t\_4}}\\ \end{array} \]
          (FPCore (z2 z0 z1)
            :precision binary64
            (let* ((t_0 (tan (* (- (+ z2 z2) -0.5) PI)))
                 (t_1 (fabs t_0))
                 (t_2 (/ 1.0 (fabs z1)))
                 (t_3 (* (fabs z0) t_1))
                 (t_4 (* (fabs z1) (fabs z1)))
                 (t_5 (* t_4 0.5)))
            (if (<= z2 -255000000.0)
              (/
               1.0
               (*
                t_2
                (/ (/ 1.0 (/ t_1 (- (pow (* t_0 z0) 2.0) (* t_4 -0.5)))) z0)))
              (if (<= z2 9.8e+64)
                (/
                 1.0
                 (sqrt
                  (sqrt (pow (- (pow (* t_0 (/ z0 (fabs z1))) 2.0) -1.0) 2.0))))
                (if (<= z2 2.3e+175)
                  (/
                   1.0
                   (*
                    t_2
                    (/
                     (+ (* (* t_1 (* z0 z0)) z0) (* (/ t_5 t_1) z0))
                     (* z0 z0))))
                  (/
                   1.0
                   (/ (+ (* t_3 (fabs z1)) (* (/ t_5 t_3) (fabs z1))) t_4)))))))
          double code(double z2, double z0, double z1) {
          	double t_0 = tan((((z2 + z2) - -0.5) * ((double) M_PI)));
          	double t_1 = fabs(t_0);
          	double t_2 = 1.0 / fabs(z1);
          	double t_3 = fabs(z0) * t_1;
          	double t_4 = fabs(z1) * fabs(z1);
          	double t_5 = t_4 * 0.5;
          	double tmp;
          	if (z2 <= -255000000.0) {
          		tmp = 1.0 / (t_2 * ((1.0 / (t_1 / (pow((t_0 * z0), 2.0) - (t_4 * -0.5)))) / z0));
          	} else if (z2 <= 9.8e+64) {
          		tmp = 1.0 / sqrt(sqrt(pow((pow((t_0 * (z0 / fabs(z1))), 2.0) - -1.0), 2.0)));
          	} else if (z2 <= 2.3e+175) {
          		tmp = 1.0 / (t_2 * ((((t_1 * (z0 * z0)) * z0) + ((t_5 / t_1) * z0)) / (z0 * z0)));
          	} else {
          		tmp = 1.0 / (((t_3 * fabs(z1)) + ((t_5 / t_3) * fabs(z1))) / t_4);
          	}
          	return tmp;
          }
          
          public static double code(double z2, double z0, double z1) {
          	double t_0 = Math.tan((((z2 + z2) - -0.5) * Math.PI));
          	double t_1 = Math.abs(t_0);
          	double t_2 = 1.0 / Math.abs(z1);
          	double t_3 = Math.abs(z0) * t_1;
          	double t_4 = Math.abs(z1) * Math.abs(z1);
          	double t_5 = t_4 * 0.5;
          	double tmp;
          	if (z2 <= -255000000.0) {
          		tmp = 1.0 / (t_2 * ((1.0 / (t_1 / (Math.pow((t_0 * z0), 2.0) - (t_4 * -0.5)))) / z0));
          	} else if (z2 <= 9.8e+64) {
          		tmp = 1.0 / Math.sqrt(Math.sqrt(Math.pow((Math.pow((t_0 * (z0 / Math.abs(z1))), 2.0) - -1.0), 2.0)));
          	} else if (z2 <= 2.3e+175) {
          		tmp = 1.0 / (t_2 * ((((t_1 * (z0 * z0)) * z0) + ((t_5 / t_1) * z0)) / (z0 * z0)));
          	} else {
          		tmp = 1.0 / (((t_3 * Math.abs(z1)) + ((t_5 / t_3) * Math.abs(z1))) / t_4);
          	}
          	return tmp;
          }
          
          def code(z2, z0, z1):
          	t_0 = math.tan((((z2 + z2) - -0.5) * math.pi))
          	t_1 = math.fabs(t_0)
          	t_2 = 1.0 / math.fabs(z1)
          	t_3 = math.fabs(z0) * t_1
          	t_4 = math.fabs(z1) * math.fabs(z1)
          	t_5 = t_4 * 0.5
          	tmp = 0
          	if z2 <= -255000000.0:
          		tmp = 1.0 / (t_2 * ((1.0 / (t_1 / (math.pow((t_0 * z0), 2.0) - (t_4 * -0.5)))) / z0))
          	elif z2 <= 9.8e+64:
          		tmp = 1.0 / math.sqrt(math.sqrt(math.pow((math.pow((t_0 * (z0 / math.fabs(z1))), 2.0) - -1.0), 2.0)))
          	elif z2 <= 2.3e+175:
          		tmp = 1.0 / (t_2 * ((((t_1 * (z0 * z0)) * z0) + ((t_5 / t_1) * z0)) / (z0 * z0)))
          	else:
          		tmp = 1.0 / (((t_3 * math.fabs(z1)) + ((t_5 / t_3) * math.fabs(z1))) / t_4)
          	return tmp
          
          function code(z2, z0, z1)
          	t_0 = tan(Float64(Float64(Float64(z2 + z2) - -0.5) * pi))
          	t_1 = abs(t_0)
          	t_2 = Float64(1.0 / abs(z1))
          	t_3 = Float64(abs(z0) * t_1)
          	t_4 = Float64(abs(z1) * abs(z1))
          	t_5 = Float64(t_4 * 0.5)
          	tmp = 0.0
          	if (z2 <= -255000000.0)
          		tmp = Float64(1.0 / Float64(t_2 * Float64(Float64(1.0 / Float64(t_1 / Float64((Float64(t_0 * z0) ^ 2.0) - Float64(t_4 * -0.5)))) / z0)));
          	elseif (z2 <= 9.8e+64)
          		tmp = Float64(1.0 / sqrt(sqrt((Float64((Float64(t_0 * Float64(z0 / abs(z1))) ^ 2.0) - -1.0) ^ 2.0))));
          	elseif (z2 <= 2.3e+175)
          		tmp = Float64(1.0 / Float64(t_2 * Float64(Float64(Float64(Float64(t_1 * Float64(z0 * z0)) * z0) + Float64(Float64(t_5 / t_1) * z0)) / Float64(z0 * z0))));
          	else
          		tmp = Float64(1.0 / Float64(Float64(Float64(t_3 * abs(z1)) + Float64(Float64(t_5 / t_3) * abs(z1))) / t_4));
          	end
          	return tmp
          end
          
          function tmp_2 = code(z2, z0, z1)
          	t_0 = tan((((z2 + z2) - -0.5) * pi));
          	t_1 = abs(t_0);
          	t_2 = 1.0 / abs(z1);
          	t_3 = abs(z0) * t_1;
          	t_4 = abs(z1) * abs(z1);
          	t_5 = t_4 * 0.5;
          	tmp = 0.0;
          	if (z2 <= -255000000.0)
          		tmp = 1.0 / (t_2 * ((1.0 / (t_1 / (((t_0 * z0) ^ 2.0) - (t_4 * -0.5)))) / z0));
          	elseif (z2 <= 9.8e+64)
          		tmp = 1.0 / sqrt(sqrt(((((t_0 * (z0 / abs(z1))) ^ 2.0) - -1.0) ^ 2.0)));
          	elseif (z2 <= 2.3e+175)
          		tmp = 1.0 / (t_2 * ((((t_1 * (z0 * z0)) * z0) + ((t_5 / t_1) * z0)) / (z0 * z0)));
          	else
          		tmp = 1.0 / (((t_3 * abs(z1)) + ((t_5 / t_3) * abs(z1))) / t_4);
          	end
          	tmp_2 = tmp;
          end
          
          code[z2_, z0_, z1_] := Block[{t$95$0 = N[Tan[N[(N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Abs[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Abs[z1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Abs[z0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[Abs[z1], $MachinePrecision] * N[Abs[z1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * 0.5), $MachinePrecision]}, If[LessEqual[z2, -255000000.0], N[(1.0 / N[(t$95$2 * N[(N[(1.0 / N[(t$95$1 / N[(N[Power[N[(t$95$0 * z0), $MachinePrecision], 2.0], $MachinePrecision] - N[(t$95$4 * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 9.8e+64], N[(1.0 / N[Sqrt[N[Sqrt[N[Power[N[(N[Power[N[(t$95$0 * N[(z0 / N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 2.3e+175], N[(1.0 / N[(t$95$2 * N[(N[(N[(N[(t$95$1 * N[(z0 * z0), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] + N[(N[(t$95$5 / t$95$1), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision] / N[(z0 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(N[(t$95$3 * N[Abs[z1], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 / t$95$3), $MachinePrecision] * N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
          
          \begin{array}{l}
          t_0 := \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\\
          t_1 := \left|t\_0\right|\\
          t_2 := \frac{1}{\left|z1\right|}\\
          t_3 := \left|z0\right| \cdot t\_1\\
          t_4 := \left|z1\right| \cdot \left|z1\right|\\
          t_5 := t\_4 \cdot 0.5\\
          \mathbf{if}\;z2 \leq -255000000:\\
          \;\;\;\;\frac{1}{t\_2 \cdot \frac{\frac{1}{\frac{t\_1}{{\left(t\_0 \cdot z0\right)}^{2} - t\_4 \cdot -0.5}}}{z0}}\\
          
          \mathbf{elif}\;z2 \leq 9.8 \cdot 10^{+64}:\\
          \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_0 \cdot \frac{z0}{\left|z1\right|}\right)}^{2} - -1\right)}^{2}}}}\\
          
          \mathbf{elif}\;z2 \leq 2.3 \cdot 10^{+175}:\\
          \;\;\;\;\frac{1}{t\_2 \cdot \frac{\left(t\_1 \cdot \left(z0 \cdot z0\right)\right) \cdot z0 + \frac{t\_5}{t\_1} \cdot z0}{z0 \cdot z0}}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{t\_3 \cdot \left|z1\right| + \frac{t\_5}{t\_3} \cdot \left|z1\right|}{t\_4}}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if z2 < -2.55e8

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

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

              \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            7. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            8. Applied rewrites38.4%

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

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

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}} \]
              3. add-to-fractionN/A

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\frac{\left(\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}} \]
              4. div-flipN/A

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\frac{1}{\frac{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}{\left(\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \left(z1 \cdot z1\right) \cdot \frac{1}{2}}}}{z0}} \]
            10. Applied rewrites38.5%

              \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\frac{1}{\frac{\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2} - \left(z1 \cdot z1\right) \cdot -0.5}}}{z0}} \]

            if -2.55e8 < z2 < 9.8000000000000005e64

            1. Initial program 44.5%

              \[\frac{1}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
            2. Step-by-step derivation
              1. rem-square-sqrtN/A

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

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

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\sqrt{\left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right) \cdot \left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}}}} \]
              4. lower-*.f6450.4%

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

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{\color{blue}{{\left({\left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}^{2} - -1\right)}^{2}}}}} \]
              3. lower-pow.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\color{blue}{\left(\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \frac{z0}{z1}\right)}}^{2} - -1\right)}^{2}}}} \]
              6. lower-*.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
              9. lower-*.f6450.4%

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
            5. Applied rewrites50.4%

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

            if 9.8000000000000005e64 < z2 < 2.3e175

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

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

              \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            7. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            8. Applied rewrites38.4%

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

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

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}} \]
              3. div-addN/A

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \left(\frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}{z0} + \frac{\frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{\color{blue}{z0}}\right)} \]
              4. common-denominatorN/A

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\left(\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right) \cdot z0 + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}} \cdot z0}{z0 \cdot \color{blue}{z0}}} \]
            10. Applied rewrites21.9%

              \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\left(\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right| \cdot \left(z0 \cdot z0\right)\right) \cdot z0 + \frac{\left(z1 \cdot z1\right) \cdot 0.5}{\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|} \cdot z0}{z0 \cdot \color{blue}{z0}}} \]

            if 2.3e175 < z2

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites27.2%

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

          Alternative 11: 54.3% accurate, 0.7× speedup?

          \[\begin{array}{l} t_0 := \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\\ t_1 := \left|t\_0\right|\\ t_2 := \left|z0\right| \cdot t\_1\\ t_3 := t\_1 \cdot \left(z0 \cdot z0\right)\\ t_4 := \left|z1\right| \cdot \left|z1\right|\\ t_5 := t\_4 \cdot 0.5\\ t_6 := \frac{t\_5}{t\_1}\\ \mathbf{if}\;z2 \leq -255000000:\\ \;\;\;\;\frac{1}{\frac{\frac{t\_6 + t\_3}{z0}}{\left|z1\right|}}\\ \mathbf{elif}\;z2 \leq 9.8 \cdot 10^{+64}:\\ \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_0 \cdot \frac{z0}{\left|z1\right|}\right)}^{2} - -1\right)}^{2}}}}\\ \mathbf{elif}\;z2 \leq 2.3 \cdot 10^{+175}:\\ \;\;\;\;\frac{1}{\frac{1}{\left|z1\right|} \cdot \frac{t\_3 \cdot z0 + t\_6 \cdot z0}{z0 \cdot z0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{t\_2 \cdot \left|z1\right| + \frac{t\_5}{t\_2} \cdot \left|z1\right|}{t\_4}}\\ \end{array} \]
          (FPCore (z2 z0 z1)
            :precision binary64
            (let* ((t_0 (tan (* (- (+ z2 z2) -0.5) PI)))
                 (t_1 (fabs t_0))
                 (t_2 (* (fabs z0) t_1))
                 (t_3 (* t_1 (* z0 z0)))
                 (t_4 (* (fabs z1) (fabs z1)))
                 (t_5 (* t_4 0.5))
                 (t_6 (/ t_5 t_1)))
            (if (<= z2 -255000000.0)
              (/ 1.0 (/ (/ (+ t_6 t_3) z0) (fabs z1)))
              (if (<= z2 9.8e+64)
                (/
                 1.0
                 (sqrt
                  (sqrt (pow (- (pow (* t_0 (/ z0 (fabs z1))) 2.0) -1.0) 2.0))))
                (if (<= z2 2.3e+175)
                  (/
                   1.0
                   (*
                    (/ 1.0 (fabs z1))
                    (/ (+ (* t_3 z0) (* t_6 z0)) (* z0 z0))))
                  (/
                   1.0
                   (/ (+ (* t_2 (fabs z1)) (* (/ t_5 t_2) (fabs z1))) t_4)))))))
          double code(double z2, double z0, double z1) {
          	double t_0 = tan((((z2 + z2) - -0.5) * ((double) M_PI)));
          	double t_1 = fabs(t_0);
          	double t_2 = fabs(z0) * t_1;
          	double t_3 = t_1 * (z0 * z0);
          	double t_4 = fabs(z1) * fabs(z1);
          	double t_5 = t_4 * 0.5;
          	double t_6 = t_5 / t_1;
          	double tmp;
          	if (z2 <= -255000000.0) {
          		tmp = 1.0 / (((t_6 + t_3) / z0) / fabs(z1));
          	} else if (z2 <= 9.8e+64) {
          		tmp = 1.0 / sqrt(sqrt(pow((pow((t_0 * (z0 / fabs(z1))), 2.0) - -1.0), 2.0)));
          	} else if (z2 <= 2.3e+175) {
          		tmp = 1.0 / ((1.0 / fabs(z1)) * (((t_3 * z0) + (t_6 * z0)) / (z0 * z0)));
          	} else {
          		tmp = 1.0 / (((t_2 * fabs(z1)) + ((t_5 / t_2) * fabs(z1))) / t_4);
          	}
          	return tmp;
          }
          
          public static double code(double z2, double z0, double z1) {
          	double t_0 = Math.tan((((z2 + z2) - -0.5) * Math.PI));
          	double t_1 = Math.abs(t_0);
          	double t_2 = Math.abs(z0) * t_1;
          	double t_3 = t_1 * (z0 * z0);
          	double t_4 = Math.abs(z1) * Math.abs(z1);
          	double t_5 = t_4 * 0.5;
          	double t_6 = t_5 / t_1;
          	double tmp;
          	if (z2 <= -255000000.0) {
          		tmp = 1.0 / (((t_6 + t_3) / z0) / Math.abs(z1));
          	} else if (z2 <= 9.8e+64) {
          		tmp = 1.0 / Math.sqrt(Math.sqrt(Math.pow((Math.pow((t_0 * (z0 / Math.abs(z1))), 2.0) - -1.0), 2.0)));
          	} else if (z2 <= 2.3e+175) {
          		tmp = 1.0 / ((1.0 / Math.abs(z1)) * (((t_3 * z0) + (t_6 * z0)) / (z0 * z0)));
          	} else {
          		tmp = 1.0 / (((t_2 * Math.abs(z1)) + ((t_5 / t_2) * Math.abs(z1))) / t_4);
          	}
          	return tmp;
          }
          
          def code(z2, z0, z1):
          	t_0 = math.tan((((z2 + z2) - -0.5) * math.pi))
          	t_1 = math.fabs(t_0)
          	t_2 = math.fabs(z0) * t_1
          	t_3 = t_1 * (z0 * z0)
          	t_4 = math.fabs(z1) * math.fabs(z1)
          	t_5 = t_4 * 0.5
          	t_6 = t_5 / t_1
          	tmp = 0
          	if z2 <= -255000000.0:
          		tmp = 1.0 / (((t_6 + t_3) / z0) / math.fabs(z1))
          	elif z2 <= 9.8e+64:
          		tmp = 1.0 / math.sqrt(math.sqrt(math.pow((math.pow((t_0 * (z0 / math.fabs(z1))), 2.0) - -1.0), 2.0)))
          	elif z2 <= 2.3e+175:
          		tmp = 1.0 / ((1.0 / math.fabs(z1)) * (((t_3 * z0) + (t_6 * z0)) / (z0 * z0)))
          	else:
          		tmp = 1.0 / (((t_2 * math.fabs(z1)) + ((t_5 / t_2) * math.fabs(z1))) / t_4)
          	return tmp
          
          function code(z2, z0, z1)
          	t_0 = tan(Float64(Float64(Float64(z2 + z2) - -0.5) * pi))
          	t_1 = abs(t_0)
          	t_2 = Float64(abs(z0) * t_1)
          	t_3 = Float64(t_1 * Float64(z0 * z0))
          	t_4 = Float64(abs(z1) * abs(z1))
          	t_5 = Float64(t_4 * 0.5)
          	t_6 = Float64(t_5 / t_1)
          	tmp = 0.0
          	if (z2 <= -255000000.0)
          		tmp = Float64(1.0 / Float64(Float64(Float64(t_6 + t_3) / z0) / abs(z1)));
          	elseif (z2 <= 9.8e+64)
          		tmp = Float64(1.0 / sqrt(sqrt((Float64((Float64(t_0 * Float64(z0 / abs(z1))) ^ 2.0) - -1.0) ^ 2.0))));
          	elseif (z2 <= 2.3e+175)
          		tmp = Float64(1.0 / Float64(Float64(1.0 / abs(z1)) * Float64(Float64(Float64(t_3 * z0) + Float64(t_6 * z0)) / Float64(z0 * z0))));
          	else
          		tmp = Float64(1.0 / Float64(Float64(Float64(t_2 * abs(z1)) + Float64(Float64(t_5 / t_2) * abs(z1))) / t_4));
          	end
          	return tmp
          end
          
          function tmp_2 = code(z2, z0, z1)
          	t_0 = tan((((z2 + z2) - -0.5) * pi));
          	t_1 = abs(t_0);
          	t_2 = abs(z0) * t_1;
          	t_3 = t_1 * (z0 * z0);
          	t_4 = abs(z1) * abs(z1);
          	t_5 = t_4 * 0.5;
          	t_6 = t_5 / t_1;
          	tmp = 0.0;
          	if (z2 <= -255000000.0)
          		tmp = 1.0 / (((t_6 + t_3) / z0) / abs(z1));
          	elseif (z2 <= 9.8e+64)
          		tmp = 1.0 / sqrt(sqrt(((((t_0 * (z0 / abs(z1))) ^ 2.0) - -1.0) ^ 2.0)));
          	elseif (z2 <= 2.3e+175)
          		tmp = 1.0 / ((1.0 / abs(z1)) * (((t_3 * z0) + (t_6 * z0)) / (z0 * z0)));
          	else
          		tmp = 1.0 / (((t_2 * abs(z1)) + ((t_5 / t_2) * abs(z1))) / t_4);
          	end
          	tmp_2 = tmp;
          end
          
          code[z2_, z0_, z1_] := Block[{t$95$0 = N[Tan[N[(N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Abs[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[z0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(z0 * z0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Abs[z1], $MachinePrecision] * N[Abs[z1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * 0.5), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 / t$95$1), $MachinePrecision]}, If[LessEqual[z2, -255000000.0], N[(1.0 / N[(N[(N[(t$95$6 + t$95$3), $MachinePrecision] / z0), $MachinePrecision] / N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 9.8e+64], N[(1.0 / N[Sqrt[N[Sqrt[N[Power[N[(N[Power[N[(t$95$0 * N[(z0 / N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] - -1.0), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 2.3e+175], N[(1.0 / N[(N[(1.0 / N[Abs[z1], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t$95$3 * z0), $MachinePrecision] + N[(t$95$6 * z0), $MachinePrecision]), $MachinePrecision] / N[(z0 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(N[(t$95$2 * N[Abs[z1], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 / t$95$2), $MachinePrecision] * N[Abs[z1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
          
          \begin{array}{l}
          t_0 := \tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\\
          t_1 := \left|t\_0\right|\\
          t_2 := \left|z0\right| \cdot t\_1\\
          t_3 := t\_1 \cdot \left(z0 \cdot z0\right)\\
          t_4 := \left|z1\right| \cdot \left|z1\right|\\
          t_5 := t\_4 \cdot 0.5\\
          t_6 := \frac{t\_5}{t\_1}\\
          \mathbf{if}\;z2 \leq -255000000:\\
          \;\;\;\;\frac{1}{\frac{\frac{t\_6 + t\_3}{z0}}{\left|z1\right|}}\\
          
          \mathbf{elif}\;z2 \leq 9.8 \cdot 10^{+64}:\\
          \;\;\;\;\frac{1}{\sqrt{\sqrt{{\left({\left(t\_0 \cdot \frac{z0}{\left|z1\right|}\right)}^{2} - -1\right)}^{2}}}}\\
          
          \mathbf{elif}\;z2 \leq 2.3 \cdot 10^{+175}:\\
          \;\;\;\;\frac{1}{\frac{1}{\left|z1\right|} \cdot \frac{t\_3 \cdot z0 + t\_6 \cdot z0}{z0 \cdot z0}}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{t\_2 \cdot \left|z1\right| + \frac{t\_5}{t\_2} \cdot \left|z1\right|}{t\_4}}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if z2 < -2.55e8

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

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

              \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            7. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            8. Applied rewrites38.4%

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

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \color{blue}{\frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}}} \]
            10. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{\frac{\left(z1 \cdot z1\right) \cdot 0.5}{\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|} + \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right| \cdot \left(z0 \cdot z0\right)}{z0}}{\color{blue}{z1}}} \]

            if -2.55e8 < z2 < 9.8000000000000005e64

            1. Initial program 44.5%

              \[\frac{1}{\sqrt{{\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1}} \]
            2. Step-by-step derivation
              1. rem-square-sqrtN/A

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

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

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\sqrt{\left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right) \cdot \left({\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}}}} \]
              4. lower-*.f6450.4%

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

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{\color{blue}{{\left({\left(\frac{z0}{z1} \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)\right)}^{2} - -1\right)}^{2}}}}} \]
              3. lower-pow.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\color{blue}{\left(\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \frac{z0}{z1}\right)}}^{2} - -1\right)}^{2}}}} \]
              6. lower-*.f6450.4%

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

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

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
              9. lower-*.f6450.4%

                \[\leadsto \frac{1}{\sqrt{\sqrt{{\left({\left(\tan \color{blue}{\left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)} \cdot \frac{z0}{z1}\right)}^{2} - -1\right)}^{2}}}} \]
            5. Applied rewrites50.4%

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

            if 9.8000000000000005e64 < z2 < 2.3e175

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

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

              \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            7. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            8. Applied rewrites38.4%

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

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

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}} \]
              3. div-addN/A

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \left(\frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}{z0} + \frac{\frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{\color{blue}{z0}}\right)} \]
              4. common-denominatorN/A

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\left(\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}\right) \cdot z0 + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}} \cdot z0}{z0 \cdot \color{blue}{z0}}} \]
            10. Applied rewrites21.9%

              \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\left(\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right| \cdot \left(z0 \cdot z0\right)\right) \cdot z0 + \frac{\left(z1 \cdot z1\right) \cdot 0.5}{\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|} \cdot z0}{z0 \cdot \color{blue}{z0}}} \]

            if 2.3e175 < z2

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites27.2%

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

          Alternative 12: 54.3% accurate, 0.8× speedup?

          \[\begin{array}{l} t_0 := \left(z2 + z2\right) - -0.5\\ t_1 := \left|\tan \left(t\_0 \cdot \pi\right)\right|\\ t_2 := \left|z0\right| \cdot t\_1\\ t_3 := \left(z1 \cdot z1\right) \cdot 0.5\\ t_4 := \frac{1}{\frac{\frac{\frac{t\_3}{t\_1} + t\_1 \cdot \left(z0 \cdot z0\right)}{z0}}{z1}}\\ \mathbf{if}\;z2 \leq -1.56 \cdot 10^{+16}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;z2 \leq 6200000000:\\ \;\;\;\;\frac{1}{\sqrt{\left(\left({\tan \left(\pi \cdot t\_0\right)}^{2} \cdot \frac{z0}{z1}\right) \cdot \frac{1}{z1}\right) \cdot z0 - -1}}\\ \mathbf{elif}\;z2 \leq 2.05 \cdot 10^{+176}:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{t\_2 \cdot z1 + \frac{t\_3}{t\_2} \cdot z1}{z1 \cdot z1}}\\ \end{array} \]
          (FPCore (z2 z0 z1)
            :precision binary64
            (let* ((t_0 (- (+ z2 z2) -0.5))
                 (t_1 (fabs (tan (* t_0 PI))))
                 (t_2 (* (fabs z0) t_1))
                 (t_3 (* (* z1 z1) 0.5))
                 (t_4 (/ 1.0 (/ (/ (+ (/ t_3 t_1) (* t_1 (* z0 z0))) z0) z1))))
            (if (<= z2 -1.56e+16)
              t_4
              (if (<= z2 6200000000.0)
                (/
                 1.0
                 (sqrt
                  (-
                   (*
                    (* (* (pow (tan (* PI t_0)) 2.0) (/ z0 z1)) (/ 1.0 z1))
                    z0)
                   -1.0)))
                (if (<= z2 2.05e+176)
                  t_4
                  (/ 1.0 (/ (+ (* t_2 z1) (* (/ t_3 t_2) z1)) (* z1 z1))))))))
          double code(double z2, double z0, double z1) {
          	double t_0 = (z2 + z2) - -0.5;
          	double t_1 = fabs(tan((t_0 * ((double) M_PI))));
          	double t_2 = fabs(z0) * t_1;
          	double t_3 = (z1 * z1) * 0.5;
          	double t_4 = 1.0 / ((((t_3 / t_1) + (t_1 * (z0 * z0))) / z0) / z1);
          	double tmp;
          	if (z2 <= -1.56e+16) {
          		tmp = t_4;
          	} else if (z2 <= 6200000000.0) {
          		tmp = 1.0 / sqrt(((((pow(tan((((double) M_PI) * t_0)), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
          	} else if (z2 <= 2.05e+176) {
          		tmp = t_4;
          	} else {
          		tmp = 1.0 / (((t_2 * z1) + ((t_3 / t_2) * z1)) / (z1 * z1));
          	}
          	return tmp;
          }
          
          public static double code(double z2, double z0, double z1) {
          	double t_0 = (z2 + z2) - -0.5;
          	double t_1 = Math.abs(Math.tan((t_0 * Math.PI)));
          	double t_2 = Math.abs(z0) * t_1;
          	double t_3 = (z1 * z1) * 0.5;
          	double t_4 = 1.0 / ((((t_3 / t_1) + (t_1 * (z0 * z0))) / z0) / z1);
          	double tmp;
          	if (z2 <= -1.56e+16) {
          		tmp = t_4;
          	} else if (z2 <= 6200000000.0) {
          		tmp = 1.0 / Math.sqrt(((((Math.pow(Math.tan((Math.PI * t_0)), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
          	} else if (z2 <= 2.05e+176) {
          		tmp = t_4;
          	} else {
          		tmp = 1.0 / (((t_2 * z1) + ((t_3 / t_2) * z1)) / (z1 * z1));
          	}
          	return tmp;
          }
          
          def code(z2, z0, z1):
          	t_0 = (z2 + z2) - -0.5
          	t_1 = math.fabs(math.tan((t_0 * math.pi)))
          	t_2 = math.fabs(z0) * t_1
          	t_3 = (z1 * z1) * 0.5
          	t_4 = 1.0 / ((((t_3 / t_1) + (t_1 * (z0 * z0))) / z0) / z1)
          	tmp = 0
          	if z2 <= -1.56e+16:
          		tmp = t_4
          	elif z2 <= 6200000000.0:
          		tmp = 1.0 / math.sqrt(((((math.pow(math.tan((math.pi * t_0)), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0))
          	elif z2 <= 2.05e+176:
          		tmp = t_4
          	else:
          		tmp = 1.0 / (((t_2 * z1) + ((t_3 / t_2) * z1)) / (z1 * z1))
          	return tmp
          
          function code(z2, z0, z1)
          	t_0 = Float64(Float64(z2 + z2) - -0.5)
          	t_1 = abs(tan(Float64(t_0 * pi)))
          	t_2 = Float64(abs(z0) * t_1)
          	t_3 = Float64(Float64(z1 * z1) * 0.5)
          	t_4 = Float64(1.0 / Float64(Float64(Float64(Float64(t_3 / t_1) + Float64(t_1 * Float64(z0 * z0))) / z0) / z1))
          	tmp = 0.0
          	if (z2 <= -1.56e+16)
          		tmp = t_4;
          	elseif (z2 <= 6200000000.0)
          		tmp = Float64(1.0 / sqrt(Float64(Float64(Float64(Float64((tan(Float64(pi * t_0)) ^ 2.0) * Float64(z0 / z1)) * Float64(1.0 / z1)) * z0) - -1.0)));
          	elseif (z2 <= 2.05e+176)
          		tmp = t_4;
          	else
          		tmp = Float64(1.0 / Float64(Float64(Float64(t_2 * z1) + Float64(Float64(t_3 / t_2) * z1)) / Float64(z1 * z1)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(z2, z0, z1)
          	t_0 = (z2 + z2) - -0.5;
          	t_1 = abs(tan((t_0 * pi)));
          	t_2 = abs(z0) * t_1;
          	t_3 = (z1 * z1) * 0.5;
          	t_4 = 1.0 / ((((t_3 / t_1) + (t_1 * (z0 * z0))) / z0) / z1);
          	tmp = 0.0;
          	if (z2 <= -1.56e+16)
          		tmp = t_4;
          	elseif (z2 <= 6200000000.0)
          		tmp = 1.0 / sqrt((((((tan((pi * t_0)) ^ 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
          	elseif (z2 <= 2.05e+176)
          		tmp = t_4;
          	else
          		tmp = 1.0 / (((t_2 * z1) + ((t_3 / t_2) * z1)) / (z1 * z1));
          	end
          	tmp_2 = tmp;
          end
          
          code[z2_, z0_, z1_] := Block[{t$95$0 = N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[Tan[N[(t$95$0 * Pi), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[z0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z1 * z1), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 / N[(N[(N[(N[(t$95$3 / t$95$1), $MachinePrecision] + N[(t$95$1 * N[(z0 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z0), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z2, -1.56e+16], t$95$4, If[LessEqual[z2, 6200000000.0], N[(1.0 / N[Sqrt[N[(N[(N[(N[(N[Power[N[Tan[N[(Pi * t$95$0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] * N[(1.0 / z1), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 2.05e+176], t$95$4, N[(1.0 / N[(N[(N[(t$95$2 * z1), $MachinePrecision] + N[(N[(t$95$3 / t$95$2), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision] / N[(z1 * z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
          
          \begin{array}{l}
          t_0 := \left(z2 + z2\right) - -0.5\\
          t_1 := \left|\tan \left(t\_0 \cdot \pi\right)\right|\\
          t_2 := \left|z0\right| \cdot t\_1\\
          t_3 := \left(z1 \cdot z1\right) \cdot 0.5\\
          t_4 := \frac{1}{\frac{\frac{\frac{t\_3}{t\_1} + t\_1 \cdot \left(z0 \cdot z0\right)}{z0}}{z1}}\\
          \mathbf{if}\;z2 \leq -1.56 \cdot 10^{+16}:\\
          \;\;\;\;t\_4\\
          
          \mathbf{elif}\;z2 \leq 6200000000:\\
          \;\;\;\;\frac{1}{\sqrt{\left(\left({\tan \left(\pi \cdot t\_0\right)}^{2} \cdot \frac{z0}{z1}\right) \cdot \frac{1}{z1}\right) \cdot z0 - -1}}\\
          
          \mathbf{elif}\;z2 \leq 2.05 \cdot 10^{+176}:\\
          \;\;\;\;t\_4\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{t\_2 \cdot z1 + \frac{t\_3}{t\_2} \cdot z1}{z1 \cdot z1}}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z2 < -1.56e16 or 6.2e9 < z2 < 2.05e176

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

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

              \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            7. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            8. Applied rewrites38.4%

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

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \color{blue}{\frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}}} \]
            10. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{\frac{\left(z1 \cdot z1\right) \cdot 0.5}{\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|} + \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right| \cdot \left(z0 \cdot z0\right)}{z0}}{\color{blue}{z1}}} \]

            if -1.56e16 < z2 < 6.2e9

            1. Initial program 44.5%

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

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

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

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

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

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

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

                \[\leadsto \frac{1}{\sqrt{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)\right) \cdot \color{blue}{\frac{z0}{z1}} - -1}} \]
              8. mult-flipN/A

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

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

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

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

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

            if 2.05e176 < z2

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites27.2%

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

          Alternative 13: 53.0% accurate, 0.8× speedup?

          \[\begin{array}{l} t_0 := \left(z2 + z2\right) - -0.5\\ t_1 := \left|\tan \left(t\_0 \cdot \pi\right)\right|\\ t_2 := \left|z0\right| \cdot t\_1\\ t_3 := \left(z1 \cdot z1\right) \cdot 0.5\\ t_4 := \frac{t\_3}{t\_1} + t\_1 \cdot \left(z0 \cdot z0\right)\\ \mathbf{if}\;z2 \leq -1.56 \cdot 10^{+16}:\\ \;\;\;\;\frac{1}{\frac{\frac{t\_4}{z0}}{z1}}\\ \mathbf{elif}\;z2 \leq 6200000000:\\ \;\;\;\;\frac{1}{\sqrt{\left(\left({\tan \left(\pi \cdot t\_0\right)}^{2} \cdot \frac{z0}{z1}\right) \cdot \frac{1}{z1}\right) \cdot z0 - -1}}\\ \mathbf{elif}\;z2 \leq 2.05 \cdot 10^{+176}:\\ \;\;\;\;\frac{1}{\frac{1}{z1} \cdot \left(t\_4 \cdot \frac{1}{z0}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{t\_2 \cdot z1 + \frac{t\_3}{t\_2} \cdot z1}{z1 \cdot z1}}\\ \end{array} \]
          (FPCore (z2 z0 z1)
            :precision binary64
            (let* ((t_0 (- (+ z2 z2) -0.5))
                 (t_1 (fabs (tan (* t_0 PI))))
                 (t_2 (* (fabs z0) t_1))
                 (t_3 (* (* z1 z1) 0.5))
                 (t_4 (+ (/ t_3 t_1) (* t_1 (* z0 z0)))))
            (if (<= z2 -1.56e+16)
              (/ 1.0 (/ (/ t_4 z0) z1))
              (if (<= z2 6200000000.0)
                (/
                 1.0
                 (sqrt
                  (-
                   (*
                    (* (* (pow (tan (* PI t_0)) 2.0) (/ z0 z1)) (/ 1.0 z1))
                    z0)
                   -1.0)))
                (if (<= z2 2.05e+176)
                  (/ 1.0 (* (/ 1.0 z1) (* t_4 (/ 1.0 z0))))
                  (/ 1.0 (/ (+ (* t_2 z1) (* (/ t_3 t_2) z1)) (* z1 z1))))))))
          double code(double z2, double z0, double z1) {
          	double t_0 = (z2 + z2) - -0.5;
          	double t_1 = fabs(tan((t_0 * ((double) M_PI))));
          	double t_2 = fabs(z0) * t_1;
          	double t_3 = (z1 * z1) * 0.5;
          	double t_4 = (t_3 / t_1) + (t_1 * (z0 * z0));
          	double tmp;
          	if (z2 <= -1.56e+16) {
          		tmp = 1.0 / ((t_4 / z0) / z1);
          	} else if (z2 <= 6200000000.0) {
          		tmp = 1.0 / sqrt(((((pow(tan((((double) M_PI) * t_0)), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
          	} else if (z2 <= 2.05e+176) {
          		tmp = 1.0 / ((1.0 / z1) * (t_4 * (1.0 / z0)));
          	} else {
          		tmp = 1.0 / (((t_2 * z1) + ((t_3 / t_2) * z1)) / (z1 * z1));
          	}
          	return tmp;
          }
          
          public static double code(double z2, double z0, double z1) {
          	double t_0 = (z2 + z2) - -0.5;
          	double t_1 = Math.abs(Math.tan((t_0 * Math.PI)));
          	double t_2 = Math.abs(z0) * t_1;
          	double t_3 = (z1 * z1) * 0.5;
          	double t_4 = (t_3 / t_1) + (t_1 * (z0 * z0));
          	double tmp;
          	if (z2 <= -1.56e+16) {
          		tmp = 1.0 / ((t_4 / z0) / z1);
          	} else if (z2 <= 6200000000.0) {
          		tmp = 1.0 / Math.sqrt(((((Math.pow(Math.tan((Math.PI * t_0)), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
          	} else if (z2 <= 2.05e+176) {
          		tmp = 1.0 / ((1.0 / z1) * (t_4 * (1.0 / z0)));
          	} else {
          		tmp = 1.0 / (((t_2 * z1) + ((t_3 / t_2) * z1)) / (z1 * z1));
          	}
          	return tmp;
          }
          
          def code(z2, z0, z1):
          	t_0 = (z2 + z2) - -0.5
          	t_1 = math.fabs(math.tan((t_0 * math.pi)))
          	t_2 = math.fabs(z0) * t_1
          	t_3 = (z1 * z1) * 0.5
          	t_4 = (t_3 / t_1) + (t_1 * (z0 * z0))
          	tmp = 0
          	if z2 <= -1.56e+16:
          		tmp = 1.0 / ((t_4 / z0) / z1)
          	elif z2 <= 6200000000.0:
          		tmp = 1.0 / math.sqrt(((((math.pow(math.tan((math.pi * t_0)), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0))
          	elif z2 <= 2.05e+176:
          		tmp = 1.0 / ((1.0 / z1) * (t_4 * (1.0 / z0)))
          	else:
          		tmp = 1.0 / (((t_2 * z1) + ((t_3 / t_2) * z1)) / (z1 * z1))
          	return tmp
          
          function code(z2, z0, z1)
          	t_0 = Float64(Float64(z2 + z2) - -0.5)
          	t_1 = abs(tan(Float64(t_0 * pi)))
          	t_2 = Float64(abs(z0) * t_1)
          	t_3 = Float64(Float64(z1 * z1) * 0.5)
          	t_4 = Float64(Float64(t_3 / t_1) + Float64(t_1 * Float64(z0 * z0)))
          	tmp = 0.0
          	if (z2 <= -1.56e+16)
          		tmp = Float64(1.0 / Float64(Float64(t_4 / z0) / z1));
          	elseif (z2 <= 6200000000.0)
          		tmp = Float64(1.0 / sqrt(Float64(Float64(Float64(Float64((tan(Float64(pi * t_0)) ^ 2.0) * Float64(z0 / z1)) * Float64(1.0 / z1)) * z0) - -1.0)));
          	elseif (z2 <= 2.05e+176)
          		tmp = Float64(1.0 / Float64(Float64(1.0 / z1) * Float64(t_4 * Float64(1.0 / z0))));
          	else
          		tmp = Float64(1.0 / Float64(Float64(Float64(t_2 * z1) + Float64(Float64(t_3 / t_2) * z1)) / Float64(z1 * z1)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(z2, z0, z1)
          	t_0 = (z2 + z2) - -0.5;
          	t_1 = abs(tan((t_0 * pi)));
          	t_2 = abs(z0) * t_1;
          	t_3 = (z1 * z1) * 0.5;
          	t_4 = (t_3 / t_1) + (t_1 * (z0 * z0));
          	tmp = 0.0;
          	if (z2 <= -1.56e+16)
          		tmp = 1.0 / ((t_4 / z0) / z1);
          	elseif (z2 <= 6200000000.0)
          		tmp = 1.0 / sqrt((((((tan((pi * t_0)) ^ 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
          	elseif (z2 <= 2.05e+176)
          		tmp = 1.0 / ((1.0 / z1) * (t_4 * (1.0 / z0)));
          	else
          		tmp = 1.0 / (((t_2 * z1) + ((t_3 / t_2) * z1)) / (z1 * z1));
          	end
          	tmp_2 = tmp;
          end
          
          code[z2_, z0_, z1_] := Block[{t$95$0 = N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[Tan[N[(t$95$0 * Pi), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[z0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z1 * z1), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 / t$95$1), $MachinePrecision] + N[(t$95$1 * N[(z0 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z2, -1.56e+16], N[(1.0 / N[(N[(t$95$4 / z0), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 6200000000.0], N[(1.0 / N[Sqrt[N[(N[(N[(N[(N[Power[N[Tan[N[(Pi * t$95$0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] * N[(1.0 / z1), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z2, 2.05e+176], N[(1.0 / N[(N[(1.0 / z1), $MachinePrecision] * N[(t$95$4 * N[(1.0 / z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(N[(t$95$2 * z1), $MachinePrecision] + N[(N[(t$95$3 / t$95$2), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision] / N[(z1 * z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
          
          \begin{array}{l}
          t_0 := \left(z2 + z2\right) - -0.5\\
          t_1 := \left|\tan \left(t\_0 \cdot \pi\right)\right|\\
          t_2 := \left|z0\right| \cdot t\_1\\
          t_3 := \left(z1 \cdot z1\right) \cdot 0.5\\
          t_4 := \frac{t\_3}{t\_1} + t\_1 \cdot \left(z0 \cdot z0\right)\\
          \mathbf{if}\;z2 \leq -1.56 \cdot 10^{+16}:\\
          \;\;\;\;\frac{1}{\frac{\frac{t\_4}{z0}}{z1}}\\
          
          \mathbf{elif}\;z2 \leq 6200000000:\\
          \;\;\;\;\frac{1}{\sqrt{\left(\left({\tan \left(\pi \cdot t\_0\right)}^{2} \cdot \frac{z0}{z1}\right) \cdot \frac{1}{z1}\right) \cdot z0 - -1}}\\
          
          \mathbf{elif}\;z2 \leq 2.05 \cdot 10^{+176}:\\
          \;\;\;\;\frac{1}{\frac{1}{z1} \cdot \left(t\_4 \cdot \frac{1}{z0}\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{t\_2 \cdot z1 + \frac{t\_3}{t\_2} \cdot z1}{z1 \cdot z1}}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if z2 < -1.56e16

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

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

              \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            7. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            8. Applied rewrites38.4%

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

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \color{blue}{\frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}}} \]
            10. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{\frac{\left(z1 \cdot z1\right) \cdot 0.5}{\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|} + \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right| \cdot \left(z0 \cdot z0\right)}{z0}}{\color{blue}{z1}}} \]

            if -1.56e16 < z2 < 6.2e9

            1. Initial program 44.5%

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

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

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

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

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

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

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

                \[\leadsto \frac{1}{\sqrt{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)\right) \cdot \color{blue}{\frac{z0}{z1}} - -1}} \]
              8. mult-flipN/A

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

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

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

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

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

            if 6.2e9 < z2 < 2.05e176

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

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

              \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            7. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            8. Applied rewrites38.4%

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

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}} \]
              2. mult-flipN/A

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

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \left(\left(\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}\right) \cdot \frac{1}{\color{blue}{z0}}\right)} \]
            10. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{1}{z1} \cdot \left(\left(\frac{\left(z1 \cdot z1\right) \cdot 0.5}{\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|} + \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right| \cdot \left(z0 \cdot z0\right)\right) \cdot \frac{1}{\color{blue}{z0}}\right)} \]

            if 2.05e176 < z2

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites27.2%

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

          Alternative 14: 53.0% accurate, 0.8× speedup?

          \[\begin{array}{l} t_0 := \left(z2 + z2\right) - -0.5\\ t_1 := \left|\tan \left(t\_0 \cdot \pi\right)\right|\\ t_2 := \frac{1}{\frac{\frac{\frac{\left(z1 \cdot z1\right) \cdot 0.5}{t\_1} + t\_1 \cdot \left(z0 \cdot z0\right)}{z0}}{z1}}\\ \mathbf{if}\;z2 \leq -1.56 \cdot 10^{+16}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z2 \leq 6200000000:\\ \;\;\;\;\frac{1}{\sqrt{\left(\left({\tan \left(\pi \cdot t\_0\right)}^{2} \cdot \frac{z0}{z1}\right) \cdot \frac{1}{z1}\right) \cdot z0 - -1}}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
          (FPCore (z2 z0 z1)
            :precision binary64
            (let* ((t_0 (- (+ z2 z2) -0.5))
                 (t_1 (fabs (tan (* t_0 PI))))
                 (t_2
                  (/
                   1.0
                   (/
                    (/ (+ (/ (* (* z1 z1) 0.5) t_1) (* t_1 (* z0 z0))) z0)
                    z1))))
            (if (<= z2 -1.56e+16)
              t_2
              (if (<= z2 6200000000.0)
                (/
                 1.0
                 (sqrt
                  (-
                   (*
                    (* (* (pow (tan (* PI t_0)) 2.0) (/ z0 z1)) (/ 1.0 z1))
                    z0)
                   -1.0)))
                t_2))))
          double code(double z2, double z0, double z1) {
          	double t_0 = (z2 + z2) - -0.5;
          	double t_1 = fabs(tan((t_0 * ((double) M_PI))));
          	double t_2 = 1.0 / ((((((z1 * z1) * 0.5) / t_1) + (t_1 * (z0 * z0))) / z0) / z1);
          	double tmp;
          	if (z2 <= -1.56e+16) {
          		tmp = t_2;
          	} else if (z2 <= 6200000000.0) {
          		tmp = 1.0 / sqrt(((((pow(tan((((double) M_PI) * t_0)), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          public static double code(double z2, double z0, double z1) {
          	double t_0 = (z2 + z2) - -0.5;
          	double t_1 = Math.abs(Math.tan((t_0 * Math.PI)));
          	double t_2 = 1.0 / ((((((z1 * z1) * 0.5) / t_1) + (t_1 * (z0 * z0))) / z0) / z1);
          	double tmp;
          	if (z2 <= -1.56e+16) {
          		tmp = t_2;
          	} else if (z2 <= 6200000000.0) {
          		tmp = 1.0 / Math.sqrt(((((Math.pow(Math.tan((Math.PI * t_0)), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          def code(z2, z0, z1):
          	t_0 = (z2 + z2) - -0.5
          	t_1 = math.fabs(math.tan((t_0 * math.pi)))
          	t_2 = 1.0 / ((((((z1 * z1) * 0.5) / t_1) + (t_1 * (z0 * z0))) / z0) / z1)
          	tmp = 0
          	if z2 <= -1.56e+16:
          		tmp = t_2
          	elif z2 <= 6200000000.0:
          		tmp = 1.0 / math.sqrt(((((math.pow(math.tan((math.pi * t_0)), 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0))
          	else:
          		tmp = t_2
          	return tmp
          
          function code(z2, z0, z1)
          	t_0 = Float64(Float64(z2 + z2) - -0.5)
          	t_1 = abs(tan(Float64(t_0 * pi)))
          	t_2 = Float64(1.0 / Float64(Float64(Float64(Float64(Float64(Float64(z1 * z1) * 0.5) / t_1) + Float64(t_1 * Float64(z0 * z0))) / z0) / z1))
          	tmp = 0.0
          	if (z2 <= -1.56e+16)
          		tmp = t_2;
          	elseif (z2 <= 6200000000.0)
          		tmp = Float64(1.0 / sqrt(Float64(Float64(Float64(Float64((tan(Float64(pi * t_0)) ^ 2.0) * Float64(z0 / z1)) * Float64(1.0 / z1)) * z0) - -1.0)));
          	else
          		tmp = t_2;
          	end
          	return tmp
          end
          
          function tmp_2 = code(z2, z0, z1)
          	t_0 = (z2 + z2) - -0.5;
          	t_1 = abs(tan((t_0 * pi)));
          	t_2 = 1.0 / ((((((z1 * z1) * 0.5) / t_1) + (t_1 * (z0 * z0))) / z0) / z1);
          	tmp = 0.0;
          	if (z2 <= -1.56e+16)
          		tmp = t_2;
          	elseif (z2 <= 6200000000.0)
          		tmp = 1.0 / sqrt((((((tan((pi * t_0)) ^ 2.0) * (z0 / z1)) * (1.0 / z1)) * z0) - -1.0));
          	else
          		tmp = t_2;
          	end
          	tmp_2 = tmp;
          end
          
          code[z2_, z0_, z1_] := Block[{t$95$0 = N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[Tan[N[(t$95$0 * Pi), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(N[(N[(N[(N[(N[(z1 * z1), $MachinePrecision] * 0.5), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$1 * N[(z0 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z0), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z2, -1.56e+16], t$95$2, If[LessEqual[z2, 6200000000.0], N[(1.0 / N[Sqrt[N[(N[(N[(N[(N[Power[N[Tan[N[(Pi * t$95$0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] * N[(1.0 / z1), $MachinePrecision]), $MachinePrecision] * z0), $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
          
          \begin{array}{l}
          t_0 := \left(z2 + z2\right) - -0.5\\
          t_1 := \left|\tan \left(t\_0 \cdot \pi\right)\right|\\
          t_2 := \frac{1}{\frac{\frac{\frac{\left(z1 \cdot z1\right) \cdot 0.5}{t\_1} + t\_1 \cdot \left(z0 \cdot z0\right)}{z0}}{z1}}\\
          \mathbf{if}\;z2 \leq -1.56 \cdot 10^{+16}:\\
          \;\;\;\;t\_2\\
          
          \mathbf{elif}\;z2 \leq 6200000000:\\
          \;\;\;\;\frac{1}{\sqrt{\left(\left({\tan \left(\pi \cdot t\_0\right)}^{2} \cdot \frac{z0}{z1}\right) \cdot \frac{1}{z1}\right) \cdot z0 - -1}}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_2\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z2 < -1.56e16 or 6.2e9 < z2

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

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

              \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{1}{\frac{\frac{\frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            7. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}} + {z0}^{2} \cdot \sqrt{\frac{{\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}{z0}}{z1}} \]
            8. Applied rewrites38.4%

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

                \[\leadsto \frac{1}{\frac{1}{z1} \cdot \color{blue}{\frac{\left(z0 \cdot z0\right) \cdot \sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)} + \frac{\left(z1 \cdot z1\right) \cdot \frac{1}{2}}{\sqrt{\tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right) \cdot \tan \left(\pi \cdot \left(\left(z2 + z2\right) - \frac{-1}{2}\right)\right)}}}{z0}}} \]
            10. Applied rewrites38.4%

              \[\leadsto \frac{1}{\frac{\frac{\frac{\left(z1 \cdot z1\right) \cdot 0.5}{\left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|} + \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right| \cdot \left(z0 \cdot z0\right)}{z0}}{\color{blue}{z1}}} \]

            if -1.56e16 < z2 < 6.2e9

            1. Initial program 44.5%

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

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

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

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

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

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

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

                \[\leadsto \frac{1}{\sqrt{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)\right) \cdot \color{blue}{\frac{z0}{z1}} - -1}} \]
              8. mult-flipN/A

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

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

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

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

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

          Alternative 15: 52.8% accurate, 0.8× speedup?

          \[\begin{array}{l} t_0 := \left(z2 + z2\right) - -0.5\\ t_1 := t\_0 \cdot \pi\\ t_2 := \left|z0\right| \cdot \left|\tan t\_1\right|\\ t_3 := \frac{1}{\frac{t\_2 - \frac{\left(z1 \cdot z1\right) \cdot -0.5}{t\_2}}{z1}}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+27}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+17}:\\ \;\;\;\;\frac{1}{\sqrt{\left(\left({\tan \left(\pi \cdot t\_0\right)}^{2} \cdot \frac{z0}{z1}\right) \cdot \left(-z0\right)\right) \cdot \frac{-1}{z1} - -1}}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \]
          (FPCore (z2 z0 z1)
            :precision binary64
            (let* ((t_0 (- (+ z2 z2) -0.5))
                 (t_1 (* t_0 PI))
                 (t_2 (* (fabs z0) (fabs (tan t_1))))
                 (t_3 (/ 1.0 (/ (- t_2 (/ (* (* z1 z1) -0.5) t_2)) z1))))
            (if (<= t_1 -2e+27)
              t_3
              (if (<= t_1 2e+17)
                (/
                 1.0
                 (sqrt
                  (-
                   (*
                    (* (* (pow (tan (* PI t_0)) 2.0) (/ z0 z1)) (- z0))
                    (/ -1.0 z1))
                   -1.0)))
                t_3))))
          double code(double z2, double z0, double z1) {
          	double t_0 = (z2 + z2) - -0.5;
          	double t_1 = t_0 * ((double) M_PI);
          	double t_2 = fabs(z0) * fabs(tan(t_1));
          	double t_3 = 1.0 / ((t_2 - (((z1 * z1) * -0.5) / t_2)) / z1);
          	double tmp;
          	if (t_1 <= -2e+27) {
          		tmp = t_3;
          	} else if (t_1 <= 2e+17) {
          		tmp = 1.0 / sqrt(((((pow(tan((((double) M_PI) * t_0)), 2.0) * (z0 / z1)) * -z0) * (-1.0 / z1)) - -1.0));
          	} else {
          		tmp = t_3;
          	}
          	return tmp;
          }
          
          public static double code(double z2, double z0, double z1) {
          	double t_0 = (z2 + z2) - -0.5;
          	double t_1 = t_0 * Math.PI;
          	double t_2 = Math.abs(z0) * Math.abs(Math.tan(t_1));
          	double t_3 = 1.0 / ((t_2 - (((z1 * z1) * -0.5) / t_2)) / z1);
          	double tmp;
          	if (t_1 <= -2e+27) {
          		tmp = t_3;
          	} else if (t_1 <= 2e+17) {
          		tmp = 1.0 / Math.sqrt(((((Math.pow(Math.tan((Math.PI * t_0)), 2.0) * (z0 / z1)) * -z0) * (-1.0 / z1)) - -1.0));
          	} else {
          		tmp = t_3;
          	}
          	return tmp;
          }
          
          def code(z2, z0, z1):
          	t_0 = (z2 + z2) - -0.5
          	t_1 = t_0 * math.pi
          	t_2 = math.fabs(z0) * math.fabs(math.tan(t_1))
          	t_3 = 1.0 / ((t_2 - (((z1 * z1) * -0.5) / t_2)) / z1)
          	tmp = 0
          	if t_1 <= -2e+27:
          		tmp = t_3
          	elif t_1 <= 2e+17:
          		tmp = 1.0 / math.sqrt(((((math.pow(math.tan((math.pi * t_0)), 2.0) * (z0 / z1)) * -z0) * (-1.0 / z1)) - -1.0))
          	else:
          		tmp = t_3
          	return tmp
          
          function code(z2, z0, z1)
          	t_0 = Float64(Float64(z2 + z2) - -0.5)
          	t_1 = Float64(t_0 * pi)
          	t_2 = Float64(abs(z0) * abs(tan(t_1)))
          	t_3 = Float64(1.0 / Float64(Float64(t_2 - Float64(Float64(Float64(z1 * z1) * -0.5) / t_2)) / z1))
          	tmp = 0.0
          	if (t_1 <= -2e+27)
          		tmp = t_3;
          	elseif (t_1 <= 2e+17)
          		tmp = Float64(1.0 / sqrt(Float64(Float64(Float64(Float64((tan(Float64(pi * t_0)) ^ 2.0) * Float64(z0 / z1)) * Float64(-z0)) * Float64(-1.0 / z1)) - -1.0)));
          	else
          		tmp = t_3;
          	end
          	return tmp
          end
          
          function tmp_2 = code(z2, z0, z1)
          	t_0 = (z2 + z2) - -0.5;
          	t_1 = t_0 * pi;
          	t_2 = abs(z0) * abs(tan(t_1));
          	t_3 = 1.0 / ((t_2 - (((z1 * z1) * -0.5) / t_2)) / z1);
          	tmp = 0.0;
          	if (t_1 <= -2e+27)
          		tmp = t_3;
          	elseif (t_1 <= 2e+17)
          		tmp = 1.0 / sqrt((((((tan((pi * t_0)) ^ 2.0) * (z0 / z1)) * -z0) * (-1.0 / z1)) - -1.0));
          	else
          		tmp = t_3;
          	end
          	tmp_2 = tmp;
          end
          
          code[z2_, z0_, z1_] := Block[{t$95$0 = N[(N[(z2 + z2), $MachinePrecision] - -0.5), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * Pi), $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[z0], $MachinePrecision] * N[Abs[N[Tan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 / N[(N[(t$95$2 - N[(N[(N[(z1 * z1), $MachinePrecision] * -0.5), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+27], t$95$3, If[LessEqual[t$95$1, 2e+17], N[(1.0 / N[Sqrt[N[(N[(N[(N[(N[Power[N[Tan[N[(Pi * t$95$0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] * (-z0)), $MachinePrecision] * N[(-1.0 / z1), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
          
          \begin{array}{l}
          t_0 := \left(z2 + z2\right) - -0.5\\
          t_1 := t\_0 \cdot \pi\\
          t_2 := \left|z0\right| \cdot \left|\tan t\_1\right|\\
          t_3 := \frac{1}{\frac{t\_2 - \frac{\left(z1 \cdot z1\right) \cdot -0.5}{t\_2}}{z1}}\\
          \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+27}:\\
          \;\;\;\;t\_3\\
          
          \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+17}:\\
          \;\;\;\;\frac{1}{\sqrt{\left(\left({\tan \left(\pi \cdot t\_0\right)}^{2} \cdot \frac{z0}{z1}\right) \cdot \left(-z0\right)\right) \cdot \frac{-1}{z1} - -1}}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_3\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64)) < -2e27 or 2e17 < (*.f64 (-.f64 (+.f64 z2 z2) #s(literal -1/2 binary64)) (PI.f64))

            1. Initial program 44.5%

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

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

                \[\leadsto \frac{1}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}} + \frac{1}{2} \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{2} + 2 \cdot z2\right)\right)}^{2}}}}}{\color{blue}{z1}}} \]
            4. Applied rewrites38.8%

              \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}}} \]
            5. Applied rewrites38.7%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{\sqrt{\frac{{z0}^{2} \cdot {\sin \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}{{\cos \left(\pi \cdot \left(0.5 + 2 \cdot z2\right)\right)}^{2}}}}}{z1}} \]
            6. Applied rewrites38.8%

              \[\leadsto \frac{1}{\frac{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5} + 0.5 \cdot \frac{{z1}^{2}}{e^{\log \left({\left(\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right) \cdot z0\right)}^{2}\right) \cdot 0.5}}}{z1}} \]
            7. Applied rewrites32.3%

              \[\leadsto \frac{1}{\frac{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right| - \frac{\left(z1 \cdot z1\right) \cdot -0.5}{\left|z0\right| \cdot \left|\tan \left(\left(\left(z2 + z2\right) - -0.5\right) \cdot \pi\right)\right|}}{z1}} \]

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

            1. Initial program 44.5%

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

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

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

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

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

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

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

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

                \[\leadsto \frac{1}{\sqrt{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(z0\right)}{\mathsf{neg}\left(z1\right)}} - -1}} \]
              9. mult-flipN/A

                \[\leadsto \frac{1}{\sqrt{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)\right) \cdot \color{blue}{\left(\left(\mathsf{neg}\left(z0\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z1\right)}\right)} - -1}} \]
              10. associate-*r*N/A

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\left(\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)\right) \cdot \left(\mathsf{neg}\left(z0\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z1\right)}} - -1}} \]
              11. lower-*.f64N/A

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\left(\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)\right) \cdot \left(\mathsf{neg}\left(z0\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z1\right)}} - -1}} \]
            3. Applied rewrites46.4%

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

          Alternative 16: 51.2% accurate, 0.9× speedup?

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

            1. Initial program 44.5%

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

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

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

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

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

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

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

                \[\leadsto \frac{1}{\sqrt{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right)\right) \cdot \color{blue}{\frac{z0}{z1}} - -1}} \]
              8. mult-flipN/A

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

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

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

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

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

            if 1.7199999999999999e137 < z0

            1. Initial program 44.5%

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

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

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

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

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

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

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

                \[\leadsto \frac{1}{\sqrt{\color{blue}{\frac{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right)}{z1}} - -1}} \]
            3. Applied rewrites48.6%

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

              \[\leadsto \frac{1}{\sqrt{\frac{\frac{{\left(z0 \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)}^{2}}{z1}}{z1} - -1}} \]
            5. Step-by-step derivation
              1. Applied rewrites49.6%

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

            Alternative 17: 50.5% accurate, 0.9× speedup?

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

              1. Initial program 44.5%

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{1}{\sqrt{\frac{\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0}{z1} \cdot \color{blue}{\frac{\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0}{z1}} - -1}} \]
                9. frac-timesN/A

                  \[\leadsto \frac{1}{\sqrt{\color{blue}{\frac{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right)}{z1 \cdot z1}} - -1}} \]
                10. mult-flipN/A

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

                  \[\leadsto \frac{1}{\sqrt{\color{blue}{\left(\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right)\right) \cdot \frac{1}{z1 \cdot z1}} - -1}} \]
              3. Applied rewrites46.7%

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

              if 1.7199999999999999e137 < z0

              1. Initial program 44.5%

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

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

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

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

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

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

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

                  \[\leadsto \frac{1}{\sqrt{\color{blue}{\frac{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right)}{z1}} - -1}} \]
              3. Applied rewrites48.6%

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

                \[\leadsto \frac{1}{\sqrt{\frac{\frac{{\left(z0 \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)}^{2}}{z1}}{z1} - -1}} \]
              5. Step-by-step derivation
                1. Applied rewrites49.6%

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

              Alternative 18: 50.3% accurate, 0.9× speedup?

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

                1. Initial program 44.5%

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{1}{\sqrt{\frac{\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0}{z1} \cdot \color{blue}{\frac{\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0}{z1}} - -1}} \]
                  9. frac-timesN/A

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

                    \[\leadsto \frac{1}{\sqrt{\color{blue}{\frac{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right)}{z1 \cdot z1}} - -1}} \]
                3. Applied rewrites46.6%

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

                if 1.7199999999999999e137 < z0

                1. Initial program 44.5%

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

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

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

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

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

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

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

                    \[\leadsto \frac{1}{\sqrt{\color{blue}{\frac{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right)}{z1}} - -1}} \]
                3. Applied rewrites48.6%

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

                  \[\leadsto \frac{1}{\sqrt{\frac{\frac{{\left(z0 \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)}^{2}}{z1}}{z1} - -1}} \]
                5. Step-by-step derivation
                  1. Applied rewrites49.6%

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

                Alternative 19: 49.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{1}{\sqrt{\color{blue}{\frac{\left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot \frac{z0}{z1}\right) \cdot \left(\tan \left(\left(\left(z2 + z2\right) - \frac{-1}{2}\right) \cdot \pi\right) \cdot z0\right)}{z1}} - -1}} \]
                3. Applied rewrites48.6%

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

                  \[\leadsto \frac{1}{\sqrt{\frac{\frac{{\left(z0 \cdot \tan \left(\pi \cdot \color{blue}{\frac{1}{2}}\right)\right)}^{2}}{z1}}{z1} - -1}} \]
                5. Step-by-step derivation
                  1. Applied rewrites49.6%

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

                  Alternative 20: 45.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

                        \[\leadsto \frac{1}{\sqrt{{\color{blue}{\left(\frac{\tan \left(\frac{1}{2} \cdot \pi\right) \cdot z0}{z1}\right)}}^{2} - -1}} \]
                      5. lower-*.f6445.3%

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

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

                        \[\leadsto \frac{1}{\sqrt{{\left(\frac{\color{blue}{\tan \left(\frac{1}{2} \cdot \pi\right)} \cdot z0}{z1}\right)}^{2} - -1}} \]
                      2. tan-+PI-revN/A

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

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

                        \[\leadsto \frac{1}{\sqrt{{\left(\frac{\tan \left(\frac{1}{2} \cdot \pi + \color{blue}{\pi}\right) \cdot z0}{z1}\right)}^{2} - -1}} \]
                      5. lower-+.f6445.3%

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

                      \[\leadsto \frac{1}{\sqrt{{\left(\frac{\color{blue}{\tan \left(0.5 \cdot \pi + \pi\right)} \cdot z0}{z1}\right)}^{2} - -1}} \]
                    6. Add Preprocessing

                    Alternative 21: 45.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

                          \[\leadsto \frac{1}{\sqrt{{\color{blue}{\left(\frac{\tan \left(\frac{1}{2} \cdot \pi\right) \cdot z0}{z1}\right)}}^{2} - -1}} \]
                        5. lower-*.f6445.3%

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

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

                      Alternative 22: 45.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

                            \[\leadsto \frac{1}{\sqrt{{\color{blue}{\left(\frac{\tan \left(\frac{1}{2} \cdot \pi\right) \cdot z0}{z1}\right)}}^{2} - -1}} \]
                          5. lower-*.f6445.3%

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

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

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

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

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

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

                            \[\leadsto \frac{1}{\sqrt{{\color{blue}{\left(z0 \cdot \frac{\tan \left(\frac{1}{2} \cdot \pi\right)}{z1}\right)}}^{2} - -1}} \]
                          6. lower-/.f6445.4%

                            \[\leadsto \frac{1}{\sqrt{{\left(z0 \cdot \color{blue}{\frac{\tan \left(0.5 \cdot \pi\right)}{z1}}\right)}^{2} - -1}} \]
                        5. Applied rewrites45.4%

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

                        Alternative 23: 18.9% accurate, 11.5× speedup?

                        \[\frac{1}{\sqrt{1}} \]
                        (FPCore (z2 z0 z1)
                          :precision binary64
                          (/ 1.0 (sqrt 1.0)))
                        double code(double z2, double z0, double z1) {
                        	return 1.0 / sqrt(1.0);
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(z2, z0, z1)
                        use fmin_fmax_functions
                            real(8), intent (in) :: z2
                            real(8), intent (in) :: z0
                            real(8), intent (in) :: z1
                            code = 1.0d0 / sqrt(1.0d0)
                        end function
                        
                        public static double code(double z2, double z0, double z1) {
                        	return 1.0 / Math.sqrt(1.0);
                        }
                        
                        def code(z2, z0, z1):
                        	return 1.0 / math.sqrt(1.0)
                        
                        function code(z2, z0, z1)
                        	return Float64(1.0 / sqrt(1.0))
                        end
                        
                        function tmp = code(z2, z0, z1)
                        	tmp = 1.0 / sqrt(1.0);
                        end
                        
                        code[z2_, z0_, z1_] := N[(1.0 / N[Sqrt[1.0], $MachinePrecision]), $MachinePrecision]
                        
                        \frac{1}{\sqrt{1}}
                        
                        Derivation
                        1. Initial program 44.5%

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

                          \[\leadsto \frac{1}{\sqrt{\color{blue}{1}}} \]
                        3. Step-by-step derivation
                          1. Applied rewrites18.9%

                            \[\leadsto \frac{1}{\sqrt{\color{blue}{1}}} \]
                          2. Add Preprocessing

                          Reproduce

                          ?
                          herbie shell --seed 2025250 
                          (FPCore (z2 z0 z1)
                            :name "(/ 1 (sqrt (- (pow (* (tan (* (- (+ z2 z2) -1/2) PI)) (/ z0 z1)) 2) -1)))"
                            :precision binary64
                            (/ 1.0 (sqrt (- (pow (* (tan (* (- (+ z2 z2) -0.5) PI)) (/ z0 z1)) 2.0) -1.0))))