tan-example (used to crash)

Percentage Accurate: 79.1% → 99.7%
Time: 29.7s
Alternatives: 13
Speedup: 1.0×

Specification

?
\[\left(\left(\left(x = 0 \lor 0.5884142 \leq x \land x \leq 505.5909\right) \land \left(-1.796658 \cdot 10^{+308} \leq y \land y \leq -9.425585 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \leq y \land y \leq 1.751224 \cdot 10^{+308}\right)\right) \land \left(-1.776707 \cdot 10^{+308} \leq z \land z \leq -8.599796 \cdot 10^{-310} \lor 3.293145 \cdot 10^{-311} \leq z \land z \leq 1.725154 \cdot 10^{+308}\right)\right) \land \left(-1.796658 \cdot 10^{+308} \leq a \land a \leq -9.425585 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \leq a \land a \leq 1.751224 \cdot 10^{+308}\right)\]
\[\begin{array}{l} \\ x + \left(\tan \left(y + z\right) - \tan a\right) \end{array} \]
(FPCore (x y z a) :precision binary64 (+ x (- (tan (+ y z)) (tan a))))
double code(double x, double y, double z, double a) {
	return x + (tan((y + z)) - tan(a));
}
real(8) function code(x, y, z, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: a
    code = x + (tan((y + z)) - tan(a))
end function
public static double code(double x, double y, double z, double a) {
	return x + (Math.tan((y + z)) - Math.tan(a));
}
def code(x, y, z, a):
	return x + (math.tan((y + z)) - math.tan(a))
function code(x, y, z, a)
	return Float64(x + Float64(tan(Float64(y + z)) - tan(a)))
end
function tmp = code(x, y, z, a)
	tmp = x + (tan((y + z)) - tan(a));
end
code[x_, y_, z_, a_] := N[(x + N[(N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(\tan \left(y + z\right) - \tan a\right)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 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: 79.1% accurate, 1.0× speedup?

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

\\
x + \left(\tan \left(y + z\right) - \tan a\right)
\end{array}

Alternative 1: 99.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - \tan y \cdot \tan z\\ x + \frac{\cos a \cdot \left(\tan y + \tan z\right) - \sin a \cdot t\_0}{\cos a \cdot t\_0} \end{array} \end{array} \]
(FPCore (x y z a)
 :precision binary64
 (let* ((t_0 (- 1.0 (* (tan y) (tan z)))))
   (+
    x
    (/ (- (* (cos a) (+ (tan y) (tan z))) (* (sin a) t_0)) (* (cos a) t_0)))))
double code(double x, double y, double z, double a) {
	double t_0 = 1.0 - (tan(y) * tan(z));
	return x + (((cos(a) * (tan(y) + tan(z))) - (sin(a) * t_0)) / (cos(a) * t_0));
}
real(8) function code(x, y, z, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: a
    real(8) :: t_0
    t_0 = 1.0d0 - (tan(y) * tan(z))
    code = x + (((cos(a) * (tan(y) + tan(z))) - (sin(a) * t_0)) / (cos(a) * t_0))
end function
public static double code(double x, double y, double z, double a) {
	double t_0 = 1.0 - (Math.tan(y) * Math.tan(z));
	return x + (((Math.cos(a) * (Math.tan(y) + Math.tan(z))) - (Math.sin(a) * t_0)) / (Math.cos(a) * t_0));
}
def code(x, y, z, a):
	t_0 = 1.0 - (math.tan(y) * math.tan(z))
	return x + (((math.cos(a) * (math.tan(y) + math.tan(z))) - (math.sin(a) * t_0)) / (math.cos(a) * t_0))
function code(x, y, z, a)
	t_0 = Float64(1.0 - Float64(tan(y) * tan(z)))
	return Float64(x + Float64(Float64(Float64(cos(a) * Float64(tan(y) + tan(z))) - Float64(sin(a) * t_0)) / Float64(cos(a) * t_0)))
end
function tmp = code(x, y, z, a)
	t_0 = 1.0 - (tan(y) * tan(z));
	tmp = x + (((cos(a) * (tan(y) + tan(z))) - (sin(a) * t_0)) / (cos(a) * t_0));
end
code[x_, y_, z_, a_] := Block[{t$95$0 = N[(1.0 - N[(N[Tan[y], $MachinePrecision] * N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x + N[(N[(N[(N[Cos[a], $MachinePrecision] * N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[a], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[a], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 1 - \tan y \cdot \tan z\\
x + \frac{\cos a \cdot \left(\tan y + \tan z\right) - \sin a \cdot t\_0}{\cos a \cdot t\_0}
\end{array}
\end{array}
Derivation
  1. Initial program 78.9%

    \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto x + \color{blue}{\left(\tan \left(y + z\right) - \tan a\right)} \]
    2. lift-tan.f64N/A

      \[\leadsto x + \left(\color{blue}{\tan \left(y + z\right)} - \tan a\right) \]
    3. lift-+.f64N/A

      \[\leadsto x + \left(\tan \color{blue}{\left(y + z\right)} - \tan a\right) \]
    4. tan-sumN/A

      \[\leadsto x + \left(\color{blue}{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}} - \tan a\right) \]
    5. lift-tan.f64N/A

      \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - \color{blue}{\tan a}\right) \]
    6. tan-quotN/A

      \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - \color{blue}{\frac{\sin a}{\cos a}}\right) \]
    7. frac-subN/A

      \[\leadsto x + \color{blue}{\frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\left(1 - \tan y \cdot \tan z\right) \cdot \cos a}} \]
    8. lower-/.f64N/A

      \[\leadsto x + \color{blue}{\frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\left(1 - \tan y \cdot \tan z\right) \cdot \cos a}} \]
  4. Applied rewrites99.7%

    \[\leadsto x + \color{blue}{\frac{\cos a \cdot \left(\tan y + \tan z\right) - \sin a \cdot \left(1 - \tan y \cdot \tan z\right)}{\cos a \cdot \left(1 - \tan y \cdot \tan z\right)}} \]
  5. Add Preprocessing

Alternative 2: 99.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - \tan a\right) \end{array} \]
(FPCore (x y z a)
 :precision binary64
 (+ x (- (/ (+ (tan y) (tan z)) (- 1.0 (* (tan y) (tan z)))) (tan a))))
double code(double x, double y, double z, double a) {
	return x + (((tan(y) + tan(z)) / (1.0 - (tan(y) * tan(z)))) - tan(a));
}
real(8) function code(x, y, z, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: a
    code = x + (((tan(y) + tan(z)) / (1.0d0 - (tan(y) * tan(z)))) - tan(a))
end function
public static double code(double x, double y, double z, double a) {
	return x + (((Math.tan(y) + Math.tan(z)) / (1.0 - (Math.tan(y) * Math.tan(z)))) - Math.tan(a));
}
def code(x, y, z, a):
	return x + (((math.tan(y) + math.tan(z)) / (1.0 - (math.tan(y) * math.tan(z)))) - math.tan(a))
function code(x, y, z, a)
	return Float64(x + Float64(Float64(Float64(tan(y) + tan(z)) / Float64(1.0 - Float64(tan(y) * tan(z)))) - tan(a)))
end
function tmp = code(x, y, z, a)
	tmp = x + (((tan(y) + tan(z)) / (1.0 - (tan(y) * tan(z)))) - tan(a));
end
code[x_, y_, z_, a_] := N[(x + N[(N[(N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(N[Tan[y], $MachinePrecision] * N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - \tan a\right)
\end{array}
Derivation
  1. Initial program 78.9%

    \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-tan.f64N/A

      \[\leadsto x + \left(\color{blue}{\tan \left(y + z\right)} - \tan a\right) \]
    2. lift-+.f64N/A

      \[\leadsto x + \left(\tan \color{blue}{\left(y + z\right)} - \tan a\right) \]
    3. tan-sumN/A

      \[\leadsto x + \left(\color{blue}{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}} - \tan a\right) \]
    4. lower-/.f64N/A

      \[\leadsto x + \left(\color{blue}{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}} - \tan a\right) \]
    5. lower-+.f64N/A

      \[\leadsto x + \left(\frac{\color{blue}{\tan y + \tan z}}{1 - \tan y \cdot \tan z} - \tan a\right) \]
    6. lower-tan.f64N/A

      \[\leadsto x + \left(\frac{\color{blue}{\tan y} + \tan z}{1 - \tan y \cdot \tan z} - \tan a\right) \]
    7. lower-tan.f64N/A

      \[\leadsto x + \left(\frac{\tan y + \color{blue}{\tan z}}{1 - \tan y \cdot \tan z} - \tan a\right) \]
    8. lower--.f64N/A

      \[\leadsto x + \left(\frac{\tan y + \tan z}{\color{blue}{1 - \tan y \cdot \tan z}} - \tan a\right) \]
    9. lower-*.f64N/A

      \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \color{blue}{\tan y \cdot \tan z}} - \tan a\right) \]
    10. lower-tan.f64N/A

      \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \color{blue}{\tan y} \cdot \tan z} - \tan a\right) \]
    11. lower-tan.f6499.7

      \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \color{blue}{\tan z}} - \tan a\right) \]
  4. Applied rewrites99.7%

    \[\leadsto x + \left(\color{blue}{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}} - \tan a\right) \]
  5. Add Preprocessing

Alternative 3: 88.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan y + \tan z\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{-12}:\\ \;\;\;\;x + \left(\tan \left(y + z\right) - \tan a\right)\\ \mathbf{elif}\;a \leq 2.36 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{t\_0}{1 - \tan y \cdot \tan z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t\_0 \cdot 1 - \tan a\right)\\ \end{array} \end{array} \]
(FPCore (x y z a)
 :precision binary64
 (let* ((t_0 (+ (tan y) (tan z))))
   (if (<= a -2.1e-12)
     (+ x (- (tan (+ y z)) (tan a)))
     (if (<= a 2.36e-63)
       (+ x (/ t_0 (- 1.0 (* (tan y) (tan z)))))
       (+ x (- (* t_0 1.0) (tan a)))))))
double code(double x, double y, double z, double a) {
	double t_0 = tan(y) + tan(z);
	double tmp;
	if (a <= -2.1e-12) {
		tmp = x + (tan((y + z)) - tan(a));
	} else if (a <= 2.36e-63) {
		tmp = x + (t_0 / (1.0 - (tan(y) * tan(z))));
	} else {
		tmp = x + ((t_0 * 1.0) - tan(a));
	}
	return tmp;
}
real(8) function code(x, y, z, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: a
    real(8) :: t_0
    real(8) :: tmp
    t_0 = tan(y) + tan(z)
    if (a <= (-2.1d-12)) then
        tmp = x + (tan((y + z)) - tan(a))
    else if (a <= 2.36d-63) then
        tmp = x + (t_0 / (1.0d0 - (tan(y) * tan(z))))
    else
        tmp = x + ((t_0 * 1.0d0) - tan(a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double a) {
	double t_0 = Math.tan(y) + Math.tan(z);
	double tmp;
	if (a <= -2.1e-12) {
		tmp = x + (Math.tan((y + z)) - Math.tan(a));
	} else if (a <= 2.36e-63) {
		tmp = x + (t_0 / (1.0 - (Math.tan(y) * Math.tan(z))));
	} else {
		tmp = x + ((t_0 * 1.0) - Math.tan(a));
	}
	return tmp;
}
def code(x, y, z, a):
	t_0 = math.tan(y) + math.tan(z)
	tmp = 0
	if a <= -2.1e-12:
		tmp = x + (math.tan((y + z)) - math.tan(a))
	elif a <= 2.36e-63:
		tmp = x + (t_0 / (1.0 - (math.tan(y) * math.tan(z))))
	else:
		tmp = x + ((t_0 * 1.0) - math.tan(a))
	return tmp
function code(x, y, z, a)
	t_0 = Float64(tan(y) + tan(z))
	tmp = 0.0
	if (a <= -2.1e-12)
		tmp = Float64(x + Float64(tan(Float64(y + z)) - tan(a)));
	elseif (a <= 2.36e-63)
		tmp = Float64(x + Float64(t_0 / Float64(1.0 - Float64(tan(y) * tan(z)))));
	else
		tmp = Float64(x + Float64(Float64(t_0 * 1.0) - tan(a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, a)
	t_0 = tan(y) + tan(z);
	tmp = 0.0;
	if (a <= -2.1e-12)
		tmp = x + (tan((y + z)) - tan(a));
	elseif (a <= 2.36e-63)
		tmp = x + (t_0 / (1.0 - (tan(y) * tan(z))));
	else
		tmp = x + ((t_0 * 1.0) - tan(a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, a_] := Block[{t$95$0 = N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.1e-12], N[(x + N[(N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.36e-63], N[(x + N[(t$95$0 / N[(1.0 - N[(N[Tan[y], $MachinePrecision] * N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t$95$0 * 1.0), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \tan y + \tan z\\
\mathbf{if}\;a \leq -2.1 \cdot 10^{-12}:\\
\;\;\;\;x + \left(\tan \left(y + z\right) - \tan a\right)\\

\mathbf{elif}\;a \leq 2.36 \cdot 10^{-63}:\\
\;\;\;\;x + \frac{t\_0}{1 - \tan y \cdot \tan z}\\

\mathbf{else}:\\
\;\;\;\;x + \left(t\_0 \cdot 1 - \tan a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.09999999999999994e-12

    1. Initial program 77.5%

      \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
    2. Add Preprocessing

    if -2.09999999999999994e-12 < a < 2.35999999999999998e-63

    1. Initial program 82.1%

      \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto x + \left(\tan \color{blue}{\left(y + z\right)} - \tan a\right) \]
      2. flip-+N/A

        \[\leadsto x + \left(\tan \color{blue}{\left(\frac{y \cdot y - z \cdot z}{y - z}\right)} - \tan a\right) \]
      3. clear-numN/A

        \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
      4. lower-/.f64N/A

        \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
      5. clear-numN/A

        \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{\frac{y \cdot y - z \cdot z}{y - z}}}}\right) - \tan a\right) \]
      6. flip-+N/A

        \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
      7. lift-+.f64N/A

        \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
      8. lower-/.f6471.0

        \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{y + z}}}\right) - \tan a\right) \]
    4. Applied rewrites71.0%

      \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{1}{y + z}}\right)} - \tan a\right) \]
    5. Taylor expanded in a around 0

      \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
      2. lower-sin.f64N/A

        \[\leadsto x + \frac{\color{blue}{\sin \left(y + z\right)}}{\cos \left(y + z\right)} \]
      3. lower-+.f64N/A

        \[\leadsto x + \frac{\sin \color{blue}{\left(y + z\right)}}{\cos \left(y + z\right)} \]
      4. lower-cos.f64N/A

        \[\leadsto x + \frac{\sin \left(y + z\right)}{\color{blue}{\cos \left(y + z\right)}} \]
      5. lower-+.f6482.1

        \[\leadsto x + \frac{\sin \left(y + z\right)}{\cos \color{blue}{\left(y + z\right)}} \]
    7. Applied rewrites82.1%

      \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
    8. Step-by-step derivation
      1. Applied rewrites99.8%

        \[\leadsto x + \frac{\tan y + \tan z}{\color{blue}{1 - \tan y \cdot \tan z}} \]

      if 2.35999999999999998e-63 < a

      1. Initial program 75.9%

        \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-+.f64N/A

          \[\leadsto \color{blue}{x + \left(\tan \left(y + z\right) - \tan a\right)} \]
        2. lift--.f64N/A

          \[\leadsto x + \color{blue}{\left(\tan \left(y + z\right) - \tan a\right)} \]
        3. associate-+r-N/A

          \[\leadsto \color{blue}{\left(x + \tan \left(y + z\right)\right) - \tan a} \]
        4. +-commutativeN/A

          \[\leadsto \color{blue}{\left(\tan \left(y + z\right) + x\right)} - \tan a \]
        5. associate--l+N/A

          \[\leadsto \color{blue}{\tan \left(y + z\right) + \left(x - \tan a\right)} \]
        6. lift-tan.f64N/A

          \[\leadsto \color{blue}{\tan \left(y + z\right)} + \left(x - \tan a\right) \]
        7. lift-+.f64N/A

          \[\leadsto \tan \color{blue}{\left(y + z\right)} + \left(x - \tan a\right) \]
        8. tan-sumN/A

          \[\leadsto \color{blue}{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}} + \left(x - \tan a\right) \]
        9. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{1 - \tan y \cdot \tan z}{\tan y + \tan z}}} + \left(x - \tan a\right) \]
        10. associate-/r/N/A

          \[\leadsto \color{blue}{\frac{1}{1 - \tan y \cdot \tan z} \cdot \left(\tan y + \tan z\right)} + \left(x - \tan a\right) \]
        11. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \tan z, x - \tan a\right)} \]
        12. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{1 - \tan y \cdot \tan z}}, \tan y + \tan z, x - \tan a\right) \]
        13. lower--.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{1 - \tan y \cdot \tan z}}, \tan y + \tan z, x - \tan a\right) \]
        14. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \color{blue}{\tan y \cdot \tan z}}, \tan y + \tan z, x - \tan a\right) \]
        15. lower-tan.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \color{blue}{\tan y} \cdot \tan z}, \tan y + \tan z, x - \tan a\right) \]
        16. lower-tan.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \color{blue}{\tan z}}, \tan y + \tan z, x - \tan a\right) \]
        17. lower-+.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \color{blue}{\tan y + \tan z}, x - \tan a\right) \]
        18. lower-tan.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \color{blue}{\tan y} + \tan z, x - \tan a\right) \]
        19. lower-tan.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \color{blue}{\tan z}, x - \tan a\right) \]
        20. lower--.f6499.6

          \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \tan z, \color{blue}{x - \tan a}\right) \]
      4. Applied rewrites99.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \tan z, x - \tan a\right)} \]
      5. Taylor expanded in y around 0

        \[\leadsto \mathsf{fma}\left(\color{blue}{1}, \tan y + \tan z, x - \tan a\right) \]
      6. Step-by-step derivation
        1. Applied rewrites76.0%

          \[\leadsto \mathsf{fma}\left(\color{blue}{1}, \tan y + \tan z, x - \tan a\right) \]
        2. Step-by-step derivation
          1. lift-fma.f64N/A

            \[\leadsto \color{blue}{1 \cdot \left(\tan y + \tan z\right) + \left(x - \tan a\right)} \]
          2. +-commutativeN/A

            \[\leadsto \color{blue}{\left(x - \tan a\right) + 1 \cdot \left(\tan y + \tan z\right)} \]
          3. lift--.f64N/A

            \[\leadsto \color{blue}{\left(x - \tan a\right)} + 1 \cdot \left(\tan y + \tan z\right) \]
          4. associate-+l-N/A

            \[\leadsto \color{blue}{x - \left(\tan a - 1 \cdot \left(\tan y + \tan z\right)\right)} \]
          5. lower--.f64N/A

            \[\leadsto \color{blue}{x - \left(\tan a - 1 \cdot \left(\tan y + \tan z\right)\right)} \]
          6. lower--.f64N/A

            \[\leadsto x - \color{blue}{\left(\tan a - 1 \cdot \left(\tan y + \tan z\right)\right)} \]
          7. *-commutativeN/A

            \[\leadsto x - \left(\tan a - \color{blue}{\left(\tan y + \tan z\right) \cdot 1}\right) \]
          8. lower-*.f6476.1

            \[\leadsto x - \left(\tan a - \color{blue}{\left(\tan y + \tan z\right) \cdot 1}\right) \]
        3. Applied rewrites76.1%

          \[\leadsto \color{blue}{x - \left(\tan a - \left(\tan y + \tan z\right) \cdot 1\right)} \]
      7. Recombined 3 regimes into one program.
      8. Final simplification86.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{-12}:\\ \;\;\;\;x + \left(\tan \left(y + z\right) - \tan a\right)\\ \mathbf{elif}\;a \leq 2.36 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(\tan y + \tan z\right) \cdot 1 - \tan a\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 59.2% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan \left(y + z\right)\\ t_1 := x + t\_0\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-11}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 0.02:\\ \;\;\;\;x + \left(\mathsf{fma}\left(\mathsf{fma}\left(z, z \cdot \mathsf{fma}\left(z \cdot z, 0.05396825396825397, 0.13333333333333333\right), 0.3333333333333333\right), z \cdot \left(z \cdot z\right), z\right) - \tan a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z a)
       :precision binary64
       (let* ((t_0 (tan (+ y z))) (t_1 (+ x t_0)))
         (if (<= t_0 -1e-11)
           t_1
           (if (<= t_0 0.02)
             (+
              x
              (-
               (fma
                (fma
                 z
                 (* z (fma (* z z) 0.05396825396825397 0.13333333333333333))
                 0.3333333333333333)
                (* z (* z z))
                z)
               (tan a)))
             t_1))))
      double code(double x, double y, double z, double a) {
      	double t_0 = tan((y + z));
      	double t_1 = x + t_0;
      	double tmp;
      	if (t_0 <= -1e-11) {
      		tmp = t_1;
      	} else if (t_0 <= 0.02) {
      		tmp = x + (fma(fma(z, (z * fma((z * z), 0.05396825396825397, 0.13333333333333333)), 0.3333333333333333), (z * (z * z)), z) - tan(a));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, a)
      	t_0 = tan(Float64(y + z))
      	t_1 = Float64(x + t_0)
      	tmp = 0.0
      	if (t_0 <= -1e-11)
      		tmp = t_1;
      	elseif (t_0 <= 0.02)
      		tmp = Float64(x + Float64(fma(fma(z, Float64(z * fma(Float64(z * z), 0.05396825396825397, 0.13333333333333333)), 0.3333333333333333), Float64(z * Float64(z * z)), z) - tan(a)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, a_] := Block[{t$95$0 = N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x + t$95$0), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-11], t$95$1, If[LessEqual[t$95$0, 0.02], N[(x + N[(N[(N[(z * N[(z * N[(N[(z * z), $MachinePrecision] * 0.05396825396825397 + 0.13333333333333333), $MachinePrecision]), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \tan \left(y + z\right)\\
      t_1 := x + t\_0\\
      \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-11}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_0 \leq 0.02:\\
      \;\;\;\;x + \left(\mathsf{fma}\left(\mathsf{fma}\left(z, z \cdot \mathsf{fma}\left(z \cdot z, 0.05396825396825397, 0.13333333333333333\right), 0.3333333333333333\right), z \cdot \left(z \cdot z\right), z\right) - \tan a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (tan.f64 (+.f64 y z)) < -9.99999999999999939e-12 or 0.0200000000000000004 < (tan.f64 (+.f64 y z))

        1. Initial program 72.4%

          \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto x + \left(\tan \color{blue}{\left(y + z\right)} - \tan a\right) \]
          2. flip-+N/A

            \[\leadsto x + \left(\tan \color{blue}{\left(\frac{y \cdot y - z \cdot z}{y - z}\right)} - \tan a\right) \]
          3. clear-numN/A

            \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
          4. lower-/.f64N/A

            \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
          5. clear-numN/A

            \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{\frac{y \cdot y - z \cdot z}{y - z}}}}\right) - \tan a\right) \]
          6. flip-+N/A

            \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
          7. lift-+.f64N/A

            \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
          8. lower-/.f6463.2

            \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{y + z}}}\right) - \tan a\right) \]
        4. Applied rewrites63.2%

          \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{1}{y + z}}\right)} - \tan a\right) \]
        5. Taylor expanded in a around 0

          \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
        6. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
          2. lower-sin.f64N/A

            \[\leadsto x + \frac{\color{blue}{\sin \left(y + z\right)}}{\cos \left(y + z\right)} \]
          3. lower-+.f64N/A

            \[\leadsto x + \frac{\sin \color{blue}{\left(y + z\right)}}{\cos \left(y + z\right)} \]
          4. lower-cos.f64N/A

            \[\leadsto x + \frac{\sin \left(y + z\right)}{\color{blue}{\cos \left(y + z\right)}} \]
          5. lower-+.f6447.4

            \[\leadsto x + \frac{\sin \left(y + z\right)}{\cos \color{blue}{\left(y + z\right)}} \]
        7. Applied rewrites47.4%

          \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
        8. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \color{blue}{x + \frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
          2. +-commutativeN/A

            \[\leadsto \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)} + x} \]
          3. lower-+.f6447.4

            \[\leadsto \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)} + x} \]
        9. Applied rewrites47.4%

          \[\leadsto \color{blue}{\tan \left(y + z\right) + x} \]

        if -9.99999999999999939e-12 < (tan.f64 (+.f64 y z)) < 0.0200000000000000004

        1. Initial program 99.9%

          \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
          2. lower-sin.f64N/A

            \[\leadsto x + \left(\frac{\color{blue}{\sin z}}{\cos z} - \tan a\right) \]
          3. lower-cos.f6495.9

            \[\leadsto x + \left(\frac{\sin z}{\color{blue}{\cos z}} - \tan a\right) \]
        5. Applied rewrites95.9%

          \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
        6. Taylor expanded in z around 0

          \[\leadsto x + \left(z \cdot \color{blue}{\left(1 + {z}^{2} \cdot \left(\frac{1}{3} + {z}^{2} \cdot \left(\frac{2}{15} + \frac{17}{315} \cdot {z}^{2}\right)\right)\right)} - \tan a\right) \]
        7. Step-by-step derivation
          1. Applied rewrites95.9%

            \[\leadsto x + \left(\mathsf{fma}\left(\mathsf{fma}\left(z, z \cdot \mathsf{fma}\left(z \cdot z, 0.05396825396825397, 0.13333333333333333\right), 0.3333333333333333\right), \color{blue}{\left(z \cdot z\right) \cdot z}, z\right) - \tan a\right) \]
        8. Recombined 2 regimes into one program.
        9. Final simplification59.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\tan \left(y + z\right) \leq -1 \cdot 10^{-11}:\\ \;\;\;\;x + \tan \left(y + z\right)\\ \mathbf{elif}\;\tan \left(y + z\right) \leq 0.02:\\ \;\;\;\;x + \left(\mathsf{fma}\left(\mathsf{fma}\left(z, z \cdot \mathsf{fma}\left(z \cdot z, 0.05396825396825397, 0.13333333333333333\right), 0.3333333333333333\right), z \cdot \left(z \cdot z\right), z\right) - \tan a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \tan \left(y + z\right)\\ \end{array} \]
        10. Add Preprocessing

        Alternative 5: 59.2% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan \left(y + z\right)\\ t_1 := x + t\_0\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-11}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 0.02:\\ \;\;\;\;x + \left(\mathsf{fma}\left(\mathsf{fma}\left(z, z \cdot 0.13333333333333333, 0.3333333333333333\right), z \cdot \left(z \cdot z\right), z\right) - \tan a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z a)
         :precision binary64
         (let* ((t_0 (tan (+ y z))) (t_1 (+ x t_0)))
           (if (<= t_0 -1e-11)
             t_1
             (if (<= t_0 0.02)
               (+
                x
                (-
                 (fma
                  (fma z (* z 0.13333333333333333) 0.3333333333333333)
                  (* z (* z z))
                  z)
                 (tan a)))
               t_1))))
        double code(double x, double y, double z, double a) {
        	double t_0 = tan((y + z));
        	double t_1 = x + t_0;
        	double tmp;
        	if (t_0 <= -1e-11) {
        		tmp = t_1;
        	} else if (t_0 <= 0.02) {
        		tmp = x + (fma(fma(z, (z * 0.13333333333333333), 0.3333333333333333), (z * (z * z)), z) - tan(a));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, a)
        	t_0 = tan(Float64(y + z))
        	t_1 = Float64(x + t_0)
        	tmp = 0.0
        	if (t_0 <= -1e-11)
        		tmp = t_1;
        	elseif (t_0 <= 0.02)
        		tmp = Float64(x + Float64(fma(fma(z, Float64(z * 0.13333333333333333), 0.3333333333333333), Float64(z * Float64(z * z)), z) - tan(a)));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, a_] := Block[{t$95$0 = N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x + t$95$0), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-11], t$95$1, If[LessEqual[t$95$0, 0.02], N[(x + N[(N[(N[(z * N[(z * 0.13333333333333333), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \tan \left(y + z\right)\\
        t_1 := x + t\_0\\
        \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-11}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_0 \leq 0.02:\\
        \;\;\;\;x + \left(\mathsf{fma}\left(\mathsf{fma}\left(z, z \cdot 0.13333333333333333, 0.3333333333333333\right), z \cdot \left(z \cdot z\right), z\right) - \tan a\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (tan.f64 (+.f64 y z)) < -9.99999999999999939e-12 or 0.0200000000000000004 < (tan.f64 (+.f64 y z))

          1. Initial program 72.4%

            \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto x + \left(\tan \color{blue}{\left(y + z\right)} - \tan a\right) \]
            2. flip-+N/A

              \[\leadsto x + \left(\tan \color{blue}{\left(\frac{y \cdot y - z \cdot z}{y - z}\right)} - \tan a\right) \]
            3. clear-numN/A

              \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
            4. lower-/.f64N/A

              \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
            5. clear-numN/A

              \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{\frac{y \cdot y - z \cdot z}{y - z}}}}\right) - \tan a\right) \]
            6. flip-+N/A

              \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
            7. lift-+.f64N/A

              \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
            8. lower-/.f6463.2

              \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{y + z}}}\right) - \tan a\right) \]
          4. Applied rewrites63.2%

            \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{1}{y + z}}\right)} - \tan a\right) \]
          5. Taylor expanded in a around 0

            \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
          6. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
            2. lower-sin.f64N/A

              \[\leadsto x + \frac{\color{blue}{\sin \left(y + z\right)}}{\cos \left(y + z\right)} \]
            3. lower-+.f64N/A

              \[\leadsto x + \frac{\sin \color{blue}{\left(y + z\right)}}{\cos \left(y + z\right)} \]
            4. lower-cos.f64N/A

              \[\leadsto x + \frac{\sin \left(y + z\right)}{\color{blue}{\cos \left(y + z\right)}} \]
            5. lower-+.f6447.4

              \[\leadsto x + \frac{\sin \left(y + z\right)}{\cos \color{blue}{\left(y + z\right)}} \]
          7. Applied rewrites47.4%

            \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
          8. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \color{blue}{x + \frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
            2. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)} + x} \]
            3. lower-+.f6447.4

              \[\leadsto \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)} + x} \]
          9. Applied rewrites47.4%

            \[\leadsto \color{blue}{\tan \left(y + z\right) + x} \]

          if -9.99999999999999939e-12 < (tan.f64 (+.f64 y z)) < 0.0200000000000000004

          1. Initial program 99.9%

            \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
          2. Add Preprocessing
          3. Taylor expanded in y around 0

            \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
            2. lower-sin.f64N/A

              \[\leadsto x + \left(\frac{\color{blue}{\sin z}}{\cos z} - \tan a\right) \]
            3. lower-cos.f6495.9

              \[\leadsto x + \left(\frac{\sin z}{\color{blue}{\cos z}} - \tan a\right) \]
          5. Applied rewrites95.9%

            \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
          6. Taylor expanded in z around 0

            \[\leadsto x + \left(z \cdot \color{blue}{\left(1 + {z}^{2} \cdot \left(\frac{1}{3} + \frac{2}{15} \cdot {z}^{2}\right)\right)} - \tan a\right) \]
          7. Step-by-step derivation
            1. Applied rewrites95.9%

              \[\leadsto x + \left(\mathsf{fma}\left(\mathsf{fma}\left(z, z \cdot 0.13333333333333333, 0.3333333333333333\right), \color{blue}{\left(z \cdot z\right) \cdot z}, z\right) - \tan a\right) \]
          8. Recombined 2 regimes into one program.
          9. Final simplification59.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\tan \left(y + z\right) \leq -1 \cdot 10^{-11}:\\ \;\;\;\;x + \tan \left(y + z\right)\\ \mathbf{elif}\;\tan \left(y + z\right) \leq 0.02:\\ \;\;\;\;x + \left(\mathsf{fma}\left(\mathsf{fma}\left(z, z \cdot 0.13333333333333333, 0.3333333333333333\right), z \cdot \left(z \cdot z\right), z\right) - \tan a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \tan \left(y + z\right)\\ \end{array} \]
          10. Add Preprocessing

          Alternative 6: 59.2% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan \left(y + z\right)\\ t_1 := x + t\_0\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-11}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 0.02:\\ \;\;\;\;x + \left(\mathsf{fma}\left(z, \left(z \cdot z\right) \cdot 0.3333333333333333, z\right) - \tan a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z a)
           :precision binary64
           (let* ((t_0 (tan (+ y z))) (t_1 (+ x t_0)))
             (if (<= t_0 -1e-11)
               t_1
               (if (<= t_0 0.02)
                 (+ x (- (fma z (* (* z z) 0.3333333333333333) z) (tan a)))
                 t_1))))
          double code(double x, double y, double z, double a) {
          	double t_0 = tan((y + z));
          	double t_1 = x + t_0;
          	double tmp;
          	if (t_0 <= -1e-11) {
          		tmp = t_1;
          	} else if (t_0 <= 0.02) {
          		tmp = x + (fma(z, ((z * z) * 0.3333333333333333), z) - tan(a));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, a)
          	t_0 = tan(Float64(y + z))
          	t_1 = Float64(x + t_0)
          	tmp = 0.0
          	if (t_0 <= -1e-11)
          		tmp = t_1;
          	elseif (t_0 <= 0.02)
          		tmp = Float64(x + Float64(fma(z, Float64(Float64(z * z) * 0.3333333333333333), z) - tan(a)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, a_] := Block[{t$95$0 = N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x + t$95$0), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-11], t$95$1, If[LessEqual[t$95$0, 0.02], N[(x + N[(N[(z * N[(N[(z * z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + z), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \tan \left(y + z\right)\\
          t_1 := x + t\_0\\
          \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-11}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_0 \leq 0.02:\\
          \;\;\;\;x + \left(\mathsf{fma}\left(z, \left(z \cdot z\right) \cdot 0.3333333333333333, z\right) - \tan a\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (tan.f64 (+.f64 y z)) < -9.99999999999999939e-12 or 0.0200000000000000004 < (tan.f64 (+.f64 y z))

            1. Initial program 72.4%

              \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto x + \left(\tan \color{blue}{\left(y + z\right)} - \tan a\right) \]
              2. flip-+N/A

                \[\leadsto x + \left(\tan \color{blue}{\left(\frac{y \cdot y - z \cdot z}{y - z}\right)} - \tan a\right) \]
              3. clear-numN/A

                \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
              4. lower-/.f64N/A

                \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
              5. clear-numN/A

                \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{\frac{y \cdot y - z \cdot z}{y - z}}}}\right) - \tan a\right) \]
              6. flip-+N/A

                \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
              7. lift-+.f64N/A

                \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
              8. lower-/.f6463.2

                \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{y + z}}}\right) - \tan a\right) \]
            4. Applied rewrites63.2%

              \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{1}{y + z}}\right)} - \tan a\right) \]
            5. Taylor expanded in a around 0

              \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
              2. lower-sin.f64N/A

                \[\leadsto x + \frac{\color{blue}{\sin \left(y + z\right)}}{\cos \left(y + z\right)} \]
              3. lower-+.f64N/A

                \[\leadsto x + \frac{\sin \color{blue}{\left(y + z\right)}}{\cos \left(y + z\right)} \]
              4. lower-cos.f64N/A

                \[\leadsto x + \frac{\sin \left(y + z\right)}{\color{blue}{\cos \left(y + z\right)}} \]
              5. lower-+.f6447.4

                \[\leadsto x + \frac{\sin \left(y + z\right)}{\cos \color{blue}{\left(y + z\right)}} \]
            7. Applied rewrites47.4%

              \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
            8. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{x + \frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
              2. +-commutativeN/A

                \[\leadsto \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)} + x} \]
              3. lower-+.f6447.4

                \[\leadsto \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)} + x} \]
            9. Applied rewrites47.4%

              \[\leadsto \color{blue}{\tan \left(y + z\right) + x} \]

            if -9.99999999999999939e-12 < (tan.f64 (+.f64 y z)) < 0.0200000000000000004

            1. Initial program 99.9%

              \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
            2. Add Preprocessing
            3. Taylor expanded in y around 0

              \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
            4. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
              2. lower-sin.f64N/A

                \[\leadsto x + \left(\frac{\color{blue}{\sin z}}{\cos z} - \tan a\right) \]
              3. lower-cos.f6495.9

                \[\leadsto x + \left(\frac{\sin z}{\color{blue}{\cos z}} - \tan a\right) \]
            5. Applied rewrites95.9%

              \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
            6. Taylor expanded in z around 0

              \[\leadsto x + \left(z \cdot \color{blue}{\left(1 + \frac{1}{3} \cdot {z}^{2}\right)} - \tan a\right) \]
            7. Step-by-step derivation
              1. Applied rewrites95.9%

                \[\leadsto x + \left(\mathsf{fma}\left(z, \color{blue}{0.3333333333333333 \cdot \left(z \cdot z\right)}, z\right) - \tan a\right) \]
            8. Recombined 2 regimes into one program.
            9. Final simplification59.0%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\tan \left(y + z\right) \leq -1 \cdot 10^{-11}:\\ \;\;\;\;x + \tan \left(y + z\right)\\ \mathbf{elif}\;\tan \left(y + z\right) \leq 0.02:\\ \;\;\;\;x + \left(\mathsf{fma}\left(z, \left(z \cdot z\right) \cdot 0.3333333333333333, z\right) - \tan a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \tan \left(y + z\right)\\ \end{array} \]
            10. Add Preprocessing

            Alternative 7: 79.5% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ x + \left(\left(\tan y + \tan z\right) \cdot 1 - \tan a\right) \end{array} \]
            (FPCore (x y z a)
             :precision binary64
             (+ x (- (* (+ (tan y) (tan z)) 1.0) (tan a))))
            double code(double x, double y, double z, double a) {
            	return x + (((tan(y) + tan(z)) * 1.0) - tan(a));
            }
            
            real(8) function code(x, y, z, a)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: a
                code = x + (((tan(y) + tan(z)) * 1.0d0) - tan(a))
            end function
            
            public static double code(double x, double y, double z, double a) {
            	return x + (((Math.tan(y) + Math.tan(z)) * 1.0) - Math.tan(a));
            }
            
            def code(x, y, z, a):
            	return x + (((math.tan(y) + math.tan(z)) * 1.0) - math.tan(a))
            
            function code(x, y, z, a)
            	return Float64(x + Float64(Float64(Float64(tan(y) + tan(z)) * 1.0) - tan(a)))
            end
            
            function tmp = code(x, y, z, a)
            	tmp = x + (((tan(y) + tan(z)) * 1.0) - tan(a));
            end
            
            code[x_, y_, z_, a_] := N[(x + N[(N[(N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            x + \left(\left(\tan y + \tan z\right) \cdot 1 - \tan a\right)
            \end{array}
            
            Derivation
            1. Initial program 78.9%

              \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{x + \left(\tan \left(y + z\right) - \tan a\right)} \]
              2. lift--.f64N/A

                \[\leadsto x + \color{blue}{\left(\tan \left(y + z\right) - \tan a\right)} \]
              3. associate-+r-N/A

                \[\leadsto \color{blue}{\left(x + \tan \left(y + z\right)\right) - \tan a} \]
              4. +-commutativeN/A

                \[\leadsto \color{blue}{\left(\tan \left(y + z\right) + x\right)} - \tan a \]
              5. associate--l+N/A

                \[\leadsto \color{blue}{\tan \left(y + z\right) + \left(x - \tan a\right)} \]
              6. lift-tan.f64N/A

                \[\leadsto \color{blue}{\tan \left(y + z\right)} + \left(x - \tan a\right) \]
              7. lift-+.f64N/A

                \[\leadsto \tan \color{blue}{\left(y + z\right)} + \left(x - \tan a\right) \]
              8. tan-sumN/A

                \[\leadsto \color{blue}{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}} + \left(x - \tan a\right) \]
              9. clear-numN/A

                \[\leadsto \color{blue}{\frac{1}{\frac{1 - \tan y \cdot \tan z}{\tan y + \tan z}}} + \left(x - \tan a\right) \]
              10. associate-/r/N/A

                \[\leadsto \color{blue}{\frac{1}{1 - \tan y \cdot \tan z} \cdot \left(\tan y + \tan z\right)} + \left(x - \tan a\right) \]
              11. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \tan z, x - \tan a\right)} \]
              12. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{1 - \tan y \cdot \tan z}}, \tan y + \tan z, x - \tan a\right) \]
              13. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{1 - \tan y \cdot \tan z}}, \tan y + \tan z, x - \tan a\right) \]
              14. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \color{blue}{\tan y \cdot \tan z}}, \tan y + \tan z, x - \tan a\right) \]
              15. lower-tan.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \color{blue}{\tan y} \cdot \tan z}, \tan y + \tan z, x - \tan a\right) \]
              16. lower-tan.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \color{blue}{\tan z}}, \tan y + \tan z, x - \tan a\right) \]
              17. lower-+.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \color{blue}{\tan y + \tan z}, x - \tan a\right) \]
              18. lower-tan.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \color{blue}{\tan y} + \tan z, x - \tan a\right) \]
              19. lower-tan.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \color{blue}{\tan z}, x - \tan a\right) \]
              20. lower--.f6499.6

                \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \tan z, \color{blue}{x - \tan a}\right) \]
            4. Applied rewrites99.6%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \tan z, x - \tan a\right)} \]
            5. Taylor expanded in y around 0

              \[\leadsto \mathsf{fma}\left(\color{blue}{1}, \tan y + \tan z, x - \tan a\right) \]
            6. Step-by-step derivation
              1. Applied rewrites79.1%

                \[\leadsto \mathsf{fma}\left(\color{blue}{1}, \tan y + \tan z, x - \tan a\right) \]
              2. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto \color{blue}{1 \cdot \left(\tan y + \tan z\right) + \left(x - \tan a\right)} \]
                2. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(x - \tan a\right) + 1 \cdot \left(\tan y + \tan z\right)} \]
                3. lift--.f64N/A

                  \[\leadsto \color{blue}{\left(x - \tan a\right)} + 1 \cdot \left(\tan y + \tan z\right) \]
                4. associate-+l-N/A

                  \[\leadsto \color{blue}{x - \left(\tan a - 1 \cdot \left(\tan y + \tan z\right)\right)} \]
                5. lower--.f64N/A

                  \[\leadsto \color{blue}{x - \left(\tan a - 1 \cdot \left(\tan y + \tan z\right)\right)} \]
                6. lower--.f64N/A

                  \[\leadsto x - \color{blue}{\left(\tan a - 1 \cdot \left(\tan y + \tan z\right)\right)} \]
                7. *-commutativeN/A

                  \[\leadsto x - \left(\tan a - \color{blue}{\left(\tan y + \tan z\right) \cdot 1}\right) \]
                8. lower-*.f6479.2

                  \[\leadsto x - \left(\tan a - \color{blue}{\left(\tan y + \tan z\right) \cdot 1}\right) \]
              3. Applied rewrites79.2%

                \[\leadsto \color{blue}{x - \left(\tan a - \left(\tan y + \tan z\right) \cdot 1\right)} \]
              4. Final simplification79.2%

                \[\leadsto x + \left(\left(\tan y + \tan z\right) \cdot 1 - \tan a\right) \]
              5. Add Preprocessing

              Alternative 8: 79.4% accurate, 0.7× speedup?

              \[\begin{array}{l} \\ \mathsf{fma}\left(\tan y + \tan z, 1, x\right) - \tan a \end{array} \]
              (FPCore (x y z a)
               :precision binary64
               (- (fma (+ (tan y) (tan z)) 1.0 x) (tan a)))
              double code(double x, double y, double z, double a) {
              	return fma((tan(y) + tan(z)), 1.0, x) - tan(a);
              }
              
              function code(x, y, z, a)
              	return Float64(fma(Float64(tan(y) + tan(z)), 1.0, x) - tan(a))
              end
              
              code[x_, y_, z_, a_] := N[(N[(N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision] * 1.0 + x), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              \mathsf{fma}\left(\tan y + \tan z, 1, x\right) - \tan a
              \end{array}
              
              Derivation
              1. Initial program 78.9%

                \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-+.f64N/A

                  \[\leadsto \color{blue}{x + \left(\tan \left(y + z\right) - \tan a\right)} \]
                2. lift--.f64N/A

                  \[\leadsto x + \color{blue}{\left(\tan \left(y + z\right) - \tan a\right)} \]
                3. associate-+r-N/A

                  \[\leadsto \color{blue}{\left(x + \tan \left(y + z\right)\right) - \tan a} \]
                4. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(\tan \left(y + z\right) + x\right)} - \tan a \]
                5. associate--l+N/A

                  \[\leadsto \color{blue}{\tan \left(y + z\right) + \left(x - \tan a\right)} \]
                6. lift-tan.f64N/A

                  \[\leadsto \color{blue}{\tan \left(y + z\right)} + \left(x - \tan a\right) \]
                7. lift-+.f64N/A

                  \[\leadsto \tan \color{blue}{\left(y + z\right)} + \left(x - \tan a\right) \]
                8. tan-sumN/A

                  \[\leadsto \color{blue}{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}} + \left(x - \tan a\right) \]
                9. clear-numN/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{1 - \tan y \cdot \tan z}{\tan y + \tan z}}} + \left(x - \tan a\right) \]
                10. associate-/r/N/A

                  \[\leadsto \color{blue}{\frac{1}{1 - \tan y \cdot \tan z} \cdot \left(\tan y + \tan z\right)} + \left(x - \tan a\right) \]
                11. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \tan z, x - \tan a\right)} \]
                12. lower-/.f64N/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{1 - \tan y \cdot \tan z}}, \tan y + \tan z, x - \tan a\right) \]
                13. lower--.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{1 - \tan y \cdot \tan z}}, \tan y + \tan z, x - \tan a\right) \]
                14. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \color{blue}{\tan y \cdot \tan z}}, \tan y + \tan z, x - \tan a\right) \]
                15. lower-tan.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \color{blue}{\tan y} \cdot \tan z}, \tan y + \tan z, x - \tan a\right) \]
                16. lower-tan.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \color{blue}{\tan z}}, \tan y + \tan z, x - \tan a\right) \]
                17. lower-+.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \color{blue}{\tan y + \tan z}, x - \tan a\right) \]
                18. lower-tan.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \color{blue}{\tan y} + \tan z, x - \tan a\right) \]
                19. lower-tan.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \color{blue}{\tan z}, x - \tan a\right) \]
                20. lower--.f6499.6

                  \[\leadsto \mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \tan z, \color{blue}{x - \tan a}\right) \]
              4. Applied rewrites99.6%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1 - \tan y \cdot \tan z}, \tan y + \tan z, x - \tan a\right)} \]
              5. Taylor expanded in y around 0

                \[\leadsto \mathsf{fma}\left(\color{blue}{1}, \tan y + \tan z, x - \tan a\right) \]
              6. Step-by-step derivation
                1. Applied rewrites79.1%

                  \[\leadsto \mathsf{fma}\left(\color{blue}{1}, \tan y + \tan z, x - \tan a\right) \]
                2. Step-by-step derivation
                  1. lift-fma.f64N/A

                    \[\leadsto \color{blue}{1 \cdot \left(\tan y + \tan z\right) + \left(x - \tan a\right)} \]
                  2. lift--.f64N/A

                    \[\leadsto 1 \cdot \left(\tan y + \tan z\right) + \color{blue}{\left(x - \tan a\right)} \]
                  3. associate-+r-N/A

                    \[\leadsto \color{blue}{\left(1 \cdot \left(\tan y + \tan z\right) + x\right) - \tan a} \]
                  4. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(1 \cdot \left(\tan y + \tan z\right) + x\right) - \tan a} \]
                  5. *-commutativeN/A

                    \[\leadsto \left(\color{blue}{\left(\tan y + \tan z\right) \cdot 1} + x\right) - \tan a \]
                  6. lower-fma.f6479.1

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\tan y + \tan z, 1, x\right)} - \tan a \]
                3. Applied rewrites79.1%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\tan y + \tan z, 1, x\right) - \tan a} \]
                4. Add Preprocessing

                Alternative 9: 59.5% accurate, 1.0× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y + z \leq -1 \cdot 10^{-11}:\\ \;\;\;\;x + \tan \left(y + z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\tan z - \tan a\right)\\ \end{array} \end{array} \]
                (FPCore (x y z a)
                 :precision binary64
                 (if (<= (+ y z) -1e-11) (+ x (tan (+ y z))) (+ x (- (tan z) (tan a)))))
                double code(double x, double y, double z, double a) {
                	double tmp;
                	if ((y + z) <= -1e-11) {
                		tmp = x + tan((y + z));
                	} else {
                		tmp = x + (tan(z) - tan(a));
                	}
                	return tmp;
                }
                
                real(8) function code(x, y, z, a)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: a
                    real(8) :: tmp
                    if ((y + z) <= (-1d-11)) then
                        tmp = x + tan((y + z))
                    else
                        tmp = x + (tan(z) - tan(a))
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double a) {
                	double tmp;
                	if ((y + z) <= -1e-11) {
                		tmp = x + Math.tan((y + z));
                	} else {
                		tmp = x + (Math.tan(z) - Math.tan(a));
                	}
                	return tmp;
                }
                
                def code(x, y, z, a):
                	tmp = 0
                	if (y + z) <= -1e-11:
                		tmp = x + math.tan((y + z))
                	else:
                		tmp = x + (math.tan(z) - math.tan(a))
                	return tmp
                
                function code(x, y, z, a)
                	tmp = 0.0
                	if (Float64(y + z) <= -1e-11)
                		tmp = Float64(x + tan(Float64(y + z)));
                	else
                		tmp = Float64(x + Float64(tan(z) - tan(a)));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, a)
                	tmp = 0.0;
                	if ((y + z) <= -1e-11)
                		tmp = x + tan((y + z));
                	else
                		tmp = x + (tan(z) - tan(a));
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, a_] := If[LessEqual[N[(y + z), $MachinePrecision], -1e-11], N[(x + N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x + N[(N[Tan[z], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y + z \leq -1 \cdot 10^{-11}:\\
                \;\;\;\;x + \tan \left(y + z\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;x + \left(\tan z - \tan a\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (+.f64 y z) < -9.99999999999999939e-12

                  1. Initial program 73.0%

                    \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-+.f64N/A

                      \[\leadsto x + \left(\tan \color{blue}{\left(y + z\right)} - \tan a\right) \]
                    2. flip-+N/A

                      \[\leadsto x + \left(\tan \color{blue}{\left(\frac{y \cdot y - z \cdot z}{y - z}\right)} - \tan a\right) \]
                    3. clear-numN/A

                      \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
                    4. lower-/.f64N/A

                      \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
                    5. clear-numN/A

                      \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{\frac{y \cdot y - z \cdot z}{y - z}}}}\right) - \tan a\right) \]
                    6. flip-+N/A

                      \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
                    7. lift-+.f64N/A

                      \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
                    8. lower-/.f6461.5

                      \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{y + z}}}\right) - \tan a\right) \]
                  4. Applied rewrites61.5%

                    \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{1}{y + z}}\right)} - \tan a\right) \]
                  5. Taylor expanded in a around 0

                    \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
                  6. Step-by-step derivation
                    1. lower-/.f64N/A

                      \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
                    2. lower-sin.f64N/A

                      \[\leadsto x + \frac{\color{blue}{\sin \left(y + z\right)}}{\cos \left(y + z\right)} \]
                    3. lower-+.f64N/A

                      \[\leadsto x + \frac{\sin \color{blue}{\left(y + z\right)}}{\cos \left(y + z\right)} \]
                    4. lower-cos.f64N/A

                      \[\leadsto x + \frac{\sin \left(y + z\right)}{\color{blue}{\cos \left(y + z\right)}} \]
                    5. lower-+.f6445.3

                      \[\leadsto x + \frac{\sin \left(y + z\right)}{\cos \color{blue}{\left(y + z\right)}} \]
                  7. Applied rewrites45.3%

                    \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
                  8. Step-by-step derivation
                    1. lift-+.f64N/A

                      \[\leadsto \color{blue}{x + \frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
                    2. +-commutativeN/A

                      \[\leadsto \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)} + x} \]
                    3. lower-+.f6445.3

                      \[\leadsto \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)} + x} \]
                  9. Applied rewrites45.3%

                    \[\leadsto \color{blue}{\tan \left(y + z\right) + x} \]

                  if -9.99999999999999939e-12 < (+.f64 y z)

                  1. Initial program 82.2%

                    \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in y around 0

                    \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
                  4. Step-by-step derivation
                    1. lower-/.f64N/A

                      \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
                    2. lower-sin.f64N/A

                      \[\leadsto x + \left(\frac{\color{blue}{\sin z}}{\cos z} - \tan a\right) \]
                    3. lower-cos.f6464.0

                      \[\leadsto x + \left(\frac{\sin z}{\color{blue}{\cos z}} - \tan a\right) \]
                  5. Applied rewrites64.0%

                    \[\leadsto x + \left(\color{blue}{\frac{\sin z}{\cos z}} - \tan a\right) \]
                  6. Step-by-step derivation
                    1. lift-+.f64N/A

                      \[\leadsto \color{blue}{x + \left(\frac{\sin z}{\cos z} - \tan a\right)} \]
                    2. +-commutativeN/A

                      \[\leadsto \color{blue}{\left(\frac{\sin z}{\cos z} - \tan a\right) + x} \]
                    3. lower-+.f6464.0

                      \[\leadsto \color{blue}{\left(\frac{\sin z}{\cos z} - \tan a\right) + x} \]
                  7. Applied rewrites64.0%

                    \[\leadsto \color{blue}{\left(\tan z - \tan a\right) + x} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification57.4%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y + z \leq -1 \cdot 10^{-11}:\\ \;\;\;\;x + \tan \left(y + z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\tan z - \tan a\right)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 10: 79.1% accurate, 1.0× speedup?

                \[\begin{array}{l} \\ x + \left(\tan \left(y + z\right) - \tan a\right) \end{array} \]
                (FPCore (x y z a) :precision binary64 (+ x (- (tan (+ y z)) (tan a))))
                double code(double x, double y, double z, double a) {
                	return x + (tan((y + z)) - tan(a));
                }
                
                real(8) function code(x, y, z, a)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: a
                    code = x + (tan((y + z)) - tan(a))
                end function
                
                public static double code(double x, double y, double z, double a) {
                	return x + (Math.tan((y + z)) - Math.tan(a));
                }
                
                def code(x, y, z, a):
                	return x + (math.tan((y + z)) - math.tan(a))
                
                function code(x, y, z, a)
                	return Float64(x + Float64(tan(Float64(y + z)) - tan(a)))
                end
                
                function tmp = code(x, y, z, a)
                	tmp = x + (tan((y + z)) - tan(a));
                end
                
                code[x_, y_, z_, a_] := N[(x + N[(N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                x + \left(\tan \left(y + z\right) - \tan a\right)
                \end{array}
                
                Derivation
                1. Initial program 78.9%

                  \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
                2. Add Preprocessing
                3. Add Preprocessing

                Alternative 11: 50.2% accurate, 2.0× speedup?

                \[\begin{array}{l} \\ x + \tan \left(y + z\right) \end{array} \]
                (FPCore (x y z a) :precision binary64 (+ x (tan (+ y z))))
                double code(double x, double y, double z, double a) {
                	return x + tan((y + z));
                }
                
                real(8) function code(x, y, z, a)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: a
                    code = x + tan((y + z))
                end function
                
                public static double code(double x, double y, double z, double a) {
                	return x + Math.tan((y + z));
                }
                
                def code(x, y, z, a):
                	return x + math.tan((y + z))
                
                function code(x, y, z, a)
                	return Float64(x + tan(Float64(y + z)))
                end
                
                function tmp = code(x, y, z, a)
                	tmp = x + tan((y + z));
                end
                
                code[x_, y_, z_, a_] := N[(x + N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                x + \tan \left(y + z\right)
                \end{array}
                
                Derivation
                1. Initial program 78.9%

                  \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-+.f64N/A

                    \[\leadsto x + \left(\tan \color{blue}{\left(y + z\right)} - \tan a\right) \]
                  2. flip-+N/A

                    \[\leadsto x + \left(\tan \color{blue}{\left(\frac{y \cdot y - z \cdot z}{y - z}\right)} - \tan a\right) \]
                  3. clear-numN/A

                    \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
                  4. lower-/.f64N/A

                    \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{y - z}{y \cdot y - z \cdot z}}\right)} - \tan a\right) \]
                  5. clear-numN/A

                    \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{\frac{y \cdot y - z \cdot z}{y - z}}}}\right) - \tan a\right) \]
                  6. flip-+N/A

                    \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
                  7. lift-+.f64N/A

                    \[\leadsto x + \left(\tan \left(\frac{1}{\frac{1}{\color{blue}{y + z}}}\right) - \tan a\right) \]
                  8. lower-/.f6472.0

                    \[\leadsto x + \left(\tan \left(\frac{1}{\color{blue}{\frac{1}{y + z}}}\right) - \tan a\right) \]
                4. Applied rewrites72.0%

                  \[\leadsto x + \left(\tan \color{blue}{\left(\frac{1}{\frac{1}{y + z}}\right)} - \tan a\right) \]
                5. Taylor expanded in a around 0

                  \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
                6. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
                  2. lower-sin.f64N/A

                    \[\leadsto x + \frac{\color{blue}{\sin \left(y + z\right)}}{\cos \left(y + z\right)} \]
                  3. lower-+.f64N/A

                    \[\leadsto x + \frac{\sin \color{blue}{\left(y + z\right)}}{\cos \left(y + z\right)} \]
                  4. lower-cos.f64N/A

                    \[\leadsto x + \frac{\sin \left(y + z\right)}{\color{blue}{\cos \left(y + z\right)}} \]
                  5. lower-+.f6451.5

                    \[\leadsto x + \frac{\sin \left(y + z\right)}{\cos \color{blue}{\left(y + z\right)}} \]
                7. Applied rewrites51.5%

                  \[\leadsto x + \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
                8. Step-by-step derivation
                  1. lift-+.f64N/A

                    \[\leadsto \color{blue}{x + \frac{\sin \left(y + z\right)}{\cos \left(y + z\right)}} \]
                  2. +-commutativeN/A

                    \[\leadsto \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)} + x} \]
                  3. lower-+.f6451.5

                    \[\leadsto \color{blue}{\frac{\sin \left(y + z\right)}{\cos \left(y + z\right)} + x} \]
                9. Applied rewrites51.5%

                  \[\leadsto \color{blue}{\tan \left(y + z\right) + x} \]
                10. Final simplification51.5%

                  \[\leadsto x + \tan \left(y + z\right) \]
                11. Add Preprocessing

                Alternative 12: 31.7% accurate, 9.1× speedup?

                \[\begin{array}{l} \\ \frac{1}{\frac{1}{x}} \end{array} \]
                (FPCore (x y z a) :precision binary64 (/ 1.0 (/ 1.0 x)))
                double code(double x, double y, double z, double a) {
                	return 1.0 / (1.0 / x);
                }
                
                real(8) function code(x, y, z, a)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: a
                    code = 1.0d0 / (1.0d0 / x)
                end function
                
                public static double code(double x, double y, double z, double a) {
                	return 1.0 / (1.0 / x);
                }
                
                def code(x, y, z, a):
                	return 1.0 / (1.0 / x)
                
                function code(x, y, z, a)
                	return Float64(1.0 / Float64(1.0 / x))
                end
                
                function tmp = code(x, y, z, a)
                	tmp = 1.0 / (1.0 / x);
                end
                
                code[x_, y_, z_, a_] := N[(1.0 / N[(1.0 / x), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \frac{1}{\frac{1}{x}}
                \end{array}
                
                Derivation
                1. Initial program 78.9%

                  \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-+.f64N/A

                    \[\leadsto \color{blue}{x + \left(\tan \left(y + z\right) - \tan a\right)} \]
                  2. flip3-+N/A

                    \[\leadsto \color{blue}{\frac{{x}^{3} + {\left(\tan \left(y + z\right) - \tan a\right)}^{3}}{x \cdot x + \left(\left(\tan \left(y + z\right) - \tan a\right) \cdot \left(\tan \left(y + z\right) - \tan a\right) - x \cdot \left(\tan \left(y + z\right) - \tan a\right)\right)}} \]
                  3. clear-numN/A

                    \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot x + \left(\left(\tan \left(y + z\right) - \tan a\right) \cdot \left(\tan \left(y + z\right) - \tan a\right) - x \cdot \left(\tan \left(y + z\right) - \tan a\right)\right)}{{x}^{3} + {\left(\tan \left(y + z\right) - \tan a\right)}^{3}}}} \]
                  4. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot x + \left(\left(\tan \left(y + z\right) - \tan a\right) \cdot \left(\tan \left(y + z\right) - \tan a\right) - x \cdot \left(\tan \left(y + z\right) - \tan a\right)\right)}{{x}^{3} + {\left(\tan \left(y + z\right) - \tan a\right)}^{3}}}} \]
                  5. clear-numN/A

                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{{x}^{3} + {\left(\tan \left(y + z\right) - \tan a\right)}^{3}}{x \cdot x + \left(\left(\tan \left(y + z\right) - \tan a\right) \cdot \left(\tan \left(y + z\right) - \tan a\right) - x \cdot \left(\tan \left(y + z\right) - \tan a\right)\right)}}}} \]
                  6. flip3-+N/A

                    \[\leadsto \frac{1}{\frac{1}{\color{blue}{x + \left(\tan \left(y + z\right) - \tan a\right)}}} \]
                  7. lift-+.f64N/A

                    \[\leadsto \frac{1}{\frac{1}{\color{blue}{x + \left(\tan \left(y + z\right) - \tan a\right)}}} \]
                  8. lower-/.f6478.8

                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{x + \left(\tan \left(y + z\right) - \tan a\right)}}} \]
                4. Applied rewrites78.7%

                  \[\leadsto \color{blue}{\frac{1}{\frac{1}{\tan \left(y + z\right) + \left(x - \tan a\right)}}} \]
                5. Taylor expanded in x around inf

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{x}}} \]
                6. Step-by-step derivation
                  1. lower-/.f6432.7

                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{x}}} \]
                7. Applied rewrites32.7%

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{x}}} \]
                8. Add Preprocessing

                Alternative 13: 2.7% accurate, 9.1× speedup?

                \[\begin{array}{l} \\ \frac{1}{\frac{-1}{x}} \end{array} \]
                (FPCore (x y z a) :precision binary64 (/ 1.0 (/ -1.0 x)))
                double code(double x, double y, double z, double a) {
                	return 1.0 / (-1.0 / x);
                }
                
                real(8) function code(x, y, z, a)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: a
                    code = 1.0d0 / ((-1.0d0) / x)
                end function
                
                public static double code(double x, double y, double z, double a) {
                	return 1.0 / (-1.0 / x);
                }
                
                def code(x, y, z, a):
                	return 1.0 / (-1.0 / x)
                
                function code(x, y, z, a)
                	return Float64(1.0 / Float64(-1.0 / x))
                end
                
                function tmp = code(x, y, z, a)
                	tmp = 1.0 / (-1.0 / x);
                end
                
                code[x_, y_, z_, a_] := N[(1.0 / N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \frac{1}{\frac{-1}{x}}
                \end{array}
                
                Derivation
                1. Initial program 78.9%

                  \[x + \left(\tan \left(y + z\right) - \tan a\right) \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-+.f64N/A

                    \[\leadsto \color{blue}{x + \left(\tan \left(y + z\right) - \tan a\right)} \]
                  2. flip3-+N/A

                    \[\leadsto \color{blue}{\frac{{x}^{3} + {\left(\tan \left(y + z\right) - \tan a\right)}^{3}}{x \cdot x + \left(\left(\tan \left(y + z\right) - \tan a\right) \cdot \left(\tan \left(y + z\right) - \tan a\right) - x \cdot \left(\tan \left(y + z\right) - \tan a\right)\right)}} \]
                  3. clear-numN/A

                    \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot x + \left(\left(\tan \left(y + z\right) - \tan a\right) \cdot \left(\tan \left(y + z\right) - \tan a\right) - x \cdot \left(\tan \left(y + z\right) - \tan a\right)\right)}{{x}^{3} + {\left(\tan \left(y + z\right) - \tan a\right)}^{3}}}} \]
                  4. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot x + \left(\left(\tan \left(y + z\right) - \tan a\right) \cdot \left(\tan \left(y + z\right) - \tan a\right) - x \cdot \left(\tan \left(y + z\right) - \tan a\right)\right)}{{x}^{3} + {\left(\tan \left(y + z\right) - \tan a\right)}^{3}}}} \]
                  5. clear-numN/A

                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{{x}^{3} + {\left(\tan \left(y + z\right) - \tan a\right)}^{3}}{x \cdot x + \left(\left(\tan \left(y + z\right) - \tan a\right) \cdot \left(\tan \left(y + z\right) - \tan a\right) - x \cdot \left(\tan \left(y + z\right) - \tan a\right)\right)}}}} \]
                  6. flip3-+N/A

                    \[\leadsto \frac{1}{\frac{1}{\color{blue}{x + \left(\tan \left(y + z\right) - \tan a\right)}}} \]
                  7. lift-+.f64N/A

                    \[\leadsto \frac{1}{\frac{1}{\color{blue}{x + \left(\tan \left(y + z\right) - \tan a\right)}}} \]
                  8. lower-/.f6478.8

                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{x + \left(\tan \left(y + z\right) - \tan a\right)}}} \]
                4. Applied rewrites78.7%

                  \[\leadsto \color{blue}{\frac{1}{\frac{1}{\tan \left(y + z\right) + \left(x - \tan a\right)}}} \]
                5. Taylor expanded in x around inf

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{x}}} \]
                6. Step-by-step derivation
                  1. lower-/.f6432.7

                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{x}}} \]
                7. Applied rewrites32.7%

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{x}}} \]
                8. Step-by-step derivation
                  1. Applied rewrites32.7%

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

                    \[\leadsto \frac{1}{\frac{-1}{\color{blue}{x}}} \]
                  3. Step-by-step derivation
                    1. Applied rewrites2.5%

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

                    Reproduce

                    ?
                    herbie shell --seed 2024233 
                    (FPCore (x y z a)
                      :name "tan-example (used to crash)"
                      :precision binary64
                      :pre (and (and (and (or (== x 0.0) (and (<= 0.5884142 x) (<= x 505.5909))) (or (and (<= -1.796658e+308 y) (<= y -9.425585e-310)) (and (<= 1.284938e-309 y) (<= y 1.751224e+308)))) (or (and (<= -1.776707e+308 z) (<= z -8.599796e-310)) (and (<= 3.293145e-311 z) (<= z 1.725154e+308)))) (or (and (<= -1.796658e+308 a) (<= a -9.425585e-310)) (and (<= 1.284938e-309 a) (<= a 1.751224e+308))))
                      (+ x (- (tan (+ y z)) (tan a))))