
(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:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (x y z a) :precision binary64 (+ x (- (/ (+ (tan y) (tan z)) (- (fma (tan y) (tan z) -1.0))) (tan a))))
double code(double x, double y, double z, double a) {
return x + (((tan(y) + tan(z)) / -fma(tan(y), tan(z), -1.0)) - tan(a));
}
function code(x, y, z, a) return Float64(x + Float64(Float64(Float64(tan(y) + tan(z)) / Float64(-fma(tan(y), tan(z), -1.0))) - tan(a))) end
code[x_, y_, z_, a_] := N[(x + N[(N[(N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision] / (-N[(N[Tan[y], $MachinePrecision] * N[Tan[z], $MachinePrecision] + -1.0), $MachinePrecision])), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\frac{\tan y + \tan z}{-\mathsf{fma}\left(\tan y, \tan z, -1\right)} - \tan a\right)
\end{array}
Initial program 80.3%
tan-sum99.7%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
expm1-log1p-u93.8%
expm1-udef93.8%
log1p-udef93.8%
add-exp-log99.6%
Applied egg-rr99.6%
associate--l+99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
sub-neg99.7%
associate--r+99.7%
metadata-eval99.7%
Applied egg-rr99.7%
sub-neg99.7%
sub0-neg99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z a) :precision binary64 (+ x (- (/ (+ (tan y) (tan z)) (- 1.0 (* (tan y) (tan z)))) (tan a))))
double code(double x, double y, double z, double a) {
return x + (((tan(y) + tan(z)) / (1.0 - (tan(y) * tan(z)))) - tan(a));
}
real(8) function code(x, y, z, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: a
code = x + (((tan(y) + tan(z)) / (1.0d0 - (tan(y) * tan(z)))) - tan(a))
end function
public static double code(double x, double y, double z, double a) {
return x + (((Math.tan(y) + Math.tan(z)) / (1.0 - (Math.tan(y) * Math.tan(z)))) - Math.tan(a));
}
def code(x, y, z, a): return x + (((math.tan(y) + math.tan(z)) / (1.0 - (math.tan(y) * math.tan(z)))) - math.tan(a))
function code(x, y, z, a) return Float64(x + Float64(Float64(Float64(tan(y) + tan(z)) / Float64(1.0 - Float64(tan(y) * tan(z)))) - tan(a))) end
function tmp = code(x, y, z, a) tmp = x + (((tan(y) + tan(z)) / (1.0 - (tan(y) * tan(z)))) - tan(a)); end
code[x_, y_, z_, a_] := N[(x + N[(N[(N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(N[Tan[y], $MachinePrecision] * N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - \tan a\right)
\end{array}
Initial program 80.3%
tan-sum99.7%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z a)
:precision binary64
(let* ((t_0 (+ (tan y) (tan z))))
(if (or (<= a -6.5e-9) (not (<= a 2.9e-31)))
(+ x (- t_0 (tan a)))
(+ x (/ t_0 (- 1.0 (* (tan y) (tan z))))))))
double code(double x, double y, double z, double a) {
double t_0 = tan(y) + tan(z);
double tmp;
if ((a <= -6.5e-9) || !(a <= 2.9e-31)) {
tmp = x + (t_0 - tan(a));
} else {
tmp = x + (t_0 / (1.0 - (tan(y) * tan(z))));
}
return tmp;
}
real(8) function code(x, y, z, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: a
real(8) :: t_0
real(8) :: tmp
t_0 = tan(y) + tan(z)
if ((a <= (-6.5d-9)) .or. (.not. (a <= 2.9d-31))) then
tmp = x + (t_0 - tan(a))
else
tmp = x + (t_0 / (1.0d0 - (tan(y) * tan(z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double t_0 = Math.tan(y) + Math.tan(z);
double tmp;
if ((a <= -6.5e-9) || !(a <= 2.9e-31)) {
tmp = x + (t_0 - Math.tan(a));
} else {
tmp = x + (t_0 / (1.0 - (Math.tan(y) * Math.tan(z))));
}
return tmp;
}
def code(x, y, z, a): t_0 = math.tan(y) + math.tan(z) tmp = 0 if (a <= -6.5e-9) or not (a <= 2.9e-31): tmp = x + (t_0 - math.tan(a)) else: tmp = x + (t_0 / (1.0 - (math.tan(y) * math.tan(z)))) return tmp
function code(x, y, z, a) t_0 = Float64(tan(y) + tan(z)) tmp = 0.0 if ((a <= -6.5e-9) || !(a <= 2.9e-31)) tmp = Float64(x + Float64(t_0 - tan(a))); else tmp = Float64(x + Float64(t_0 / Float64(1.0 - Float64(tan(y) * tan(z))))); end return tmp end
function tmp_2 = code(x, y, z, a) t_0 = tan(y) + tan(z); tmp = 0.0; if ((a <= -6.5e-9) || ~((a <= 2.9e-31))) tmp = x + (t_0 - tan(a)); else tmp = x + (t_0 / (1.0 - (tan(y) * tan(z)))); end tmp_2 = tmp; end
code[x_, y_, z_, a_] := Block[{t$95$0 = N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -6.5e-9], N[Not[LessEqual[a, 2.9e-31]], $MachinePrecision]], N[(x + N[(t$95$0 - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$0 / N[(1.0 - N[(N[Tan[y], $MachinePrecision] * N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan y + \tan z\\
\mathbf{if}\;a \leq -6.5 \cdot 10^{-9} \lor \neg \left(a \leq 2.9 \cdot 10^{-31}\right):\\
\;\;\;\;x + \left(t_0 - \tan a\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t_0}{1 - \tan y \cdot \tan z}\\
\end{array}
\end{array}
if a < -6.5000000000000003e-9 or 2.9000000000000001e-31 < a Initial program 78.3%
tan-sum99.6%
div-inv99.6%
Applied egg-rr99.6%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in y around 0 78.8%
if -6.5000000000000003e-9 < a < 2.9000000000000001e-31Initial program 82.4%
+-commutative82.4%
associate-+l-82.4%
Applied egg-rr82.4%
Taylor expanded in a around 0 82.4%
neg-mul-182.4%
Simplified82.4%
sub-neg82.4%
Applied egg-rr82.4%
remove-double-neg82.4%
+-commutative82.4%
+-commutative82.4%
Simplified82.4%
tan-sum99.7%
+-commutative99.7%
Applied egg-rr99.7%
Final simplification88.9%
(FPCore (x y z a) :precision binary64 (+ x (- (+ (tan y) (tan z)) (tan a))))
double code(double x, double y, double z, double a) {
return x + ((tan(y) + tan(z)) - tan(a));
}
real(8) function code(x, y, z, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: a
code = x + ((tan(y) + tan(z)) - tan(a))
end function
public static double code(double x, double y, double z, double a) {
return x + ((Math.tan(y) + Math.tan(z)) - Math.tan(a));
}
def code(x, y, z, a): return x + ((math.tan(y) + math.tan(z)) - math.tan(a))
function code(x, y, z, a) return Float64(x + Float64(Float64(tan(y) + tan(z)) - tan(a))) end
function tmp = code(x, y, z, a) tmp = x + ((tan(y) + tan(z)) - tan(a)); end
code[x_, y_, z_, a_] := N[(x + N[(N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(\tan y + \tan z\right) - \tan a\right)
\end{array}
Initial program 80.3%
tan-sum99.7%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in y around 0 80.7%
Final simplification80.7%
(FPCore (x y z a) :precision binary64 (if (<= (+ y z) 4e-41) (+ x (- (tan y) (tan a))) (+ x (tan (+ y z)))))
double code(double x, double y, double z, double a) {
double tmp;
if ((y + z) <= 4e-41) {
tmp = x + (tan(y) - tan(a));
} else {
tmp = x + tan((y + z));
}
return tmp;
}
real(8) function code(x, y, z, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: a
real(8) :: tmp
if ((y + z) <= 4d-41) then
tmp = x + (tan(y) - tan(a))
else
tmp = x + tan((y + z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double tmp;
if ((y + z) <= 4e-41) {
tmp = x + (Math.tan(y) - Math.tan(a));
} else {
tmp = x + Math.tan((y + z));
}
return tmp;
}
def code(x, y, z, a): tmp = 0 if (y + z) <= 4e-41: tmp = x + (math.tan(y) - math.tan(a)) else: tmp = x + math.tan((y + z)) return tmp
function code(x, y, z, a) tmp = 0.0 if (Float64(y + z) <= 4e-41) tmp = Float64(x + Float64(tan(y) - tan(a))); else tmp = Float64(x + tan(Float64(y + z))); end return tmp end
function tmp_2 = code(x, y, z, a) tmp = 0.0; if ((y + z) <= 4e-41) tmp = x + (tan(y) - tan(a)); else tmp = x + tan((y + z)); end tmp_2 = tmp; end
code[x_, y_, z_, a_] := If[LessEqual[N[(y + z), $MachinePrecision], 4e-41], N[(x + N[(N[Tan[y], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + z \leq 4 \cdot 10^{-41}:\\
\;\;\;\;x + \left(\tan y - \tan a\right)\\
\mathbf{else}:\\
\;\;\;\;x + \tan \left(y + z\right)\\
\end{array}
\end{array}
if (+.f64 y z) < 4.00000000000000002e-41Initial program 83.5%
Taylor expanded in z around 0 66.1%
tan-quot66.1%
*-un-lft-identity66.1%
Applied egg-rr66.1%
*-lft-identity66.1%
Simplified66.1%
if 4.00000000000000002e-41 < (+.f64 y z) Initial program 73.8%
+-commutative73.8%
associate-+l-73.7%
Applied egg-rr73.7%
Taylor expanded in a around 0 47.7%
neg-mul-147.7%
Simplified47.7%
sub-neg47.7%
Applied egg-rr47.7%
remove-double-neg47.7%
+-commutative47.7%
+-commutative47.7%
Simplified47.7%
Final simplification60.0%
(FPCore (x y z a) :precision binary64 (if (<= (+ y z) 4e-41) (+ x (- (tan y) (tan a))) (+ x (/ (sin z) (cos z)))))
double code(double x, double y, double z, double a) {
double tmp;
if ((y + z) <= 4e-41) {
tmp = x + (tan(y) - tan(a));
} else {
tmp = x + (sin(z) / cos(z));
}
return tmp;
}
real(8) function code(x, y, z, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: a
real(8) :: tmp
if ((y + z) <= 4d-41) then
tmp = x + (tan(y) - tan(a))
else
tmp = x + (sin(z) / cos(z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double tmp;
if ((y + z) <= 4e-41) {
tmp = x + (Math.tan(y) - Math.tan(a));
} else {
tmp = x + (Math.sin(z) / Math.cos(z));
}
return tmp;
}
def code(x, y, z, a): tmp = 0 if (y + z) <= 4e-41: tmp = x + (math.tan(y) - math.tan(a)) else: tmp = x + (math.sin(z) / math.cos(z)) return tmp
function code(x, y, z, a) tmp = 0.0 if (Float64(y + z) <= 4e-41) tmp = Float64(x + Float64(tan(y) - tan(a))); else tmp = Float64(x + Float64(sin(z) / cos(z))); end return tmp end
function tmp_2 = code(x, y, z, a) tmp = 0.0; if ((y + z) <= 4e-41) tmp = x + (tan(y) - tan(a)); else tmp = x + (sin(z) / cos(z)); end tmp_2 = tmp; end
code[x_, y_, z_, a_] := If[LessEqual[N[(y + z), $MachinePrecision], 4e-41], N[(x + N[(N[Tan[y], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[Sin[z], $MachinePrecision] / N[Cos[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + z \leq 4 \cdot 10^{-41}:\\
\;\;\;\;x + \left(\tan y - \tan a\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\sin z}{\cos z}\\
\end{array}
\end{array}
if (+.f64 y z) < 4.00000000000000002e-41Initial program 83.5%
Taylor expanded in z around 0 66.1%
tan-quot66.1%
*-un-lft-identity66.1%
Applied egg-rr66.1%
*-lft-identity66.1%
Simplified66.1%
if 4.00000000000000002e-41 < (+.f64 y z) Initial program 73.8%
+-commutative73.8%
associate-+l-73.7%
Applied egg-rr73.7%
Taylor expanded in a around 0 47.7%
neg-mul-147.7%
Simplified47.7%
Taylor expanded in y around 0 32.7%
Final simplification55.0%
(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}
Initial program 80.3%
Final simplification80.3%
(FPCore (x y z a) :precision binary64 (if (or (<= (+ y z) -200000000.0) (not (<= (+ y z) 4e-41))) (+ x (tan (+ y z))) (+ x (- y (tan a)))))
double code(double x, double y, double z, double a) {
double tmp;
if (((y + z) <= -200000000.0) || !((y + z) <= 4e-41)) {
tmp = x + tan((y + z));
} else {
tmp = x + (y - tan(a));
}
return tmp;
}
real(8) function code(x, y, z, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: a
real(8) :: tmp
if (((y + z) <= (-200000000.0d0)) .or. (.not. ((y + z) <= 4d-41))) then
tmp = x + tan((y + z))
else
tmp = x + (y - tan(a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double tmp;
if (((y + z) <= -200000000.0) || !((y + z) <= 4e-41)) {
tmp = x + Math.tan((y + z));
} else {
tmp = x + (y - Math.tan(a));
}
return tmp;
}
def code(x, y, z, a): tmp = 0 if ((y + z) <= -200000000.0) or not ((y + z) <= 4e-41): tmp = x + math.tan((y + z)) else: tmp = x + (y - math.tan(a)) return tmp
function code(x, y, z, a) tmp = 0.0 if ((Float64(y + z) <= -200000000.0) || !(Float64(y + z) <= 4e-41)) tmp = Float64(x + tan(Float64(y + z))); else tmp = Float64(x + Float64(y - tan(a))); end return tmp end
function tmp_2 = code(x, y, z, a) tmp = 0.0; if (((y + z) <= -200000000.0) || ~(((y + z) <= 4e-41))) tmp = x + tan((y + z)); else tmp = x + (y - tan(a)); end tmp_2 = tmp; end
code[x_, y_, z_, a_] := If[Or[LessEqual[N[(y + z), $MachinePrecision], -200000000.0], N[Not[LessEqual[N[(y + z), $MachinePrecision], 4e-41]], $MachinePrecision]], N[(x + N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + z \leq -200000000 \lor \neg \left(y + z \leq 4 \cdot 10^{-41}\right):\\
\;\;\;\;x + \tan \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - \tan a\right)\\
\end{array}
\end{array}
if (+.f64 y z) < -2e8 or 4.00000000000000002e-41 < (+.f64 y z) Initial program 74.2%
+-commutative74.2%
associate-+l-74.1%
Applied egg-rr74.1%
Taylor expanded in a around 0 48.4%
neg-mul-148.4%
Simplified48.4%
sub-neg48.4%
Applied egg-rr48.4%
remove-double-neg48.4%
+-commutative48.4%
+-commutative48.4%
Simplified48.4%
if -2e8 < (+.f64 y z) < 4.00000000000000002e-41Initial program 99.8%
Taylor expanded in z around 0 98.4%
Taylor expanded in y around 0 98.4%
Final simplification60.3%
(FPCore (x y z a) :precision binary64 (+ x (tan (+ y z))))
double code(double x, double y, double z, double a) {
return x + tan((y + z));
}
real(8) function code(x, y, z, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: a
code = x + tan((y + z))
end function
public static double code(double x, double y, double z, double a) {
return x + Math.tan((y + z));
}
def code(x, y, z, a): return x + math.tan((y + z))
function code(x, y, z, a) return Float64(x + tan(Float64(y + z))) end
function tmp = code(x, y, z, a) tmp = x + tan((y + z)); end
code[x_, y_, z_, a_] := N[(x + N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \tan \left(y + z\right)
\end{array}
Initial program 80.3%
+-commutative80.3%
associate-+l-80.2%
Applied egg-rr80.2%
Taylor expanded in a around 0 53.8%
neg-mul-153.8%
Simplified53.8%
sub-neg53.8%
Applied egg-rr53.8%
remove-double-neg53.8%
+-commutative53.8%
+-commutative53.8%
Simplified53.8%
Final simplification53.8%
(FPCore (x y z a) :precision binary64 x)
double code(double x, double y, double z, double a) {
return x;
}
real(8) function code(x, y, z, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double a) {
return x;
}
def code(x, y, z, a): return x
function code(x, y, z, a) return x end
function tmp = code(x, y, z, a) tmp = x; end
code[x_, y_, z_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 80.3%
Taylor expanded in x around inf 33.8%
Final simplification33.8%
herbie shell --seed 2023195
(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))))