tan-example (used to crash)

Percentage Accurate: 79.5% → 99.7%
Time: 50.1s
Alternatives: 21
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 21 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.5% 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.3× speedup?

\[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ x + \left(\frac{1}{1 - \frac{\tan z \cdot \sin y}{\cos y}} \cdot \left(\tan z + \tan y\right) - \tan a\right) \end{array} \]
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
(FPCore (x y z a)
 :precision binary64
 (+
  x
  (-
   (* (/ 1.0 (- 1.0 (/ (* (tan z) (sin y)) (cos y)))) (+ (tan z) (tan y)))
   (tan a))))
assert(x < y && y < z && z < a);
double code(double x, double y, double z, double a) {
	return x + (((1.0 / (1.0 - ((tan(z) * sin(y)) / cos(y)))) * (tan(z) + tan(y))) - tan(a));
}
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
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 + (((1.0d0 / (1.0d0 - ((tan(z) * sin(y)) / cos(y)))) * (tan(z) + tan(y))) - tan(a))
end function
assert x < y && y < z && z < a;
public static double code(double x, double y, double z, double a) {
	return x + (((1.0 / (1.0 - ((Math.tan(z) * Math.sin(y)) / Math.cos(y)))) * (Math.tan(z) + Math.tan(y))) - Math.tan(a));
}
[x, y, z, a] = sort([x, y, z, a])
def code(x, y, z, a):
	return x + (((1.0 / (1.0 - ((math.tan(z) * math.sin(y)) / math.cos(y)))) * (math.tan(z) + math.tan(y))) - math.tan(a))
x, y, z, a = sort([x, y, z, a])
function code(x, y, z, a)
	return Float64(x + Float64(Float64(Float64(1.0 / Float64(1.0 - Float64(Float64(tan(z) * sin(y)) / cos(y)))) * Float64(tan(z) + tan(y))) - tan(a)))
end
x, y, z, a = num2cell(sort([x, y, z, a])){:}
function tmp = code(x, y, z, a)
	tmp = x + (((1.0 / (1.0 - ((tan(z) * sin(y)) / cos(y)))) * (tan(z) + tan(y))) - tan(a));
end
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, a_] := N[(x + N[(N[(N[(1.0 / N[(1.0 - N[(N[(N[Tan[z], $MachinePrecision] * N[Sin[y], $MachinePrecision]), $MachinePrecision] / N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
\\
x + \left(\frac{1}{1 - \frac{\tan z \cdot \sin y}{\cos y}} \cdot \left(\tan z + \tan y\right) - \tan a\right)
\end{array}
Derivation
  1. Initial program 80.7%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    8. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    9. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    10. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    11. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    12. tan-lowering-tan.f6499.7%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
  4. Applied egg-rr99.7%

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    2. tan-quotN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    3. associate-*r/N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    6. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    7. sin-lowering-sin.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    8. cos-lowering-cos.f6499.8%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
  6. Applied egg-rr99.8%

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

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

Alternative 2: 99.7% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} - \tan a\right) \end{array} \]
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
(FPCore (x y z a)
 :precision binary64
 (+
  x
  (-
   (* (+ (tan z) (tan y)) (/ 1.0 (+ 1.0 (/ 1.0 (/ (/ -1.0 (tan y)) (tan z))))))
   (tan a))))
assert(x < y && y < z && z < a);
double code(double x, double y, double z, double a) {
	return x + (((tan(z) + tan(y)) * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) - tan(a));
}
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
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(z) + tan(y)) * (1.0d0 / (1.0d0 + (1.0d0 / (((-1.0d0) / tan(y)) / tan(z)))))) - tan(a))
end function
assert x < y && y < z && z < a;
public static double code(double x, double y, double z, double a) {
	return x + (((Math.tan(z) + Math.tan(y)) * (1.0 / (1.0 + (1.0 / ((-1.0 / Math.tan(y)) / Math.tan(z)))))) - Math.tan(a));
}
[x, y, z, a] = sort([x, y, z, a])
def code(x, y, z, a):
	return x + (((math.tan(z) + math.tan(y)) * (1.0 / (1.0 + (1.0 / ((-1.0 / math.tan(y)) / math.tan(z)))))) - math.tan(a))
x, y, z, a = sort([x, y, z, a])
function code(x, y, z, a)
	return Float64(x + Float64(Float64(Float64(tan(z) + tan(y)) * Float64(1.0 / Float64(1.0 + Float64(1.0 / Float64(Float64(-1.0 / tan(y)) / tan(z)))))) - tan(a)))
end
x, y, z, a = num2cell(sort([x, y, z, a])){:}
function tmp = code(x, y, z, a)
	tmp = x + (((tan(z) + tan(y)) * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) - tan(a));
end
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, a_] := N[(x + N[(N[(N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(1.0 + N[(1.0 / N[(N[(-1.0 / N[Tan[y], $MachinePrecision]), $MachinePrecision] / N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
\\
x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} - \tan a\right)
\end{array}
Derivation
  1. Initial program 80.7%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    8. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    9. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    10. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    11. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    12. tan-lowering-tan.f6499.7%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
  4. Applied egg-rr99.7%

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    2. tan-quotN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    3. associate-*r/N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    6. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    7. sin-lowering-sin.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    8. cos-lowering-cos.f6499.8%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
  6. Applied egg-rr99.8%

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

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\tan z \cdot \sin y}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\sin y \cdot \tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    4. associate-/r*N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\frac{\cos y}{\sin y}}{\tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\cos y}{\sin y}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    6. clear-numN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{\frac{\sin y}{\cos y}}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    7. tan-quotN/A

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \tan y\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    9. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    10. tan-lowering-tan.f6499.8%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
  8. Applied egg-rr99.8%

    \[\leadsto x + \left(\frac{1}{1 - \color{blue}{\frac{1}{\frac{\frac{1}{\tan y}}{\tan z}}}} \cdot \left(\tan y + \tan z\right) - \tan a\right) \]
  9. Final simplification99.8%

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

Alternative 3: 99.7% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 - \tan z \cdot \tan y} - \tan a\right) \end{array} \]
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
(FPCore (x y z a)
 :precision binary64
 (+ x (- (* (+ (tan z) (tan y)) (/ 1.0 (- 1.0 (* (tan z) (tan y))))) (tan a))))
assert(x < y && y < z && z < a);
double code(double x, double y, double z, double a) {
	return x + (((tan(z) + tan(y)) * (1.0 / (1.0 - (tan(z) * tan(y))))) - tan(a));
}
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
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(z) + tan(y)) * (1.0d0 / (1.0d0 - (tan(z) * tan(y))))) - tan(a))
end function
assert x < y && y < z && z < a;
public static double code(double x, double y, double z, double a) {
	return x + (((Math.tan(z) + Math.tan(y)) * (1.0 / (1.0 - (Math.tan(z) * Math.tan(y))))) - Math.tan(a));
}
[x, y, z, a] = sort([x, y, z, a])
def code(x, y, z, a):
	return x + (((math.tan(z) + math.tan(y)) * (1.0 / (1.0 - (math.tan(z) * math.tan(y))))) - math.tan(a))
x, y, z, a = sort([x, y, z, a])
function code(x, y, z, a)
	return Float64(x + Float64(Float64(Float64(tan(z) + tan(y)) * Float64(1.0 / Float64(1.0 - Float64(tan(z) * tan(y))))) - tan(a)))
end
x, y, z, a = num2cell(sort([x, y, z, a])){:}
function tmp = code(x, y, z, a)
	tmp = x + (((tan(z) + tan(y)) * (1.0 / (1.0 - (tan(z) * tan(y))))) - tan(a));
end
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, a_] := N[(x + N[(N[(N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(1.0 - N[(N[Tan[z], $MachinePrecision] * N[Tan[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
\\
x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 - \tan z \cdot \tan y} - \tan a\right)
\end{array}
Derivation
  1. Initial program 80.7%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    8. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    9. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    10. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    11. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    12. tan-lowering-tan.f6499.7%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
  4. Applied egg-rr99.7%

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

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

Alternative 4: 99.7% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ x + \left(\frac{\tan z + \tan y}{1 - \tan z \cdot \tan y} - \tan a\right) \end{array} \]
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
(FPCore (x y z a)
 :precision binary64
 (+ x (- (/ (+ (tan z) (tan y)) (- 1.0 (* (tan z) (tan y)))) (tan a))))
assert(x < y && y < z && z < a);
double code(double x, double y, double z, double a) {
	return x + (((tan(z) + tan(y)) / (1.0 - (tan(z) * tan(y)))) - tan(a));
}
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
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(z) + tan(y)) / (1.0d0 - (tan(z) * tan(y)))) - tan(a))
end function
assert x < y && y < z && z < a;
public static double code(double x, double y, double z, double a) {
	return x + (((Math.tan(z) + Math.tan(y)) / (1.0 - (Math.tan(z) * Math.tan(y)))) - Math.tan(a));
}
[x, y, z, a] = sort([x, y, z, a])
def code(x, y, z, a):
	return x + (((math.tan(z) + math.tan(y)) / (1.0 - (math.tan(z) * math.tan(y)))) - math.tan(a))
x, y, z, a = sort([x, y, z, a])
function code(x, y, z, a)
	return Float64(x + Float64(Float64(Float64(tan(z) + tan(y)) / Float64(1.0 - Float64(tan(z) * tan(y)))) - tan(a)))
end
x, y, z, a = num2cell(sort([x, y, z, a])){:}
function tmp = code(x, y, z, a)
	tmp = x + (((tan(z) + tan(y)) / (1.0 - (tan(z) * tan(y)))) - tan(a));
end
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, a_] := N[(x + N[(N[(N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(N[Tan[z], $MachinePrecision] * N[Tan[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
\\
x + \left(\frac{\tan z + \tan y}{1 - \tan z \cdot \tan y} - \tan a\right)
\end{array}
Derivation
  1. Initial program 80.7%

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

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

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\tan y, \tan z\right), \left(1 - \tan y \cdot \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    4. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right), \left(1 - \tan y \cdot \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    5. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right), \left(1 - \tan y \cdot \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    6. --lowering--.f64N/A

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    8. tan-lowering-tan.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    9. tan-lowering-tan.f6499.7%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
  4. Applied egg-rr99.7%

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

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

Alternative 5: 89.7% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} t_0 := \tan z + \tan y\\ \mathbf{if}\;a \leq -0.1:\\ \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} + a \cdot \left(-1 - \left(a \cdot a\right) \cdot \left(0.3333333333333333 + \left(a \cdot a\right) \cdot \left(0.13333333333333333 + \left(a \cdot a\right) \cdot 0.05396825396825397\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t\_0 - \tan a\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
(FPCore (x y z a)
 :precision binary64
 (let* ((t_0 (+ (tan z) (tan y))))
   (if (<= a -0.1)
     (+
      x
      (-
       (*
        t_0
        (/
         1.0
         (+
          1.0
          (/ 1.0 (/ (/ (- -1.0 (* -0.3333333333333333 (* y y))) y) (tan z))))))
       (tan a)))
     (if (<= a 0.44)
       (+
        x
        (+
         (* t_0 (/ 1.0 (+ 1.0 (/ 1.0 (/ (/ -1.0 (tan y)) (tan z))))))
         (*
          a
          (-
           -1.0
           (*
            (* a a)
            (+
             0.3333333333333333
             (*
              (* a a)
              (+ 0.13333333333333333 (* (* a a) 0.05396825396825397)))))))))
       (+ x (- t_0 (tan a)))))))
assert(x < y && y < z && z < a);
double code(double x, double y, double z, double a) {
	double t_0 = tan(z) + tan(y);
	double tmp;
	if (a <= -0.1) {
		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / tan(z)))))) - tan(a));
	} else if (a <= 0.44) {
		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) + (a * (-1.0 - ((a * a) * (0.3333333333333333 + ((a * a) * (0.13333333333333333 + ((a * a) * 0.05396825396825397))))))));
	} else {
		tmp = x + (t_0 - tan(a));
	}
	return tmp;
}
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
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(z) + tan(y)
    if (a <= (-0.1d0)) then
        tmp = x + ((t_0 * (1.0d0 / (1.0d0 + (1.0d0 / ((((-1.0d0) - ((-0.3333333333333333d0) * (y * y))) / y) / tan(z)))))) - tan(a))
    else if (a <= 0.44d0) then
        tmp = x + ((t_0 * (1.0d0 / (1.0d0 + (1.0d0 / (((-1.0d0) / tan(y)) / tan(z)))))) + (a * ((-1.0d0) - ((a * a) * (0.3333333333333333d0 + ((a * a) * (0.13333333333333333d0 + ((a * a) * 0.05396825396825397d0))))))))
    else
        tmp = x + (t_0 - tan(a))
    end if
    code = tmp
end function
assert x < y && y < z && z < a;
public static double code(double x, double y, double z, double a) {
	double t_0 = Math.tan(z) + Math.tan(y);
	double tmp;
	if (a <= -0.1) {
		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / Math.tan(z)))))) - Math.tan(a));
	} else if (a <= 0.44) {
		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / Math.tan(y)) / Math.tan(z)))))) + (a * (-1.0 - ((a * a) * (0.3333333333333333 + ((a * a) * (0.13333333333333333 + ((a * a) * 0.05396825396825397))))))));
	} else {
		tmp = x + (t_0 - Math.tan(a));
	}
	return tmp;
}
[x, y, z, a] = sort([x, y, z, a])
def code(x, y, z, a):
	t_0 = math.tan(z) + math.tan(y)
	tmp = 0
	if a <= -0.1:
		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / math.tan(z)))))) - math.tan(a))
	elif a <= 0.44:
		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / math.tan(y)) / math.tan(z)))))) + (a * (-1.0 - ((a * a) * (0.3333333333333333 + ((a * a) * (0.13333333333333333 + ((a * a) * 0.05396825396825397))))))))
	else:
		tmp = x + (t_0 - math.tan(a))
	return tmp
x, y, z, a = sort([x, y, z, a])
function code(x, y, z, a)
	t_0 = Float64(tan(z) + tan(y))
	tmp = 0.0
	if (a <= -0.1)
		tmp = Float64(x + Float64(Float64(t_0 * Float64(1.0 / Float64(1.0 + Float64(1.0 / Float64(Float64(Float64(-1.0 - Float64(-0.3333333333333333 * Float64(y * y))) / y) / tan(z)))))) - tan(a)));
	elseif (a <= 0.44)
		tmp = Float64(x + Float64(Float64(t_0 * Float64(1.0 / Float64(1.0 + Float64(1.0 / Float64(Float64(-1.0 / tan(y)) / tan(z)))))) + Float64(a * Float64(-1.0 - Float64(Float64(a * a) * Float64(0.3333333333333333 + Float64(Float64(a * a) * Float64(0.13333333333333333 + Float64(Float64(a * a) * 0.05396825396825397)))))))));
	else
		tmp = Float64(x + Float64(t_0 - tan(a)));
	end
	return tmp
end
x, y, z, a = num2cell(sort([x, y, z, a])){:}
function tmp_2 = code(x, y, z, a)
	t_0 = tan(z) + tan(y);
	tmp = 0.0;
	if (a <= -0.1)
		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / tan(z)))))) - tan(a));
	elseif (a <= 0.44)
		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) + (a * (-1.0 - ((a * a) * (0.3333333333333333 + ((a * a) * (0.13333333333333333 + ((a * a) * 0.05396825396825397))))))));
	else
		tmp = x + (t_0 - tan(a));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, a_] := Block[{t$95$0 = N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.1], N[(x + N[(N[(t$95$0 * N[(1.0 / N[(1.0 + N[(1.0 / N[(N[(N[(-1.0 - N[(-0.3333333333333333 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.44], N[(x + N[(N[(t$95$0 * N[(1.0 / N[(1.0 + N[(1.0 / N[(N[(-1.0 / N[Tan[y], $MachinePrecision]), $MachinePrecision] / N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(-1.0 - N[(N[(a * a), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(a * a), $MachinePrecision] * N[(0.13333333333333333 + N[(N[(a * a), $MachinePrecision] * 0.05396825396825397), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$0 - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
\\
\begin{array}{l}
t_0 := \tan z + \tan y\\
\mathbf{if}\;a \leq -0.1:\\
\;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\

\mathbf{elif}\;a \leq 0.44:\\
\;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} + a \cdot \left(-1 - \left(a \cdot a\right) \cdot \left(0.3333333333333333 + \left(a \cdot a\right) \cdot \left(0.13333333333333333 + \left(a \cdot a\right) \cdot 0.05396825396825397\right)\right)\right)\right)\\

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


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

    1. Initial program 81.3%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      8. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      9. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      11. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      12. tan-lowering-tan.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    4. Applied egg-rr99.8%

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      2. tan-quotN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      6. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      8. cos-lowering-cos.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    6. Applied egg-rr99.8%

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\tan z \cdot \sin y}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\sin y \cdot \tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\frac{\cos y}{\sin y}}{\tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\cos y}{\sin y}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{\frac{\sin y}{\cos y}}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      7. tan-quotN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \tan y\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      9. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      10. tan-lowering-tan.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    8. Applied egg-rr99.8%

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{3}, \left(y \cdot y\right)\right)\right), y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      5. *-lowering-*.f6483.2%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(y, y\right)\right)\right), y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    11. Simplified83.2%

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

    if -0.10000000000000001 < a < 0.440000000000000002

    1. Initial program 80.8%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      8. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      9. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      11. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      12. tan-lowering-tan.f6499.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    4. Applied egg-rr99.7%

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      2. tan-quotN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      6. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      8. cos-lowering-cos.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    6. Applied egg-rr99.8%

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\tan z \cdot \sin y}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\sin y \cdot \tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\frac{\cos y}{\sin y}}{\tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\cos y}{\sin y}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{\frac{\sin y}{\cos y}}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      7. tan-quotN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \tan y\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      9. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      10. tan-lowering-tan.f6499.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    8. Applied egg-rr99.7%

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({a}^{2}\right), \color{blue}{\left(\frac{1}{3} + {a}^{2} \cdot \left(\frac{2}{15} + \frac{17}{315} \cdot {a}^{2}\right)\right)}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{2}{15}, \color{blue}{\left(\frac{17}{315} \cdot {a}^{2}\right)}\right)\right)\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{2}{15}, \mathsf{*.f64}\left(\left({a}^{2}\right), \color{blue}{\frac{17}{315}}\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{2}{15}, \mathsf{*.f64}\left(\left(a \cdot a\right), \frac{17}{315}\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6499.4%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{2}{15}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \frac{17}{315}\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
    11. Simplified99.4%

      \[\leadsto x + \left(\frac{1}{1 - \frac{1}{\frac{\frac{1}{\tan y}}{\tan z}}} \cdot \left(\tan y + \tan z\right) - \color{blue}{a \cdot \left(1 + \left(a \cdot a\right) \cdot \left(0.3333333333333333 + \left(a \cdot a\right) \cdot \left(0.13333333333333333 + \left(a \cdot a\right) \cdot 0.05396825396825397\right)\right)\right)}\right) \]

    if 0.440000000000000002 < a

    1. Initial program 79.6%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      8. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      9. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      11. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      12. tan-lowering-tan.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
    4. Applied egg-rr99.8%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.1:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} + a \cdot \left(-1 - \left(a \cdot a\right) \cdot \left(0.3333333333333333 + \left(a \cdot a\right) \cdot \left(0.13333333333333333 + \left(a \cdot a\right) \cdot 0.05396825396825397\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) - \tan a\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 6: 89.7% accurate, 0.5× speedup?

    \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} t_0 := \tan z + \tan y\\ \mathbf{if}\;a \leq -0.07:\\ \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} + a \cdot \left(-1 - a \cdot \left(a \cdot \left(0.3333333333333333 + \left(a \cdot a\right) \cdot 0.13333333333333333\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t\_0 - \tan a\right)\\ \end{array} \end{array} \]
    NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
    (FPCore (x y z a)
     :precision binary64
     (let* ((t_0 (+ (tan z) (tan y))))
       (if (<= a -0.07)
         (+
          x
          (-
           (*
            t_0
            (/
             1.0
             (+
              1.0
              (/ 1.0 (/ (/ (- -1.0 (* -0.3333333333333333 (* y y))) y) (tan z))))))
           (tan a)))
         (if (<= a 0.44)
           (+
            x
            (+
             (* t_0 (/ 1.0 (+ 1.0 (/ 1.0 (/ (/ -1.0 (tan y)) (tan z))))))
             (*
              a
              (-
               -1.0
               (*
                a
                (* a (+ 0.3333333333333333 (* (* a a) 0.13333333333333333))))))))
           (+ x (- t_0 (tan a)))))))
    assert(x < y && y < z && z < a);
    double code(double x, double y, double z, double a) {
    	double t_0 = tan(z) + tan(y);
    	double tmp;
    	if (a <= -0.07) {
    		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / tan(z)))))) - tan(a));
    	} else if (a <= 0.44) {
    		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) + (a * (-1.0 - (a * (a * (0.3333333333333333 + ((a * a) * 0.13333333333333333)))))));
    	} else {
    		tmp = x + (t_0 - tan(a));
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
    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(z) + tan(y)
        if (a <= (-0.07d0)) then
            tmp = x + ((t_0 * (1.0d0 / (1.0d0 + (1.0d0 / ((((-1.0d0) - ((-0.3333333333333333d0) * (y * y))) / y) / tan(z)))))) - tan(a))
        else if (a <= 0.44d0) then
            tmp = x + ((t_0 * (1.0d0 / (1.0d0 + (1.0d0 / (((-1.0d0) / tan(y)) / tan(z)))))) + (a * ((-1.0d0) - (a * (a * (0.3333333333333333d0 + ((a * a) * 0.13333333333333333d0)))))))
        else
            tmp = x + (t_0 - tan(a))
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < a;
    public static double code(double x, double y, double z, double a) {
    	double t_0 = Math.tan(z) + Math.tan(y);
    	double tmp;
    	if (a <= -0.07) {
    		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / Math.tan(z)))))) - Math.tan(a));
    	} else if (a <= 0.44) {
    		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / Math.tan(y)) / Math.tan(z)))))) + (a * (-1.0 - (a * (a * (0.3333333333333333 + ((a * a) * 0.13333333333333333)))))));
    	} else {
    		tmp = x + (t_0 - Math.tan(a));
    	}
    	return tmp;
    }
    
    [x, y, z, a] = sort([x, y, z, a])
    def code(x, y, z, a):
    	t_0 = math.tan(z) + math.tan(y)
    	tmp = 0
    	if a <= -0.07:
    		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / math.tan(z)))))) - math.tan(a))
    	elif a <= 0.44:
    		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / math.tan(y)) / math.tan(z)))))) + (a * (-1.0 - (a * (a * (0.3333333333333333 + ((a * a) * 0.13333333333333333)))))))
    	else:
    		tmp = x + (t_0 - math.tan(a))
    	return tmp
    
    x, y, z, a = sort([x, y, z, a])
    function code(x, y, z, a)
    	t_0 = Float64(tan(z) + tan(y))
    	tmp = 0.0
    	if (a <= -0.07)
    		tmp = Float64(x + Float64(Float64(t_0 * Float64(1.0 / Float64(1.0 + Float64(1.0 / Float64(Float64(Float64(-1.0 - Float64(-0.3333333333333333 * Float64(y * y))) / y) / tan(z)))))) - tan(a)));
    	elseif (a <= 0.44)
    		tmp = Float64(x + Float64(Float64(t_0 * Float64(1.0 / Float64(1.0 + Float64(1.0 / Float64(Float64(-1.0 / tan(y)) / tan(z)))))) + Float64(a * Float64(-1.0 - Float64(a * Float64(a * Float64(0.3333333333333333 + Float64(Float64(a * a) * 0.13333333333333333))))))));
    	else
    		tmp = Float64(x + Float64(t_0 - tan(a)));
    	end
    	return tmp
    end
    
    x, y, z, a = num2cell(sort([x, y, z, a])){:}
    function tmp_2 = code(x, y, z, a)
    	t_0 = tan(z) + tan(y);
    	tmp = 0.0;
    	if (a <= -0.07)
    		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / tan(z)))))) - tan(a));
    	elseif (a <= 0.44)
    		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) + (a * (-1.0 - (a * (a * (0.3333333333333333 + ((a * a) * 0.13333333333333333)))))));
    	else
    		tmp = x + (t_0 - tan(a));
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
    code[x_, y_, z_, a_] := Block[{t$95$0 = N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.07], N[(x + N[(N[(t$95$0 * N[(1.0 / N[(1.0 + N[(1.0 / N[(N[(N[(-1.0 - N[(-0.3333333333333333 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.44], N[(x + N[(N[(t$95$0 * N[(1.0 / N[(1.0 + N[(1.0 / N[(N[(-1.0 / N[Tan[y], $MachinePrecision]), $MachinePrecision] / N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(-1.0 - N[(a * N[(a * N[(0.3333333333333333 + N[(N[(a * a), $MachinePrecision] * 0.13333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$0 - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
    \\
    \begin{array}{l}
    t_0 := \tan z + \tan y\\
    \mathbf{if}\;a \leq -0.07:\\
    \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\
    
    \mathbf{elif}\;a \leq 0.44:\\
    \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} + a \cdot \left(-1 - a \cdot \left(a \cdot \left(0.3333333333333333 + \left(a \cdot a\right) \cdot 0.13333333333333333\right)\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;x + \left(t\_0 - \tan a\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if a < -0.070000000000000007

      1. Initial program 81.3%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        8. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        9. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        10. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        11. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        12. tan-lowering-tan.f6499.8%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      4. Applied egg-rr99.8%

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        2. tan-quotN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        3. associate-*r/N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        6. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        7. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        8. cos-lowering-cos.f6499.8%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      6. Applied egg-rr99.8%

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\tan z \cdot \sin y}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\sin y \cdot \tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        4. associate-/r*N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\frac{\cos y}{\sin y}}{\tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\cos y}{\sin y}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        6. clear-numN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{\frac{\sin y}{\cos y}}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        7. tan-quotN/A

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \tan y\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        9. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        10. tan-lowering-tan.f6499.8%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      8. Applied egg-rr99.8%

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{3}, \left(y \cdot y\right)\right)\right), y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        5. *-lowering-*.f6483.2%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(y, y\right)\right)\right), y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      11. Simplified83.2%

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

      if -0.070000000000000007 < a < 0.440000000000000002

      1. Initial program 80.8%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        8. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        9. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        10. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        11. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        12. tan-lowering-tan.f6499.7%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      4. Applied egg-rr99.7%

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        2. tan-quotN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        3. associate-*r/N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        6. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        7. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        8. cos-lowering-cos.f6499.8%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      6. Applied egg-rr99.8%

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\tan z \cdot \sin y}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\sin y \cdot \tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        4. associate-/r*N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\frac{\cos y}{\sin y}}{\tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\cos y}{\sin y}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        6. clear-numN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{\frac{\sin y}{\cos y}}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        7. tan-quotN/A

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \tan y\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        9. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        10. tan-lowering-tan.f6499.7%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      8. Applied egg-rr99.7%

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(a \cdot a\right) \cdot \left(\color{blue}{\frac{1}{3}} + \frac{2}{15} \cdot {a}^{2}\right)\right)\right)\right)\right)\right) \]
        4. associate-*l*N/A

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({a}^{2}\right), \color{blue}{\frac{2}{15}}\right)\right)\right)\right)\right)\right)\right)\right) \]
        10. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(a \cdot a\right), \frac{2}{15}\right)\right)\right)\right)\right)\right)\right)\right) \]
        11. *-lowering-*.f6499.3%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \frac{2}{15}\right)\right)\right)\right)\right)\right)\right)\right) \]
      11. Simplified99.3%

        \[\leadsto x + \left(\frac{1}{1 - \frac{1}{\frac{\frac{1}{\tan y}}{\tan z}}} \cdot \left(\tan y + \tan z\right) - \color{blue}{a \cdot \left(1 + a \cdot \left(a \cdot \left(0.3333333333333333 + \left(a \cdot a\right) \cdot 0.13333333333333333\right)\right)\right)}\right) \]

      if 0.440000000000000002 < a

      1. Initial program 79.6%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        8. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        9. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        10. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        11. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        12. tan-lowering-tan.f6499.8%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
      4. Applied egg-rr99.8%

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.07:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} + a \cdot \left(-1 - a \cdot \left(a \cdot \left(0.3333333333333333 + \left(a \cdot a\right) \cdot 0.13333333333333333\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) - \tan a\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 7: 89.6% accurate, 0.5× speedup?

      \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} t_0 := \tan z + \tan y\\ \mathbf{if}\;a \leq -0.0034:\\ \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} + a \cdot \left(-1 - a \cdot \left(a \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t\_0 - \tan a\right)\\ \end{array} \end{array} \]
      NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
      (FPCore (x y z a)
       :precision binary64
       (let* ((t_0 (+ (tan z) (tan y))))
         (if (<= a -0.0034)
           (+
            x
            (-
             (*
              t_0
              (/
               1.0
               (+
                1.0
                (/ 1.0 (/ (/ (- -1.0 (* -0.3333333333333333 (* y y))) y) (tan z))))))
             (tan a)))
           (if (<= a 0.44)
             (+
              x
              (+
               (* t_0 (/ 1.0 (+ 1.0 (/ 1.0 (/ (/ -1.0 (tan y)) (tan z))))))
               (* a (- -1.0 (* a (* a 0.3333333333333333))))))
             (+ x (- t_0 (tan a)))))))
      assert(x < y && y < z && z < a);
      double code(double x, double y, double z, double a) {
      	double t_0 = tan(z) + tan(y);
      	double tmp;
      	if (a <= -0.0034) {
      		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / tan(z)))))) - tan(a));
      	} else if (a <= 0.44) {
      		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) + (a * (-1.0 - (a * (a * 0.3333333333333333)))));
      	} else {
      		tmp = x + (t_0 - tan(a));
      	}
      	return tmp;
      }
      
      NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
      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(z) + tan(y)
          if (a <= (-0.0034d0)) then
              tmp = x + ((t_0 * (1.0d0 / (1.0d0 + (1.0d0 / ((((-1.0d0) - ((-0.3333333333333333d0) * (y * y))) / y) / tan(z)))))) - tan(a))
          else if (a <= 0.44d0) then
              tmp = x + ((t_0 * (1.0d0 / (1.0d0 + (1.0d0 / (((-1.0d0) / tan(y)) / tan(z)))))) + (a * ((-1.0d0) - (a * (a * 0.3333333333333333d0)))))
          else
              tmp = x + (t_0 - tan(a))
          end if
          code = tmp
      end function
      
      assert x < y && y < z && z < a;
      public static double code(double x, double y, double z, double a) {
      	double t_0 = Math.tan(z) + Math.tan(y);
      	double tmp;
      	if (a <= -0.0034) {
      		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / Math.tan(z)))))) - Math.tan(a));
      	} else if (a <= 0.44) {
      		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / Math.tan(y)) / Math.tan(z)))))) + (a * (-1.0 - (a * (a * 0.3333333333333333)))));
      	} else {
      		tmp = x + (t_0 - Math.tan(a));
      	}
      	return tmp;
      }
      
      [x, y, z, a] = sort([x, y, z, a])
      def code(x, y, z, a):
      	t_0 = math.tan(z) + math.tan(y)
      	tmp = 0
      	if a <= -0.0034:
      		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / math.tan(z)))))) - math.tan(a))
      	elif a <= 0.44:
      		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / math.tan(y)) / math.tan(z)))))) + (a * (-1.0 - (a * (a * 0.3333333333333333)))))
      	else:
      		tmp = x + (t_0 - math.tan(a))
      	return tmp
      
      x, y, z, a = sort([x, y, z, a])
      function code(x, y, z, a)
      	t_0 = Float64(tan(z) + tan(y))
      	tmp = 0.0
      	if (a <= -0.0034)
      		tmp = Float64(x + Float64(Float64(t_0 * Float64(1.0 / Float64(1.0 + Float64(1.0 / Float64(Float64(Float64(-1.0 - Float64(-0.3333333333333333 * Float64(y * y))) / y) / tan(z)))))) - tan(a)));
      	elseif (a <= 0.44)
      		tmp = Float64(x + Float64(Float64(t_0 * Float64(1.0 / Float64(1.0 + Float64(1.0 / Float64(Float64(-1.0 / tan(y)) / tan(z)))))) + Float64(a * Float64(-1.0 - Float64(a * Float64(a * 0.3333333333333333))))));
      	else
      		tmp = Float64(x + Float64(t_0 - tan(a)));
      	end
      	return tmp
      end
      
      x, y, z, a = num2cell(sort([x, y, z, a])){:}
      function tmp_2 = code(x, y, z, a)
      	t_0 = tan(z) + tan(y);
      	tmp = 0.0;
      	if (a <= -0.0034)
      		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / tan(z)))))) - tan(a));
      	elseif (a <= 0.44)
      		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) + (a * (-1.0 - (a * (a * 0.3333333333333333)))));
      	else
      		tmp = x + (t_0 - tan(a));
      	end
      	tmp_2 = tmp;
      end
      
      NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
      code[x_, y_, z_, a_] := Block[{t$95$0 = N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.0034], N[(x + N[(N[(t$95$0 * N[(1.0 / N[(1.0 + N[(1.0 / N[(N[(N[(-1.0 - N[(-0.3333333333333333 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.44], N[(x + N[(N[(t$95$0 * N[(1.0 / N[(1.0 + N[(1.0 / N[(N[(-1.0 / N[Tan[y], $MachinePrecision]), $MachinePrecision] / N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(-1.0 - N[(a * N[(a * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$0 - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
      \\
      \begin{array}{l}
      t_0 := \tan z + \tan y\\
      \mathbf{if}\;a \leq -0.0034:\\
      \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\
      
      \mathbf{elif}\;a \leq 0.44:\\
      \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} + a \cdot \left(-1 - a \cdot \left(a \cdot 0.3333333333333333\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x + \left(t\_0 - \tan a\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if a < -0.00339999999999999981

        1. Initial program 81.3%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          8. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          9. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          10. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          11. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          12. tan-lowering-tan.f6499.8%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        4. Applied egg-rr99.8%

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          2. tan-quotN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          3. associate-*r/N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          6. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          7. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          8. cos-lowering-cos.f6499.8%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        6. Applied egg-rr99.8%

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\tan z \cdot \sin y}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\sin y \cdot \tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          4. associate-/r*N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\frac{\cos y}{\sin y}}{\tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\cos y}{\sin y}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          6. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{\frac{\sin y}{\cos y}}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          7. tan-quotN/A

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \tan y\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          9. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          10. tan-lowering-tan.f6499.8%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        8. Applied egg-rr99.8%

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

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{3}, \left(y \cdot y\right)\right)\right), y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          5. *-lowering-*.f6483.2%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(y, y\right)\right)\right), y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        11. Simplified83.2%

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

        if -0.00339999999999999981 < a < 0.440000000000000002

        1. Initial program 80.8%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          8. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          9. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          10. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          11. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          12. tan-lowering-tan.f6499.7%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        4. Applied egg-rr99.7%

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          2. tan-quotN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          3. associate-*r/N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          6. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          7. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          8. cos-lowering-cos.f6499.8%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        6. Applied egg-rr99.8%

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\tan z \cdot \sin y}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\sin y \cdot \tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          4. associate-/r*N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\frac{\cos y}{\sin y}}{\tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\cos y}{\sin y}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          6. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{\frac{\sin y}{\cos y}}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          7. tan-quotN/A

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \tan y\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          9. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          10. tan-lowering-tan.f6499.7%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        8. Applied egg-rr99.7%

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

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(a \cdot a\right) \cdot \frac{1}{3}\right)\right)\right)\right)\right) \]
          5. associate-*l*N/A

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \color{blue}{\left(a \cdot \frac{1}{3}\right)}\right)\right)\right)\right)\right) \]
          7. *-lowering-*.f6499.3%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\frac{1}{3}}\right)\right)\right)\right)\right)\right) \]
        11. Simplified99.3%

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

        if 0.440000000000000002 < a

        1. Initial program 79.6%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          8. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          9. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          10. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          11. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          12. tan-lowering-tan.f6499.8%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
        4. Applied egg-rr99.8%

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0034:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} + a \cdot \left(-1 - a \cdot \left(a \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) - \tan a\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 8: 89.6% accurate, 0.5× speedup?

        \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} t_0 := \tan z + \tan y\\ \mathbf{if}\;a \leq -0.00014:\\ \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t\_0 - \tan a\right)\\ \end{array} \end{array} \]
        NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
        (FPCore (x y z a)
         :precision binary64
         (let* ((t_0 (+ (tan z) (tan y))))
           (if (<= a -0.00014)
             (+
              x
              (-
               (*
                t_0
                (/
                 1.0
                 (+
                  1.0
                  (/ 1.0 (/ (/ (- -1.0 (* -0.3333333333333333 (* y y))) y) (tan z))))))
               (tan a)))
             (if (<= a 0.44)
               (+ x (- (* t_0 (/ 1.0 (+ 1.0 (/ 1.0 (/ (/ -1.0 (tan y)) (tan z)))))) a))
               (+ x (- t_0 (tan a)))))))
        assert(x < y && y < z && z < a);
        double code(double x, double y, double z, double a) {
        	double t_0 = tan(z) + tan(y);
        	double tmp;
        	if (a <= -0.00014) {
        		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / tan(z)))))) - tan(a));
        	} else if (a <= 0.44) {
        		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) - a);
        	} else {
        		tmp = x + (t_0 - tan(a));
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
        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(z) + tan(y)
            if (a <= (-0.00014d0)) then
                tmp = x + ((t_0 * (1.0d0 / (1.0d0 + (1.0d0 / ((((-1.0d0) - ((-0.3333333333333333d0) * (y * y))) / y) / tan(z)))))) - tan(a))
            else if (a <= 0.44d0) then
                tmp = x + ((t_0 * (1.0d0 / (1.0d0 + (1.0d0 / (((-1.0d0) / tan(y)) / tan(z)))))) - a)
            else
                tmp = x + (t_0 - tan(a))
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < a;
        public static double code(double x, double y, double z, double a) {
        	double t_0 = Math.tan(z) + Math.tan(y);
        	double tmp;
        	if (a <= -0.00014) {
        		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / Math.tan(z)))))) - Math.tan(a));
        	} else if (a <= 0.44) {
        		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / Math.tan(y)) / Math.tan(z)))))) - a);
        	} else {
        		tmp = x + (t_0 - Math.tan(a));
        	}
        	return tmp;
        }
        
        [x, y, z, a] = sort([x, y, z, a])
        def code(x, y, z, a):
        	t_0 = math.tan(z) + math.tan(y)
        	tmp = 0
        	if a <= -0.00014:
        		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / math.tan(z)))))) - math.tan(a))
        	elif a <= 0.44:
        		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / math.tan(y)) / math.tan(z)))))) - a)
        	else:
        		tmp = x + (t_0 - math.tan(a))
        	return tmp
        
        x, y, z, a = sort([x, y, z, a])
        function code(x, y, z, a)
        	t_0 = Float64(tan(z) + tan(y))
        	tmp = 0.0
        	if (a <= -0.00014)
        		tmp = Float64(x + Float64(Float64(t_0 * Float64(1.0 / Float64(1.0 + Float64(1.0 / Float64(Float64(Float64(-1.0 - Float64(-0.3333333333333333 * Float64(y * y))) / y) / tan(z)))))) - tan(a)));
        	elseif (a <= 0.44)
        		tmp = Float64(x + Float64(Float64(t_0 * Float64(1.0 / Float64(1.0 + Float64(1.0 / Float64(Float64(-1.0 / tan(y)) / tan(z)))))) - a));
        	else
        		tmp = Float64(x + Float64(t_0 - tan(a)));
        	end
        	return tmp
        end
        
        x, y, z, a = num2cell(sort([x, y, z, a])){:}
        function tmp_2 = code(x, y, z, a)
        	t_0 = tan(z) + tan(y);
        	tmp = 0.0;
        	if (a <= -0.00014)
        		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / (((-1.0 - (-0.3333333333333333 * (y * y))) / y) / tan(z)))))) - tan(a));
        	elseif (a <= 0.44)
        		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) - a);
        	else
        		tmp = x + (t_0 - tan(a));
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
        code[x_, y_, z_, a_] := Block[{t$95$0 = N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.00014], N[(x + N[(N[(t$95$0 * N[(1.0 / N[(1.0 + N[(1.0 / N[(N[(N[(-1.0 - N[(-0.3333333333333333 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.44], N[(x + N[(N[(t$95$0 * N[(1.0 / N[(1.0 + N[(1.0 / N[(N[(-1.0 / N[Tan[y], $MachinePrecision]), $MachinePrecision] / N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$0 - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
        \\
        \begin{array}{l}
        t_0 := \tan z + \tan y\\
        \mathbf{if}\;a \leq -0.00014:\\
        \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\
        
        \mathbf{elif}\;a \leq 0.44:\\
        \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} - a\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x + \left(t\_0 - \tan a\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if a < -1.3999999999999999e-4

          1. Initial program 81.9%

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

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

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            8. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            9. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            10. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            11. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            12. tan-lowering-tan.f6499.8%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          4. Applied egg-rr99.8%

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            2. tan-quotN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            3. associate-*r/N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            6. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            7. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            8. cos-lowering-cos.f6499.8%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          6. Applied egg-rr99.8%

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

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\tan z \cdot \sin y}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\sin y \cdot \tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            4. associate-/r*N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\frac{\cos y}{\sin y}}{\tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\cos y}{\sin y}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            6. clear-numN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{\frac{\sin y}{\cos y}}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            7. tan-quotN/A

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \tan y\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            9. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            10. tan-lowering-tan.f6499.8%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          8. Applied egg-rr99.8%

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{3}, \left(y \cdot y\right)\right)\right), y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            5. *-lowering-*.f6483.7%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(y, y\right)\right)\right), y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          11. Simplified83.7%

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

          if -1.3999999999999999e-4 < a < 0.440000000000000002

          1. Initial program 80.5%

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

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

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            8. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            9. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            10. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            11. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            12. tan-lowering-tan.f6499.7%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          4. Applied egg-rr99.7%

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            2. tan-quotN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            3. associate-*r/N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            6. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            7. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            8. cos-lowering-cos.f6499.8%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          6. Applied egg-rr99.8%

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

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\tan z \cdot \sin y}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\sin y \cdot \tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            4. associate-/r*N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\frac{\cos y}{\sin y}}{\tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\cos y}{\sin y}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            6. clear-numN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{\frac{\sin y}{\cos y}}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            7. tan-quotN/A

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \tan y\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            9. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            10. tan-lowering-tan.f6499.7%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
          8. Applied egg-rr99.7%

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \color{blue}{a}\right)\right) \]
          10. Step-by-step derivation
            1. Simplified99.3%

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

            if 0.440000000000000002 < a

            1. Initial program 79.6%

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

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

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

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
              8. tan-lowering-tan.f64N/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
              9. tan-lowering-tan.f64N/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
              10. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
              11. tan-lowering-tan.f64N/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
              12. tan-lowering-tan.f6499.8%

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
            4. Applied egg-rr99.8%

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00014:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1 - -0.3333333333333333 \cdot \left(y \cdot y\right)}{y}}{\tan z}}} - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(\tan z + \tan y\right) - \tan a\right)\\ \end{array} \]
            9. Add Preprocessing

            Alternative 9: 89.4% accurate, 0.5× speedup?

            \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} t_0 := \tan z + \tan y\\ \mathbf{if}\;a \leq -0.00042:\\ \;\;\;\;x + \left(\tan \left(z + y\right) - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t\_0 - \tan a\right)\\ \end{array} \end{array} \]
            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
            (FPCore (x y z a)
             :precision binary64
             (let* ((t_0 (+ (tan z) (tan y))))
               (if (<= a -0.00042)
                 (+ x (- (tan (+ z y)) (tan a)))
                 (if (<= a 0.44)
                   (+ x (- (* t_0 (/ 1.0 (+ 1.0 (/ 1.0 (/ (/ -1.0 (tan y)) (tan z)))))) a))
                   (+ x (- t_0 (tan a)))))))
            assert(x < y && y < z && z < a);
            double code(double x, double y, double z, double a) {
            	double t_0 = tan(z) + tan(y);
            	double tmp;
            	if (a <= -0.00042) {
            		tmp = x + (tan((z + y)) - tan(a));
            	} else if (a <= 0.44) {
            		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) - a);
            	} else {
            		tmp = x + (t_0 - tan(a));
            	}
            	return tmp;
            }
            
            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
            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(z) + tan(y)
                if (a <= (-0.00042d0)) then
                    tmp = x + (tan((z + y)) - tan(a))
                else if (a <= 0.44d0) then
                    tmp = x + ((t_0 * (1.0d0 / (1.0d0 + (1.0d0 / (((-1.0d0) / tan(y)) / tan(z)))))) - a)
                else
                    tmp = x + (t_0 - tan(a))
                end if
                code = tmp
            end function
            
            assert x < y && y < z && z < a;
            public static double code(double x, double y, double z, double a) {
            	double t_0 = Math.tan(z) + Math.tan(y);
            	double tmp;
            	if (a <= -0.00042) {
            		tmp = x + (Math.tan((z + y)) - Math.tan(a));
            	} else if (a <= 0.44) {
            		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / Math.tan(y)) / Math.tan(z)))))) - a);
            	} else {
            		tmp = x + (t_0 - Math.tan(a));
            	}
            	return tmp;
            }
            
            [x, y, z, a] = sort([x, y, z, a])
            def code(x, y, z, a):
            	t_0 = math.tan(z) + math.tan(y)
            	tmp = 0
            	if a <= -0.00042:
            		tmp = x + (math.tan((z + y)) - math.tan(a))
            	elif a <= 0.44:
            		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / math.tan(y)) / math.tan(z)))))) - a)
            	else:
            		tmp = x + (t_0 - math.tan(a))
            	return tmp
            
            x, y, z, a = sort([x, y, z, a])
            function code(x, y, z, a)
            	t_0 = Float64(tan(z) + tan(y))
            	tmp = 0.0
            	if (a <= -0.00042)
            		tmp = Float64(x + Float64(tan(Float64(z + y)) - tan(a)));
            	elseif (a <= 0.44)
            		tmp = Float64(x + Float64(Float64(t_0 * Float64(1.0 / Float64(1.0 + Float64(1.0 / Float64(Float64(-1.0 / tan(y)) / tan(z)))))) - a));
            	else
            		tmp = Float64(x + Float64(t_0 - tan(a)));
            	end
            	return tmp
            end
            
            x, y, z, a = num2cell(sort([x, y, z, a])){:}
            function tmp_2 = code(x, y, z, a)
            	t_0 = tan(z) + tan(y);
            	tmp = 0.0;
            	if (a <= -0.00042)
            		tmp = x + (tan((z + y)) - tan(a));
            	elseif (a <= 0.44)
            		tmp = x + ((t_0 * (1.0 / (1.0 + (1.0 / ((-1.0 / tan(y)) / tan(z)))))) - a);
            	else
            		tmp = x + (t_0 - tan(a));
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
            code[x_, y_, z_, a_] := Block[{t$95$0 = N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.00042], N[(x + N[(N[Tan[N[(z + y), $MachinePrecision]], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.44], N[(x + N[(N[(t$95$0 * N[(1.0 / N[(1.0 + N[(1.0 / N[(N[(-1.0 / N[Tan[y], $MachinePrecision]), $MachinePrecision] / N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$0 - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
            \\
            \begin{array}{l}
            t_0 := \tan z + \tan y\\
            \mathbf{if}\;a \leq -0.00042:\\
            \;\;\;\;x + \left(\tan \left(z + y\right) - \tan a\right)\\
            
            \mathbf{elif}\;a \leq 0.44:\\
            \;\;\;\;x + \left(t\_0 \cdot \frac{1}{1 + \frac{1}{\frac{\frac{-1}{\tan y}}{\tan z}}} - a\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;x + \left(t\_0 - \tan a\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if a < -4.2000000000000002e-4

              1. Initial program 81.9%

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

              if -4.2000000000000002e-4 < a < 0.440000000000000002

              1. Initial program 80.5%

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                8. tan-lowering-tan.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                9. tan-lowering-tan.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                10. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                11. tan-lowering-tan.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                12. tan-lowering-tan.f6499.7%

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
              4. Applied egg-rr99.7%

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                2. tan-quotN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\tan z \cdot \frac{\sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                3. associate-*r/N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{\tan z \cdot \sin y}{\cos y}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\tan z \cdot \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\tan z, \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                6. tan-lowering-tan.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \sin y\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                7. sin-lowering-sin.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \cos y\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                8. cos-lowering-cos.f6499.8%

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{sin.f64}\left(y\right)\right), \mathsf{cos.f64}\left(y\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
              6. Applied egg-rr99.8%

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

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\tan z \cdot \sin y}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\cos y}{\sin y \cdot \tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                4. associate-/r*N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\frac{\cos y}{\sin y}}{\tan z}\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\cos y}{\sin y}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                6. clear-numN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{\frac{\sin y}{\cos y}}\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                7. tan-quotN/A

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \tan y\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                9. tan-lowering-tan.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \tan z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                10. tan-lowering-tan.f6499.7%

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
              8. Applied egg-rr99.7%

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

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(y\right)\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \color{blue}{a}\right)\right) \]
              10. Step-by-step derivation
                1. Simplified99.3%

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

                if 0.440000000000000002 < a

                1. Initial program 79.6%

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                  8. tan-lowering-tan.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                  9. tan-lowering-tan.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                  10. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                  11. tan-lowering-tan.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                  12. tan-lowering-tan.f6499.8%

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                4. Applied egg-rr99.8%

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

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

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

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

                Alternative 10: 89.4% accurate, 0.5× speedup?

                \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} t_0 := \tan z + \tan y\\ \mathbf{if}\;a \leq -0.00043:\\ \;\;\;\;x + \left(\tan \left(z + y\right) - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(\frac{t\_0}{1 - \tan z \cdot \tan y} - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t\_0 - \tan a\right)\\ \end{array} \end{array} \]
                NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                (FPCore (x y z a)
                 :precision binary64
                 (let* ((t_0 (+ (tan z) (tan y))))
                   (if (<= a -0.00043)
                     (+ x (- (tan (+ z y)) (tan a)))
                     (if (<= a 0.44)
                       (+ x (- (/ t_0 (- 1.0 (* (tan z) (tan y)))) a))
                       (+ x (- t_0 (tan a)))))))
                assert(x < y && y < z && z < a);
                double code(double x, double y, double z, double a) {
                	double t_0 = tan(z) + tan(y);
                	double tmp;
                	if (a <= -0.00043) {
                		tmp = x + (tan((z + y)) - tan(a));
                	} else if (a <= 0.44) {
                		tmp = x + ((t_0 / (1.0 - (tan(z) * tan(y)))) - a);
                	} else {
                		tmp = x + (t_0 - tan(a));
                	}
                	return tmp;
                }
                
                NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                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(z) + tan(y)
                    if (a <= (-0.00043d0)) then
                        tmp = x + (tan((z + y)) - tan(a))
                    else if (a <= 0.44d0) then
                        tmp = x + ((t_0 / (1.0d0 - (tan(z) * tan(y)))) - a)
                    else
                        tmp = x + (t_0 - tan(a))
                    end if
                    code = tmp
                end function
                
                assert x < y && y < z && z < a;
                public static double code(double x, double y, double z, double a) {
                	double t_0 = Math.tan(z) + Math.tan(y);
                	double tmp;
                	if (a <= -0.00043) {
                		tmp = x + (Math.tan((z + y)) - Math.tan(a));
                	} else if (a <= 0.44) {
                		tmp = x + ((t_0 / (1.0 - (Math.tan(z) * Math.tan(y)))) - a);
                	} else {
                		tmp = x + (t_0 - Math.tan(a));
                	}
                	return tmp;
                }
                
                [x, y, z, a] = sort([x, y, z, a])
                def code(x, y, z, a):
                	t_0 = math.tan(z) + math.tan(y)
                	tmp = 0
                	if a <= -0.00043:
                		tmp = x + (math.tan((z + y)) - math.tan(a))
                	elif a <= 0.44:
                		tmp = x + ((t_0 / (1.0 - (math.tan(z) * math.tan(y)))) - a)
                	else:
                		tmp = x + (t_0 - math.tan(a))
                	return tmp
                
                x, y, z, a = sort([x, y, z, a])
                function code(x, y, z, a)
                	t_0 = Float64(tan(z) + tan(y))
                	tmp = 0.0
                	if (a <= -0.00043)
                		tmp = Float64(x + Float64(tan(Float64(z + y)) - tan(a)));
                	elseif (a <= 0.44)
                		tmp = Float64(x + Float64(Float64(t_0 / Float64(1.0 - Float64(tan(z) * tan(y)))) - a));
                	else
                		tmp = Float64(x + Float64(t_0 - tan(a)));
                	end
                	return tmp
                end
                
                x, y, z, a = num2cell(sort([x, y, z, a])){:}
                function tmp_2 = code(x, y, z, a)
                	t_0 = tan(z) + tan(y);
                	tmp = 0.0;
                	if (a <= -0.00043)
                		tmp = x + (tan((z + y)) - tan(a));
                	elseif (a <= 0.44)
                		tmp = x + ((t_0 / (1.0 - (tan(z) * tan(y)))) - a);
                	else
                		tmp = x + (t_0 - tan(a));
                	end
                	tmp_2 = tmp;
                end
                
                NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                code[x_, y_, z_, a_] := Block[{t$95$0 = N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.00043], N[(x + N[(N[Tan[N[(z + y), $MachinePrecision]], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.44], N[(x + N[(N[(t$95$0 / N[(1.0 - N[(N[Tan[z], $MachinePrecision] * N[Tan[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$0 - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                
                \begin{array}{l}
                [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                \\
                \begin{array}{l}
                t_0 := \tan z + \tan y\\
                \mathbf{if}\;a \leq -0.00043:\\
                \;\;\;\;x + \left(\tan \left(z + y\right) - \tan a\right)\\
                
                \mathbf{elif}\;a \leq 0.44:\\
                \;\;\;\;x + \left(\frac{t\_0}{1 - \tan z \cdot \tan y} - a\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;x + \left(t\_0 - \tan a\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if a < -4.29999999999999989e-4

                  1. Initial program 81.9%

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

                  if -4.29999999999999989e-4 < a < 0.440000000000000002

                  1. Initial program 80.5%

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

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \color{blue}{a}\right)\right) \]
                  4. Step-by-step derivation
                    1. Simplified80.5%

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

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

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(\tan y + \tan z\right), \left(1 - \tan y \cdot \tan z\right)\right), a\right)\right) \]
                      3. +-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(\tan z + \tan y\right), \left(1 - \tan y \cdot \tan z\right)\right), a\right)\right) \]
                      4. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\tan z, \tan y\right), \left(1 - \tan y \cdot \tan z\right)\right), a\right)\right) \]
                      5. tan-lowering-tan.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(z\right), \tan y\right), \left(1 - \tan y \cdot \tan z\right)\right), a\right)\right) \]
                      6. tan-lowering-tan.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{tan.f64}\left(y\right)\right), \left(1 - \tan y \cdot \tan z\right)\right), a\right)\right) \]
                      7. --lowering--.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{tan.f64}\left(y\right)\right), \mathsf{\_.f64}\left(1, \left(\tan y \cdot \tan z\right)\right)\right), a\right)\right) \]
                      8. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{tan.f64}\left(y\right)\right), \mathsf{\_.f64}\left(1, \left(\tan z \cdot \tan y\right)\right)\right), a\right)\right) \]
                      9. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{tan.f64}\left(y\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan z, \tan y\right)\right)\right), a\right)\right) \]
                      10. tan-lowering-tan.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{tan.f64}\left(y\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \tan y\right)\right)\right), a\right)\right) \]
                      11. tan-lowering-tan.f6499.2%

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{tan.f64}\left(y\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(z\right), \mathsf{tan.f64}\left(y\right)\right)\right)\right), a\right)\right) \]
                    3. Applied egg-rr99.2%

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

                    if 0.440000000000000002 < a

                    1. Initial program 79.6%

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                      8. tan-lowering-tan.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                      9. tan-lowering-tan.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                      10. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                      11. tan-lowering-tan.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                      12. tan-lowering-tan.f6499.8%

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                    4. Applied egg-rr99.8%

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

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

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

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

                    Alternative 11: 79.9% accurate, 0.7× speedup?

                    \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ x + \left(\left(\tan z + \tan y\right) - \tan a\right) \end{array} \]
                    NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                    (FPCore (x y z a) :precision binary64 (+ x (- (+ (tan z) (tan y)) (tan a))))
                    assert(x < y && y < z && z < a);
                    double code(double x, double y, double z, double a) {
                    	return x + ((tan(z) + tan(y)) - tan(a));
                    }
                    
                    NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                    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(z) + tan(y)) - tan(a))
                    end function
                    
                    assert x < y && y < z && z < a;
                    public static double code(double x, double y, double z, double a) {
                    	return x + ((Math.tan(z) + Math.tan(y)) - Math.tan(a));
                    }
                    
                    [x, y, z, a] = sort([x, y, z, a])
                    def code(x, y, z, a):
                    	return x + ((math.tan(z) + math.tan(y)) - math.tan(a))
                    
                    x, y, z, a = sort([x, y, z, a])
                    function code(x, y, z, a)
                    	return Float64(x + Float64(Float64(tan(z) + tan(y)) - tan(a)))
                    end
                    
                    x, y, z, a = num2cell(sort([x, y, z, a])){:}
                    function tmp = code(x, y, z, a)
                    	tmp = x + ((tan(z) + tan(y)) - tan(a));
                    end
                    
                    NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                    code[x_, y_, z_, a_] := N[(x + N[(N[(N[Tan[z], $MachinePrecision] + N[Tan[y], $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                    \\
                    x + \left(\left(\tan z + \tan y\right) - \tan a\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 80.7%

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan y, \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                      8. tan-lowering-tan.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                      9. tan-lowering-tan.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \left(\tan y + \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                      10. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\tan y, \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                      11. tan-lowering-tan.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \tan z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                      12. tan-lowering-tan.f6499.7%

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{tan.f64}\left(y\right), \mathsf{tan.f64}\left(z\right)\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                    4. Applied egg-rr99.7%

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

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

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

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

                      Alternative 12: 69.9% accurate, 1.0× speedup?

                      \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} t_0 := x + \left(\tan y - \tan a\right)\\ \mathbf{if}\;a \leq -0.0106:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(\tan \left(z + y\right) + a \cdot \left(-1 - a \cdot \left(a \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                      NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                      (FPCore (x y z a)
                       :precision binary64
                       (let* ((t_0 (+ x (- (tan y) (tan a)))))
                         (if (<= a -0.0106)
                           t_0
                           (if (<= a 0.44)
                             (+ x (+ (tan (+ z y)) (* a (- -1.0 (* a (* a 0.3333333333333333))))))
                             t_0))))
                      assert(x < y && y < z && z < a);
                      double code(double x, double y, double z, double a) {
                      	double t_0 = x + (tan(y) - tan(a));
                      	double tmp;
                      	if (a <= -0.0106) {
                      		tmp = t_0;
                      	} else if (a <= 0.44) {
                      		tmp = x + (tan((z + y)) + (a * (-1.0 - (a * (a * 0.3333333333333333)))));
                      	} else {
                      		tmp = t_0;
                      	}
                      	return tmp;
                      }
                      
                      NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                      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 = x + (tan(y) - tan(a))
                          if (a <= (-0.0106d0)) then
                              tmp = t_0
                          else if (a <= 0.44d0) then
                              tmp = x + (tan((z + y)) + (a * ((-1.0d0) - (a * (a * 0.3333333333333333d0)))))
                          else
                              tmp = t_0
                          end if
                          code = tmp
                      end function
                      
                      assert x < y && y < z && z < a;
                      public static double code(double x, double y, double z, double a) {
                      	double t_0 = x + (Math.tan(y) - Math.tan(a));
                      	double tmp;
                      	if (a <= -0.0106) {
                      		tmp = t_0;
                      	} else if (a <= 0.44) {
                      		tmp = x + (Math.tan((z + y)) + (a * (-1.0 - (a * (a * 0.3333333333333333)))));
                      	} else {
                      		tmp = t_0;
                      	}
                      	return tmp;
                      }
                      
                      [x, y, z, a] = sort([x, y, z, a])
                      def code(x, y, z, a):
                      	t_0 = x + (math.tan(y) - math.tan(a))
                      	tmp = 0
                      	if a <= -0.0106:
                      		tmp = t_0
                      	elif a <= 0.44:
                      		tmp = x + (math.tan((z + y)) + (a * (-1.0 - (a * (a * 0.3333333333333333)))))
                      	else:
                      		tmp = t_0
                      	return tmp
                      
                      x, y, z, a = sort([x, y, z, a])
                      function code(x, y, z, a)
                      	t_0 = Float64(x + Float64(tan(y) - tan(a)))
                      	tmp = 0.0
                      	if (a <= -0.0106)
                      		tmp = t_0;
                      	elseif (a <= 0.44)
                      		tmp = Float64(x + Float64(tan(Float64(z + y)) + Float64(a * Float64(-1.0 - Float64(a * Float64(a * 0.3333333333333333))))));
                      	else
                      		tmp = t_0;
                      	end
                      	return tmp
                      end
                      
                      x, y, z, a = num2cell(sort([x, y, z, a])){:}
                      function tmp_2 = code(x, y, z, a)
                      	t_0 = x + (tan(y) - tan(a));
                      	tmp = 0.0;
                      	if (a <= -0.0106)
                      		tmp = t_0;
                      	elseif (a <= 0.44)
                      		tmp = x + (tan((z + y)) + (a * (-1.0 - (a * (a * 0.3333333333333333)))));
                      	else
                      		tmp = t_0;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, a_] := Block[{t$95$0 = N[(x + N[(N[Tan[y], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.0106], t$95$0, If[LessEqual[a, 0.44], N[(x + N[(N[Tan[N[(z + y), $MachinePrecision]], $MachinePrecision] + N[(a * N[(-1.0 - N[(a * N[(a * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                      
                      \begin{array}{l}
                      [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                      \\
                      \begin{array}{l}
                      t_0 := x + \left(\tan y - \tan a\right)\\
                      \mathbf{if}\;a \leq -0.0106:\\
                      \;\;\;\;t\_0\\
                      
                      \mathbf{elif}\;a \leq 0.44:\\
                      \;\;\;\;x + \left(\tan \left(z + y\right) + a \cdot \left(-1 - a \cdot \left(a \cdot 0.3333333333333333\right)\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_0\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if a < -0.0106 or 0.440000000000000002 < a

                        1. Initial program 80.5%

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

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\color{blue}{y}\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                        4. Step-by-step derivation
                          1. Simplified67.3%

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

                          if -0.0106 < a < 0.440000000000000002

                          1. Initial program 80.8%

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

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

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

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

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

                              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(a \cdot a\right) \cdot \frac{1}{3}\right)\right)\right)\right)\right) \]
                            5. associate-*l*N/A

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

                              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \color{blue}{\left(a \cdot \frac{1}{3}\right)}\right)\right)\right)\right)\right) \]
                            7. *-lowering-*.f6480.8%

                              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\frac{1}{3}}\right)\right)\right)\right)\right)\right) \]
                          5. Simplified80.8%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0106:\\ \;\;\;\;x + \left(\tan y - \tan a\right)\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(\tan \left(z + y\right) + a \cdot \left(-1 - a \cdot \left(a \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\tan y - \tan a\right)\\ \end{array} \]
                        7. Add Preprocessing

                        Alternative 13: 79.4% accurate, 1.0× speedup?

                        \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} \mathbf{if}\;z + y \leq -1 \cdot 10^{-9}:\\ \;\;\;\;x + \left(\tan y - \tan a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\tan z - \tan a\right)\\ \end{array} \end{array} \]
                        NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                        (FPCore (x y z a)
                         :precision binary64
                         (if (<= (+ z y) -1e-9) (+ x (- (tan y) (tan a))) (+ x (- (tan z) (tan a)))))
                        assert(x < y && y < z && z < a);
                        double code(double x, double y, double z, double a) {
                        	double tmp;
                        	if ((z + y) <= -1e-9) {
                        		tmp = x + (tan(y) - tan(a));
                        	} else {
                        		tmp = x + (tan(z) - tan(a));
                        	}
                        	return tmp;
                        }
                        
                        NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                        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 ((z + y) <= (-1d-9)) then
                                tmp = x + (tan(y) - tan(a))
                            else
                                tmp = x + (tan(z) - tan(a))
                            end if
                            code = tmp
                        end function
                        
                        assert x < y && y < z && z < a;
                        public static double code(double x, double y, double z, double a) {
                        	double tmp;
                        	if ((z + y) <= -1e-9) {
                        		tmp = x + (Math.tan(y) - Math.tan(a));
                        	} else {
                        		tmp = x + (Math.tan(z) - Math.tan(a));
                        	}
                        	return tmp;
                        }
                        
                        [x, y, z, a] = sort([x, y, z, a])
                        def code(x, y, z, a):
                        	tmp = 0
                        	if (z + y) <= -1e-9:
                        		tmp = x + (math.tan(y) - math.tan(a))
                        	else:
                        		tmp = x + (math.tan(z) - math.tan(a))
                        	return tmp
                        
                        x, y, z, a = sort([x, y, z, a])
                        function code(x, y, z, a)
                        	tmp = 0.0
                        	if (Float64(z + y) <= -1e-9)
                        		tmp = Float64(x + Float64(tan(y) - tan(a)));
                        	else
                        		tmp = Float64(x + Float64(tan(z) - tan(a)));
                        	end
                        	return tmp
                        end
                        
                        x, y, z, a = num2cell(sort([x, y, z, a])){:}
                        function tmp_2 = code(x, y, z, a)
                        	tmp = 0.0;
                        	if ((z + y) <= -1e-9)
                        		tmp = x + (tan(y) - tan(a));
                        	else
                        		tmp = x + (tan(z) - tan(a));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                        code[x_, y_, z_, a_] := If[LessEqual[N[(z + y), $MachinePrecision], -1e-9], N[(x + N[(N[Tan[y], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[Tan[z], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;z + y \leq -1 \cdot 10^{-9}:\\
                        \;\;\;\;x + \left(\tan y - \tan a\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) < -1.00000000000000006e-9

                          1. Initial program 74.3%

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

                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\color{blue}{y}\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                          4. Step-by-step derivation
                            1. Simplified49.9%

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

                            if -1.00000000000000006e-9 < (+.f64 y z)

                            1. Initial program 85.9%

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

                              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\color{blue}{z}\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                            4. Step-by-step derivation
                              1. Simplified66.7%

                                \[\leadsto x + \left(\tan \color{blue}{z} - \tan a\right) \]
                            5. Recombined 2 regimes into one program.
                            6. Final simplification59.1%

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

                            Alternative 14: 79.5% accurate, 1.0× speedup?

                            \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ x + \left(\tan \left(z + y\right) - \tan a\right) \end{array} \]
                            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                            (FPCore (x y z a) :precision binary64 (+ x (- (tan (+ z y)) (tan a))))
                            assert(x < y && y < z && z < a);
                            double code(double x, double y, double z, double a) {
                            	return x + (tan((z + y)) - tan(a));
                            }
                            
                            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                            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((z + y)) - tan(a))
                            end function
                            
                            assert x < y && y < z && z < a;
                            public static double code(double x, double y, double z, double a) {
                            	return x + (Math.tan((z + y)) - Math.tan(a));
                            }
                            
                            [x, y, z, a] = sort([x, y, z, a])
                            def code(x, y, z, a):
                            	return x + (math.tan((z + y)) - math.tan(a))
                            
                            x, y, z, a = sort([x, y, z, a])
                            function code(x, y, z, a)
                            	return Float64(x + Float64(tan(Float64(z + y)) - tan(a)))
                            end
                            
                            x, y, z, a = num2cell(sort([x, y, z, a])){:}
                            function tmp = code(x, y, z, a)
                            	tmp = x + (tan((z + y)) - tan(a));
                            end
                            
                            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                            code[x_, y_, z_, a_] := N[(x + N[(N[Tan[N[(z + y), $MachinePrecision]], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                            
                            \begin{array}{l}
                            [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                            \\
                            x + \left(\tan \left(z + y\right) - \tan a\right)
                            \end{array}
                            
                            Derivation
                            1. Initial program 80.7%

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

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

                            Alternative 15: 55.8% accurate, 1.7× speedup?

                            \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} t_0 := x + \left(z - \tan a\right)\\ \mathbf{if}\;a \leq -0.17:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;a \leq 0.88:\\ \;\;\;\;x + \left(\tan \left(z + y\right) + a \cdot \left(-1 - a \cdot \left(a \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                            (FPCore (x y z a)
                             :precision binary64
                             (let* ((t_0 (+ x (- z (tan a)))))
                               (if (<= a -0.17)
                                 t_0
                                 (if (<= a 0.88)
                                   (+ x (+ (tan (+ z y)) (* a (- -1.0 (* a (* a 0.3333333333333333))))))
                                   t_0))))
                            assert(x < y && y < z && z < a);
                            double code(double x, double y, double z, double a) {
                            	double t_0 = x + (z - tan(a));
                            	double tmp;
                            	if (a <= -0.17) {
                            		tmp = t_0;
                            	} else if (a <= 0.88) {
                            		tmp = x + (tan((z + y)) + (a * (-1.0 - (a * (a * 0.3333333333333333)))));
                            	} else {
                            		tmp = t_0;
                            	}
                            	return tmp;
                            }
                            
                            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                            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 = x + (z - tan(a))
                                if (a <= (-0.17d0)) then
                                    tmp = t_0
                                else if (a <= 0.88d0) then
                                    tmp = x + (tan((z + y)) + (a * ((-1.0d0) - (a * (a * 0.3333333333333333d0)))))
                                else
                                    tmp = t_0
                                end if
                                code = tmp
                            end function
                            
                            assert x < y && y < z && z < a;
                            public static double code(double x, double y, double z, double a) {
                            	double t_0 = x + (z - Math.tan(a));
                            	double tmp;
                            	if (a <= -0.17) {
                            		tmp = t_0;
                            	} else if (a <= 0.88) {
                            		tmp = x + (Math.tan((z + y)) + (a * (-1.0 - (a * (a * 0.3333333333333333)))));
                            	} else {
                            		tmp = t_0;
                            	}
                            	return tmp;
                            }
                            
                            [x, y, z, a] = sort([x, y, z, a])
                            def code(x, y, z, a):
                            	t_0 = x + (z - math.tan(a))
                            	tmp = 0
                            	if a <= -0.17:
                            		tmp = t_0
                            	elif a <= 0.88:
                            		tmp = x + (math.tan((z + y)) + (a * (-1.0 - (a * (a * 0.3333333333333333)))))
                            	else:
                            		tmp = t_0
                            	return tmp
                            
                            x, y, z, a = sort([x, y, z, a])
                            function code(x, y, z, a)
                            	t_0 = Float64(x + Float64(z - tan(a)))
                            	tmp = 0.0
                            	if (a <= -0.17)
                            		tmp = t_0;
                            	elseif (a <= 0.88)
                            		tmp = Float64(x + Float64(tan(Float64(z + y)) + Float64(a * Float64(-1.0 - Float64(a * Float64(a * 0.3333333333333333))))));
                            	else
                            		tmp = t_0;
                            	end
                            	return tmp
                            end
                            
                            x, y, z, a = num2cell(sort([x, y, z, a])){:}
                            function tmp_2 = code(x, y, z, a)
                            	t_0 = x + (z - tan(a));
                            	tmp = 0.0;
                            	if (a <= -0.17)
                            		tmp = t_0;
                            	elseif (a <= 0.88)
                            		tmp = x + (tan((z + y)) + (a * (-1.0 - (a * (a * 0.3333333333333333)))));
                            	else
                            		tmp = t_0;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                            code[x_, y_, z_, a_] := Block[{t$95$0 = N[(x + N[(z - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.17], t$95$0, If[LessEqual[a, 0.88], N[(x + N[(N[Tan[N[(z + y), $MachinePrecision]], $MachinePrecision] + N[(a * N[(-1.0 - N[(a * N[(a * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                            
                            \begin{array}{l}
                            [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                            \\
                            \begin{array}{l}
                            t_0 := x + \left(z - \tan a\right)\\
                            \mathbf{if}\;a \leq -0.17:\\
                            \;\;\;\;t\_0\\
                            
                            \mathbf{elif}\;a \leq 0.88:\\
                            \;\;\;\;x + \left(\tan \left(z + y\right) + a \cdot \left(-1 - a \cdot \left(a \cdot 0.3333333333333333\right)\right)\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_0\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if a < -0.170000000000000012 or 0.880000000000000004 < a

                              1. Initial program 80.5%

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

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

                                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\sin z, \cos z\right), \mathsf{tan.f64}\left(\color{blue}{a}\right)\right)\right) \]
                                2. sin-lowering-sin.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \cos z\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                3. cos-lowering-cos.f6459.4%

                                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \mathsf{cos.f64}\left(z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                              5. Simplified59.4%

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

                                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\color{blue}{z}, \mathsf{tan.f64}\left(a\right)\right)\right) \]
                              7. Step-by-step derivation
                                1. Simplified37.8%

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

                                if -0.170000000000000012 < a < 0.880000000000000004

                                1. Initial program 80.8%

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

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

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

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

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

                                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(a \cdot a\right) \cdot \frac{1}{3}\right)\right)\right)\right)\right) \]
                                  5. associate-*l*N/A

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

                                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \color{blue}{\left(a \cdot \frac{1}{3}\right)}\right)\right)\right)\right)\right) \]
                                  7. *-lowering-*.f6480.8%

                                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\frac{1}{3}}\right)\right)\right)\right)\right)\right) \]
                                5. Simplified80.8%

                                  \[\leadsto x + \left(\tan \left(y + z\right) - \color{blue}{a \cdot \left(1 + a \cdot \left(a \cdot 0.3333333333333333\right)\right)}\right) \]
                              8. Recombined 2 regimes into one program.
                              9. Final simplification61.5%

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

                              Alternative 16: 55.5% accurate, 1.8× speedup?

                              \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} t_0 := x + \left(z - \tan a\right)\\ \mathbf{if}\;a \leq -1.08 \cdot 10^{+18}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;a \leq 0.48:\\ \;\;\;\;x + \left(\tan \left(z + y\right) - a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                              NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                              (FPCore (x y z a)
                               :precision binary64
                               (let* ((t_0 (+ x (- z (tan a)))))
                                 (if (<= a -1.08e+18) t_0 (if (<= a 0.48) (+ x (- (tan (+ z y)) a)) t_0))))
                              assert(x < y && y < z && z < a);
                              double code(double x, double y, double z, double a) {
                              	double t_0 = x + (z - tan(a));
                              	double tmp;
                              	if (a <= -1.08e+18) {
                              		tmp = t_0;
                              	} else if (a <= 0.48) {
                              		tmp = x + (tan((z + y)) - a);
                              	} else {
                              		tmp = t_0;
                              	}
                              	return tmp;
                              }
                              
                              NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                              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 = x + (z - tan(a))
                                  if (a <= (-1.08d+18)) then
                                      tmp = t_0
                                  else if (a <= 0.48d0) then
                                      tmp = x + (tan((z + y)) - a)
                                  else
                                      tmp = t_0
                                  end if
                                  code = tmp
                              end function
                              
                              assert x < y && y < z && z < a;
                              public static double code(double x, double y, double z, double a) {
                              	double t_0 = x + (z - Math.tan(a));
                              	double tmp;
                              	if (a <= -1.08e+18) {
                              		tmp = t_0;
                              	} else if (a <= 0.48) {
                              		tmp = x + (Math.tan((z + y)) - a);
                              	} else {
                              		tmp = t_0;
                              	}
                              	return tmp;
                              }
                              
                              [x, y, z, a] = sort([x, y, z, a])
                              def code(x, y, z, a):
                              	t_0 = x + (z - math.tan(a))
                              	tmp = 0
                              	if a <= -1.08e+18:
                              		tmp = t_0
                              	elif a <= 0.48:
                              		tmp = x + (math.tan((z + y)) - a)
                              	else:
                              		tmp = t_0
                              	return tmp
                              
                              x, y, z, a = sort([x, y, z, a])
                              function code(x, y, z, a)
                              	t_0 = Float64(x + Float64(z - tan(a)))
                              	tmp = 0.0
                              	if (a <= -1.08e+18)
                              		tmp = t_0;
                              	elseif (a <= 0.48)
                              		tmp = Float64(x + Float64(tan(Float64(z + y)) - a));
                              	else
                              		tmp = t_0;
                              	end
                              	return tmp
                              end
                              
                              x, y, z, a = num2cell(sort([x, y, z, a])){:}
                              function tmp_2 = code(x, y, z, a)
                              	t_0 = x + (z - tan(a));
                              	tmp = 0.0;
                              	if (a <= -1.08e+18)
                              		tmp = t_0;
                              	elseif (a <= 0.48)
                              		tmp = x + (tan((z + y)) - a);
                              	else
                              		tmp = t_0;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                              code[x_, y_, z_, a_] := Block[{t$95$0 = N[(x + N[(z - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.08e+18], t$95$0, If[LessEqual[a, 0.48], N[(x + N[(N[Tan[N[(z + y), $MachinePrecision]], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                              
                              \begin{array}{l}
                              [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                              \\
                              \begin{array}{l}
                              t_0 := x + \left(z - \tan a\right)\\
                              \mathbf{if}\;a \leq -1.08 \cdot 10^{+18}:\\
                              \;\;\;\;t\_0\\
                              
                              \mathbf{elif}\;a \leq 0.48:\\
                              \;\;\;\;x + \left(\tan \left(z + y\right) - a\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_0\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if a < -1.08e18 or 0.47999999999999998 < a

                                1. Initial program 80.2%

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

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

                                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\sin z, \cos z\right), \mathsf{tan.f64}\left(\color{blue}{a}\right)\right)\right) \]
                                  2. sin-lowering-sin.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \cos z\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                  3. cos-lowering-cos.f6460.8%

                                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \mathsf{cos.f64}\left(z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                5. Simplified60.8%

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

                                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\color{blue}{z}, \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                7. Step-by-step derivation
                                  1. Simplified39.1%

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

                                  if -1.08e18 < a < 0.47999999999999998

                                  1. Initial program 81.0%

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

                                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \color{blue}{a}\right)\right) \]
                                  4. Step-by-step derivation
                                    1. Simplified77.4%

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

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

                                  Alternative 17: 44.2% accurate, 1.8× speedup?

                                  \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-8}:\\ \;\;\;\;x + \left(\tan y - a\right)\\ \mathbf{elif}\;y \leq 1.34 \cdot 10^{-253}:\\ \;\;\;\;x + \left(z - \tan a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\tan z - a\right)\\ \end{array} \end{array} \]
                                  NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                  (FPCore (x y z a)
                                   :precision binary64
                                   (if (<= y -4.2e-8)
                                     (+ x (- (tan y) a))
                                     (if (<= y 1.34e-253) (+ x (- z (tan a))) (+ x (- (tan z) a)))))
                                  assert(x < y && y < z && z < a);
                                  double code(double x, double y, double z, double a) {
                                  	double tmp;
                                  	if (y <= -4.2e-8) {
                                  		tmp = x + (tan(y) - a);
                                  	} else if (y <= 1.34e-253) {
                                  		tmp = x + (z - tan(a));
                                  	} else {
                                  		tmp = x + (tan(z) - a);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                  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 <= (-4.2d-8)) then
                                          tmp = x + (tan(y) - a)
                                      else if (y <= 1.34d-253) then
                                          tmp = x + (z - tan(a))
                                      else
                                          tmp = x + (tan(z) - a)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  assert x < y && y < z && z < a;
                                  public static double code(double x, double y, double z, double a) {
                                  	double tmp;
                                  	if (y <= -4.2e-8) {
                                  		tmp = x + (Math.tan(y) - a);
                                  	} else if (y <= 1.34e-253) {
                                  		tmp = x + (z - Math.tan(a));
                                  	} else {
                                  		tmp = x + (Math.tan(z) - a);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  [x, y, z, a] = sort([x, y, z, a])
                                  def code(x, y, z, a):
                                  	tmp = 0
                                  	if y <= -4.2e-8:
                                  		tmp = x + (math.tan(y) - a)
                                  	elif y <= 1.34e-253:
                                  		tmp = x + (z - math.tan(a))
                                  	else:
                                  		tmp = x + (math.tan(z) - a)
                                  	return tmp
                                  
                                  x, y, z, a = sort([x, y, z, a])
                                  function code(x, y, z, a)
                                  	tmp = 0.0
                                  	if (y <= -4.2e-8)
                                  		tmp = Float64(x + Float64(tan(y) - a));
                                  	elseif (y <= 1.34e-253)
                                  		tmp = Float64(x + Float64(z - tan(a)));
                                  	else
                                  		tmp = Float64(x + Float64(tan(z) - a));
                                  	end
                                  	return tmp
                                  end
                                  
                                  x, y, z, a = num2cell(sort([x, y, z, a])){:}
                                  function tmp_2 = code(x, y, z, a)
                                  	tmp = 0.0;
                                  	if (y <= -4.2e-8)
                                  		tmp = x + (tan(y) - a);
                                  	elseif (y <= 1.34e-253)
                                  		tmp = x + (z - tan(a));
                                  	else
                                  		tmp = x + (tan(z) - a);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                  code[x_, y_, z_, a_] := If[LessEqual[y, -4.2e-8], N[(x + N[(N[Tan[y], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.34e-253], N[(x + N[(z - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[Tan[z], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]]]
                                  
                                  \begin{array}{l}
                                  [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;y \leq -4.2 \cdot 10^{-8}:\\
                                  \;\;\;\;x + \left(\tan y - a\right)\\
                                  
                                  \mathbf{elif}\;y \leq 1.34 \cdot 10^{-253}:\\
                                  \;\;\;\;x + \left(z - \tan a\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;x + \left(\tan z - a\right)\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if y < -4.19999999999999989e-8

                                    1. Initial program 63.5%

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

                                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \color{blue}{a}\right)\right) \]
                                    4. Step-by-step derivation
                                      1. Simplified37.4%

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

                                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\color{blue}{y}\right), a\right)\right) \]
                                      3. Step-by-step derivation
                                        1. Simplified37.5%

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

                                        if -4.19999999999999989e-8 < y < 1.34000000000000002e-253

                                        1. Initial program 99.4%

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

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

                                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\sin z, \cos z\right), \mathsf{tan.f64}\left(\color{blue}{a}\right)\right)\right) \]
                                          2. sin-lowering-sin.f64N/A

                                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \cos z\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                          3. cos-lowering-cos.f6499.0%

                                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \mathsf{cos.f64}\left(z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                        5. Simplified99.0%

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

                                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\color{blue}{z}, \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                        7. Step-by-step derivation
                                          1. Simplified56.3%

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

                                          if 1.34000000000000002e-253 < y

                                          1. Initial program 80.1%

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

                                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \color{blue}{a}\right)\right) \]
                                          4. Step-by-step derivation
                                            1. Simplified51.2%

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

                                              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\color{blue}{z}\right), a\right)\right) \]
                                            3. Step-by-step derivation
                                              1. Simplified38.8%

                                                \[\leadsto x + \left(\tan \color{blue}{z} - a\right) \]
                                            4. Recombined 3 regimes into one program.
                                            5. Add Preprocessing

                                            Alternative 18: 46.3% accurate, 1.8× speedup?

                                            \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} t_0 := x + \left(z - \tan a\right)\\ \mathbf{if}\;a \leq -1.08 \cdot 10^{+18}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;a \leq 0.44:\\ \;\;\;\;x + \left(\tan y - a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                            (FPCore (x y z a)
                                             :precision binary64
                                             (let* ((t_0 (+ x (- z (tan a)))))
                                               (if (<= a -1.08e+18) t_0 (if (<= a 0.44) (+ x (- (tan y) a)) t_0))))
                                            assert(x < y && y < z && z < a);
                                            double code(double x, double y, double z, double a) {
                                            	double t_0 = x + (z - tan(a));
                                            	double tmp;
                                            	if (a <= -1.08e+18) {
                                            		tmp = t_0;
                                            	} else if (a <= 0.44) {
                                            		tmp = x + (tan(y) - a);
                                            	} else {
                                            		tmp = t_0;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                            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 = x + (z - tan(a))
                                                if (a <= (-1.08d+18)) then
                                                    tmp = t_0
                                                else if (a <= 0.44d0) then
                                                    tmp = x + (tan(y) - a)
                                                else
                                                    tmp = t_0
                                                end if
                                                code = tmp
                                            end function
                                            
                                            assert x < y && y < z && z < a;
                                            public static double code(double x, double y, double z, double a) {
                                            	double t_0 = x + (z - Math.tan(a));
                                            	double tmp;
                                            	if (a <= -1.08e+18) {
                                            		tmp = t_0;
                                            	} else if (a <= 0.44) {
                                            		tmp = x + (Math.tan(y) - a);
                                            	} else {
                                            		tmp = t_0;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            [x, y, z, a] = sort([x, y, z, a])
                                            def code(x, y, z, a):
                                            	t_0 = x + (z - math.tan(a))
                                            	tmp = 0
                                            	if a <= -1.08e+18:
                                            		tmp = t_0
                                            	elif a <= 0.44:
                                            		tmp = x + (math.tan(y) - a)
                                            	else:
                                            		tmp = t_0
                                            	return tmp
                                            
                                            x, y, z, a = sort([x, y, z, a])
                                            function code(x, y, z, a)
                                            	t_0 = Float64(x + Float64(z - tan(a)))
                                            	tmp = 0.0
                                            	if (a <= -1.08e+18)
                                            		tmp = t_0;
                                            	elseif (a <= 0.44)
                                            		tmp = Float64(x + Float64(tan(y) - a));
                                            	else
                                            		tmp = t_0;
                                            	end
                                            	return tmp
                                            end
                                            
                                            x, y, z, a = num2cell(sort([x, y, z, a])){:}
                                            function tmp_2 = code(x, y, z, a)
                                            	t_0 = x + (z - tan(a));
                                            	tmp = 0.0;
                                            	if (a <= -1.08e+18)
                                            		tmp = t_0;
                                            	elseif (a <= 0.44)
                                            		tmp = x + (tan(y) - a);
                                            	else
                                            		tmp = t_0;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                            code[x_, y_, z_, a_] := Block[{t$95$0 = N[(x + N[(z - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.08e+18], t$95$0, If[LessEqual[a, 0.44], N[(x + N[(N[Tan[y], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                                            
                                            \begin{array}{l}
                                            [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                                            \\
                                            \begin{array}{l}
                                            t_0 := x + \left(z - \tan a\right)\\
                                            \mathbf{if}\;a \leq -1.08 \cdot 10^{+18}:\\
                                            \;\;\;\;t\_0\\
                                            
                                            \mathbf{elif}\;a \leq 0.44:\\
                                            \;\;\;\;x + \left(\tan y - a\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_0\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if a < -1.08e18 or 0.440000000000000002 < a

                                              1. Initial program 80.2%

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

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

                                                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\sin z, \cos z\right), \mathsf{tan.f64}\left(\color{blue}{a}\right)\right)\right) \]
                                                2. sin-lowering-sin.f64N/A

                                                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \cos z\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                                3. cos-lowering-cos.f6460.8%

                                                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \mathsf{cos.f64}\left(z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                              5. Simplified60.8%

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

                                                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\color{blue}{z}, \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                              7. Step-by-step derivation
                                                1. Simplified39.1%

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

                                                if -1.08e18 < a < 0.440000000000000002

                                                1. Initial program 81.0%

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

                                                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\mathsf{+.f64}\left(y, z\right)\right), \color{blue}{a}\right)\right) \]
                                                4. Step-by-step derivation
                                                  1. Simplified77.4%

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

                                                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{tan.f64}\left(\color{blue}{y}\right), a\right)\right) \]
                                                  3. Step-by-step derivation
                                                    1. Simplified59.5%

                                                      \[\leadsto x + \left(\tan \color{blue}{y} - a\right) \]
                                                  4. Recombined 2 regimes into one program.
                                                  5. Add Preprocessing

                                                  Alternative 19: 41.6% accurate, 1.8× speedup?

                                                  \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-5}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-5}:\\ \;\;\;\;x + \left(z - \tan a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \sin z\\ \end{array} \end{array} \]
                                                  NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                                  (FPCore (x y z a)
                                                   :precision binary64
                                                   (if (<= z -5.5e-5) x (if (<= z 3.5e-5) (+ x (- z (tan a))) (+ x (sin z)))))
                                                  assert(x < y && y < z && z < a);
                                                  double code(double x, double y, double z, double a) {
                                                  	double tmp;
                                                  	if (z <= -5.5e-5) {
                                                  		tmp = x;
                                                  	} else if (z <= 3.5e-5) {
                                                  		tmp = x + (z - tan(a));
                                                  	} else {
                                                  		tmp = x + sin(z);
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                                  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 (z <= (-5.5d-5)) then
                                                          tmp = x
                                                      else if (z <= 3.5d-5) then
                                                          tmp = x + (z - tan(a))
                                                      else
                                                          tmp = x + sin(z)
                                                      end if
                                                      code = tmp
                                                  end function
                                                  
                                                  assert x < y && y < z && z < a;
                                                  public static double code(double x, double y, double z, double a) {
                                                  	double tmp;
                                                  	if (z <= -5.5e-5) {
                                                  		tmp = x;
                                                  	} else if (z <= 3.5e-5) {
                                                  		tmp = x + (z - Math.tan(a));
                                                  	} else {
                                                  		tmp = x + Math.sin(z);
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  [x, y, z, a] = sort([x, y, z, a])
                                                  def code(x, y, z, a):
                                                  	tmp = 0
                                                  	if z <= -5.5e-5:
                                                  		tmp = x
                                                  	elif z <= 3.5e-5:
                                                  		tmp = x + (z - math.tan(a))
                                                  	else:
                                                  		tmp = x + math.sin(z)
                                                  	return tmp
                                                  
                                                  x, y, z, a = sort([x, y, z, a])
                                                  function code(x, y, z, a)
                                                  	tmp = 0.0
                                                  	if (z <= -5.5e-5)
                                                  		tmp = x;
                                                  	elseif (z <= 3.5e-5)
                                                  		tmp = Float64(x + Float64(z - tan(a)));
                                                  	else
                                                  		tmp = Float64(x + sin(z));
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  x, y, z, a = num2cell(sort([x, y, z, a])){:}
                                                  function tmp_2 = code(x, y, z, a)
                                                  	tmp = 0.0;
                                                  	if (z <= -5.5e-5)
                                                  		tmp = x;
                                                  	elseif (z <= 3.5e-5)
                                                  		tmp = x + (z - tan(a));
                                                  	else
                                                  		tmp = x + sin(z);
                                                  	end
                                                  	tmp_2 = tmp;
                                                  end
                                                  
                                                  NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                                  code[x_, y_, z_, a_] := If[LessEqual[z, -5.5e-5], x, If[LessEqual[z, 3.5e-5], N[(x + N[(z - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[Sin[z], $MachinePrecision]), $MachinePrecision]]]
                                                  
                                                  \begin{array}{l}
                                                  [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;z \leq -5.5 \cdot 10^{-5}:\\
                                                  \;\;\;\;x\\
                                                  
                                                  \mathbf{elif}\;z \leq 3.5 \cdot 10^{-5}:\\
                                                  \;\;\;\;x + \left(z - \tan a\right)\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;x + \sin z\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 3 regimes
                                                  2. if z < -5.5000000000000002e-5

                                                    1. Initial program 60.6%

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

                                                      \[\leadsto \color{blue}{x} \]
                                                    4. Step-by-step derivation
                                                      1. Simplified22.8%

                                                        \[\leadsto \color{blue}{x} \]

                                                      if -5.5000000000000002e-5 < z < 3.4999999999999997e-5

                                                      1. Initial program 99.6%

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

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

                                                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\sin z, \cos z\right), \mathsf{tan.f64}\left(\color{blue}{a}\right)\right)\right) \]
                                                        2. sin-lowering-sin.f64N/A

                                                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \cos z\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                                        3. cos-lowering-cos.f6460.2%

                                                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \mathsf{cos.f64}\left(z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                                      5. Simplified60.2%

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

                                                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\color{blue}{z}, \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                                      7. Step-by-step derivation
                                                        1. Simplified60.2%

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

                                                        if 3.4999999999999997e-5 < z

                                                        1. Initial program 53.3%

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

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

                                                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\sin z, \cos z\right), \mathsf{tan.f64}\left(\color{blue}{a}\right)\right)\right) \]
                                                          2. sin-lowering-sin.f64N/A

                                                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \cos z\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                                          3. cos-lowering-cos.f6452.5%

                                                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \mathsf{cos.f64}\left(z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                                        5. Simplified52.5%

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

                                                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \color{blue}{1}\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                                        7. Step-by-step derivation
                                                          1. Simplified24.0%

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

                                                            \[\leadsto \color{blue}{x + \sin z} \]
                                                          3. Step-by-step derivation
                                                            1. +-commutativeN/A

                                                              \[\leadsto \sin z + \color{blue}{x} \]
                                                            2. +-lowering-+.f64N/A

                                                              \[\leadsto \mathsf{+.f64}\left(\sin z, \color{blue}{x}\right) \]
                                                            3. sin-lowering-sin.f6422.8%

                                                              \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(z\right), x\right) \]
                                                          4. Simplified22.8%

                                                            \[\leadsto \color{blue}{\sin z + x} \]
                                                        8. Recombined 3 regimes into one program.
                                                        9. Final simplification43.3%

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

                                                        Alternative 20: 31.7% accurate, 2.0× speedup?

                                                        \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ x + \sin z \end{array} \]
                                                        NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                                        (FPCore (x y z a) :precision binary64 (+ x (sin z)))
                                                        assert(x < y && y < z && z < a);
                                                        double code(double x, double y, double z, double a) {
                                                        	return x + sin(z);
                                                        }
                                                        
                                                        NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                                        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 + sin(z)
                                                        end function
                                                        
                                                        assert x < y && y < z && z < a;
                                                        public static double code(double x, double y, double z, double a) {
                                                        	return x + Math.sin(z);
                                                        }
                                                        
                                                        [x, y, z, a] = sort([x, y, z, a])
                                                        def code(x, y, z, a):
                                                        	return x + math.sin(z)
                                                        
                                                        x, y, z, a = sort([x, y, z, a])
                                                        function code(x, y, z, a)
                                                        	return Float64(x + sin(z))
                                                        end
                                                        
                                                        x, y, z, a = num2cell(sort([x, y, z, a])){:}
                                                        function tmp = code(x, y, z, a)
                                                        	tmp = x + sin(z);
                                                        end
                                                        
                                                        NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                                        code[x_, y_, z_, a_] := N[(x + N[Sin[z], $MachinePrecision]), $MachinePrecision]
                                                        
                                                        \begin{array}{l}
                                                        [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                                                        \\
                                                        x + \sin z
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Initial program 80.7%

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

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

                                                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\sin z, \cos z\right), \mathsf{tan.f64}\left(\color{blue}{a}\right)\right)\right) \]
                                                          2. sin-lowering-sin.f64N/A

                                                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \cos z\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                                          3. cos-lowering-cos.f6459.0%

                                                            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \mathsf{cos.f64}\left(z\right)\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                                        5. Simplified59.0%

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

                                                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(z\right), \color{blue}{1}\right), \mathsf{tan.f64}\left(a\right)\right)\right) \]
                                                        7. Step-by-step derivation
                                                          1. Simplified44.0%

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

                                                            \[\leadsto \color{blue}{x + \sin z} \]
                                                          3. Step-by-step derivation
                                                            1. +-commutativeN/A

                                                              \[\leadsto \sin z + \color{blue}{x} \]
                                                            2. +-lowering-+.f64N/A

                                                              \[\leadsto \mathsf{+.f64}\left(\sin z, \color{blue}{x}\right) \]
                                                            3. sin-lowering-sin.f6432.7%

                                                              \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(z\right), x\right) \]
                                                          4. Simplified32.7%

                                                            \[\leadsto \color{blue}{\sin z + x} \]
                                                          5. Final simplification32.7%

                                                            \[\leadsto x + \sin z \]
                                                          6. Add Preprocessing

                                                          Alternative 21: 31.5% accurate, 207.0× speedup?

                                                          \[\begin{array}{l} [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\ \\ x \end{array} \]
                                                          NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                                          (FPCore (x y z a) :precision binary64 x)
                                                          assert(x < y && y < z && z < a);
                                                          double code(double x, double y, double z, double a) {
                                                          	return x;
                                                          }
                                                          
                                                          NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                                          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
                                                          end function
                                                          
                                                          assert x < y && y < z && z < a;
                                                          public static double code(double x, double y, double z, double a) {
                                                          	return x;
                                                          }
                                                          
                                                          [x, y, z, a] = sort([x, y, z, a])
                                                          def code(x, y, z, a):
                                                          	return x
                                                          
                                                          x, y, z, a = sort([x, y, z, a])
                                                          function code(x, y, z, a)
                                                          	return x
                                                          end
                                                          
                                                          x, y, z, a = num2cell(sort([x, y, z, a])){:}
                                                          function tmp = code(x, y, z, a)
                                                          	tmp = x;
                                                          end
                                                          
                                                          NOTE: x, y, z, and a should be sorted in increasing order before calling this function.
                                                          code[x_, y_, z_, a_] := x
                                                          
                                                          \begin{array}{l}
                                                          [x, y, z, a] = \mathsf{sort}([x, y, z, a])\\
                                                          \\
                                                          x
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Initial program 80.7%

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

                                                            \[\leadsto \color{blue}{x} \]
                                                          4. Step-by-step derivation
                                                            1. Simplified32.0%

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

                                                            Reproduce

                                                            ?
                                                            herbie shell --seed 2024141 
                                                            (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))))