
(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 14 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
(let* ((t_0 (* (tan y) (tan z))))
(+
x
(-
(* (/ (+ (tan y) (tan z)) (- 1.0 (pow t_0 2.0))) (+ 1.0 t_0))
(tan a)))))
double code(double x, double y, double z, double a) {
double t_0 = tan(y) * tan(z);
return x + ((((tan(y) + tan(z)) / (1.0 - pow(t_0, 2.0))) * (1.0 + t_0)) - tan(a));
}
real(8) function code(x, y, z, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: a
real(8) :: t_0
t_0 = tan(y) * tan(z)
code = x + ((((tan(y) + tan(z)) / (1.0d0 - (t_0 ** 2.0d0))) * (1.0d0 + t_0)) - tan(a))
end function
public static double code(double x, double y, double z, double a) {
double t_0 = Math.tan(y) * Math.tan(z);
return x + ((((Math.tan(y) + Math.tan(z)) / (1.0 - Math.pow(t_0, 2.0))) * (1.0 + t_0)) - Math.tan(a));
}
def code(x, y, z, a): t_0 = math.tan(y) * math.tan(z) return x + ((((math.tan(y) + math.tan(z)) / (1.0 - math.pow(t_0, 2.0))) * (1.0 + t_0)) - math.tan(a))
function code(x, y, z, a) t_0 = Float64(tan(y) * tan(z)) return Float64(x + Float64(Float64(Float64(Float64(tan(y) + tan(z)) / Float64(1.0 - (t_0 ^ 2.0))) * Float64(1.0 + t_0)) - tan(a))) end
function tmp = code(x, y, z, a) t_0 = tan(y) * tan(z); tmp = x + ((((tan(y) + tan(z)) / (1.0 - (t_0 ^ 2.0))) * (1.0 + t_0)) - tan(a)); end
code[x_, y_, z_, a_] := Block[{t$95$0 = N[(N[Tan[y], $MachinePrecision] * N[Tan[z], $MachinePrecision]), $MachinePrecision]}, N[(x + N[(N[(N[(N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan y \cdot \tan z\\
x + \left(\frac{\tan y + \tan z}{1 - {t\_0}^{2}} \cdot \left(1 + t\_0\right) - \tan a\right)
\end{array}
\end{array}
Initial program 79.4%
tan-sumN/A
flip--N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
(FPCore (x y z a) :precision binary64 (+ x (- (/ (+ (tan y) (tan z)) (- 1.0 (/ (* (tan y) (sin z)) (cos z)))) (tan a))))
double code(double x, double y, double z, double a) {
return x + (((tan(y) + tan(z)) / (1.0 - ((tan(y) * sin(z)) / cos(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) * sin(z)) / cos(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.sin(z)) / Math.cos(z)))) - Math.tan(a));
}
def code(x, y, z, a): return x + (((math.tan(y) + math.tan(z)) / (1.0 - ((math.tan(y) * math.sin(z)) / math.cos(z)))) - math.tan(a))
function code(x, y, z, a) return Float64(x + Float64(Float64(Float64(tan(y) + tan(z)) / Float64(1.0 - Float64(Float64(tan(y) * sin(z)) / cos(z)))) - tan(a))) end
function tmp = code(x, y, z, a) tmp = x + (((tan(y) + tan(z)) / (1.0 - ((tan(y) * sin(z)) / cos(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[(N[Tan[y], $MachinePrecision] * N[Sin[z], $MachinePrecision]), $MachinePrecision] / N[Cos[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\frac{\tan y + \tan z}{1 - \frac{\tan y \cdot \sin z}{\cos z}} - \tan a\right)
\end{array}
Initial program 79.4%
tan-sumN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.8%
Applied egg-rr99.8%
tan-quotN/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
sin-lowering-sin.f64N/A
cos-lowering-cos.f6499.8%
Applied egg-rr99.8%
(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 79.4%
tan-sumN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.8%
Applied egg-rr99.8%
(FPCore (x y z a)
:precision binary64
(if (<= a -2.6e-19)
(+ x (- (/ (sin (+ y z)) (* (cos z) (cos y))) (tan a)))
(if (<= a 2.8e-5)
(+ x (- (* (+ (tan y) (tan z)) (/ 1.0 (- 1.0 (* (tan y) (tan z))))) a))
(+ (- (tan z) (tan a)) (+ x (tan y))))))
double code(double x, double y, double z, double a) {
double tmp;
if (a <= -2.6e-19) {
tmp = x + ((sin((y + z)) / (cos(z) * cos(y))) - tan(a));
} else if (a <= 2.8e-5) {
tmp = x + (((tan(y) + tan(z)) * (1.0 / (1.0 - (tan(y) * tan(z))))) - a);
} else {
tmp = (tan(z) - tan(a)) + (x + tan(y));
}
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 (a <= (-2.6d-19)) then
tmp = x + ((sin((y + z)) / (cos(z) * cos(y))) - tan(a))
else if (a <= 2.8d-5) then
tmp = x + (((tan(y) + tan(z)) * (1.0d0 / (1.0d0 - (tan(y) * tan(z))))) - a)
else
tmp = (tan(z) - tan(a)) + (x + tan(y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double tmp;
if (a <= -2.6e-19) {
tmp = x + ((Math.sin((y + z)) / (Math.cos(z) * Math.cos(y))) - Math.tan(a));
} else if (a <= 2.8e-5) {
tmp = x + (((Math.tan(y) + Math.tan(z)) * (1.0 / (1.0 - (Math.tan(y) * Math.tan(z))))) - a);
} else {
tmp = (Math.tan(z) - Math.tan(a)) + (x + Math.tan(y));
}
return tmp;
}
def code(x, y, z, a): tmp = 0 if a <= -2.6e-19: tmp = x + ((math.sin((y + z)) / (math.cos(z) * math.cos(y))) - math.tan(a)) elif a <= 2.8e-5: tmp = x + (((math.tan(y) + math.tan(z)) * (1.0 / (1.0 - (math.tan(y) * math.tan(z))))) - a) else: tmp = (math.tan(z) - math.tan(a)) + (x + math.tan(y)) return tmp
function code(x, y, z, a) tmp = 0.0 if (a <= -2.6e-19) tmp = Float64(x + Float64(Float64(sin(Float64(y + z)) / Float64(cos(z) * cos(y))) - tan(a))); elseif (a <= 2.8e-5) tmp = Float64(x + Float64(Float64(Float64(tan(y) + tan(z)) * Float64(1.0 / Float64(1.0 - Float64(tan(y) * tan(z))))) - a)); else tmp = Float64(Float64(tan(z) - tan(a)) + Float64(x + tan(y))); end return tmp end
function tmp_2 = code(x, y, z, a) tmp = 0.0; if (a <= -2.6e-19) tmp = x + ((sin((y + z)) / (cos(z) * cos(y))) - tan(a)); elseif (a <= 2.8e-5) tmp = x + (((tan(y) + tan(z)) * (1.0 / (1.0 - (tan(y) * tan(z))))) - a); else tmp = (tan(z) - tan(a)) + (x + tan(y)); end tmp_2 = tmp; end
code[x_, y_, z_, a_] := If[LessEqual[a, -2.6e-19], N[(x + N[(N[(N[Sin[N[(y + z), $MachinePrecision]], $MachinePrecision] / N[(N[Cos[z], $MachinePrecision] * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e-5], N[(x + N[(N[(N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(1.0 - N[(N[Tan[y], $MachinePrecision] * N[Tan[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(N[(N[Tan[z], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision] + N[(x + N[Tan[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{-19}:\\
\;\;\;\;x + \left(\frac{\sin \left(y + z\right)}{\cos z \cdot \cos y} - \tan a\right)\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-5}:\\
\;\;\;\;x + \left(\left(\tan y + \tan z\right) \cdot \frac{1}{1 - \tan y \cdot \tan z} - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\tan z - \tan a\right) + \left(x + \tan y\right)\\
\end{array}
\end{array}
if a < -2.60000000000000013e-19Initial program 83.8%
tan-sumN/A
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around 0
Simplified83.8%
*-lft-identityN/A
+-commutativeN/A
tan-quotN/A
tan-quotN/A
frac-addN/A
sin-sumN/A
+-commutativeN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
cos-lowering-cos.f6483.9%
Applied egg-rr83.9%
if -2.60000000000000013e-19 < a < 2.79999999999999996e-5Initial program 78.1%
Taylor expanded in a around 0
Simplified78.1%
tan-sumN/A
*-lft-identityN/A
associate-*l/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.9%
Applied egg-rr99.9%
if 2.79999999999999996e-5 < a Initial program 78.1%
tan-sumN/A
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around 0
Simplified78.6%
+-commutativeN/A
+-lowering-+.f64N/A
sub-negN/A
*-lft-identityN/A
associate-+l+N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
*-rgt-identityN/A
fma-defineN/A
fmm-defN/A
*-rgt-identityN/A
--lowering--.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6478.6%
Applied egg-rr78.6%
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f6478.6%
Applied egg-rr78.6%
Final simplification89.7%
(FPCore (x y z a)
:precision binary64
(if (<= a -2e-19)
(+ x (- (/ (sin (+ y z)) (* (cos z) (cos y))) (tan a)))
(if (<= a 2.8e-5)
(+ x (- (/ (+ (tan y) (tan z)) (- 1.0 (* (tan y) (tan z)))) a))
(+ (- (tan z) (tan a)) (+ x (tan y))))))
double code(double x, double y, double z, double a) {
double tmp;
if (a <= -2e-19) {
tmp = x + ((sin((y + z)) / (cos(z) * cos(y))) - tan(a));
} else if (a <= 2.8e-5) {
tmp = x + (((tan(y) + tan(z)) / (1.0 - (tan(y) * tan(z)))) - a);
} else {
tmp = (tan(z) - tan(a)) + (x + tan(y));
}
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 (a <= (-2d-19)) then
tmp = x + ((sin((y + z)) / (cos(z) * cos(y))) - tan(a))
else if (a <= 2.8d-5) then
tmp = x + (((tan(y) + tan(z)) / (1.0d0 - (tan(y) * tan(z)))) - a)
else
tmp = (tan(z) - tan(a)) + (x + tan(y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double tmp;
if (a <= -2e-19) {
tmp = x + ((Math.sin((y + z)) / (Math.cos(z) * Math.cos(y))) - Math.tan(a));
} else if (a <= 2.8e-5) {
tmp = x + (((Math.tan(y) + Math.tan(z)) / (1.0 - (Math.tan(y) * Math.tan(z)))) - a);
} else {
tmp = (Math.tan(z) - Math.tan(a)) + (x + Math.tan(y));
}
return tmp;
}
def code(x, y, z, a): tmp = 0 if a <= -2e-19: tmp = x + ((math.sin((y + z)) / (math.cos(z) * math.cos(y))) - math.tan(a)) elif a <= 2.8e-5: tmp = x + (((math.tan(y) + math.tan(z)) / (1.0 - (math.tan(y) * math.tan(z)))) - a) else: tmp = (math.tan(z) - math.tan(a)) + (x + math.tan(y)) return tmp
function code(x, y, z, a) tmp = 0.0 if (a <= -2e-19) tmp = Float64(x + Float64(Float64(sin(Float64(y + z)) / Float64(cos(z) * cos(y))) - tan(a))); elseif (a <= 2.8e-5) tmp = Float64(x + Float64(Float64(Float64(tan(y) + tan(z)) / Float64(1.0 - Float64(tan(y) * tan(z)))) - a)); else tmp = Float64(Float64(tan(z) - tan(a)) + Float64(x + tan(y))); end return tmp end
function tmp_2 = code(x, y, z, a) tmp = 0.0; if (a <= -2e-19) tmp = x + ((sin((y + z)) / (cos(z) * cos(y))) - tan(a)); elseif (a <= 2.8e-5) tmp = x + (((tan(y) + tan(z)) / (1.0 - (tan(y) * tan(z)))) - a); else tmp = (tan(z) - tan(a)) + (x + tan(y)); end tmp_2 = tmp; end
code[x_, y_, z_, a_] := If[LessEqual[a, -2e-19], N[(x + N[(N[(N[Sin[N[(y + z), $MachinePrecision]], $MachinePrecision] / N[(N[Cos[z], $MachinePrecision] * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e-5], 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] - a), $MachinePrecision]), $MachinePrecision], N[(N[(N[Tan[z], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision] + N[(x + N[Tan[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-19}:\\
\;\;\;\;x + \left(\frac{\sin \left(y + z\right)}{\cos z \cdot \cos y} - \tan a\right)\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-5}:\\
\;\;\;\;x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\tan z - \tan a\right) + \left(x + \tan y\right)\\
\end{array}
\end{array}
if a < -2e-19Initial program 83.8%
tan-sumN/A
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around 0
Simplified83.8%
*-lft-identityN/A
+-commutativeN/A
tan-quotN/A
tan-quotN/A
frac-addN/A
sin-sumN/A
+-commutativeN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
cos-lowering-cos.f6483.9%
Applied egg-rr83.9%
if -2e-19 < a < 2.79999999999999996e-5Initial program 78.1%
Taylor expanded in a around 0
Simplified78.1%
tan-sumN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.9%
Applied egg-rr99.9%
if 2.79999999999999996e-5 < a Initial program 78.1%
tan-sumN/A
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around 0
Simplified78.6%
+-commutativeN/A
+-lowering-+.f64N/A
sub-negN/A
*-lft-identityN/A
associate-+l+N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
*-rgt-identityN/A
fma-defineN/A
fmm-defN/A
*-rgt-identityN/A
--lowering--.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6478.6%
Applied egg-rr78.6%
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f6478.6%
Applied egg-rr78.6%
Final simplification89.7%
(FPCore (x y z a) :precision binary64 (+ x (+ (tan z) (- (tan y) (tan a)))))
double code(double x, double y, double z, double a) {
return x + (tan(z) + (tan(y) - 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(z) + (tan(y) - tan(a)))
end function
public static double code(double x, double y, double z, double a) {
return x + (Math.tan(z) + (Math.tan(y) - Math.tan(a)));
}
def code(x, y, z, a): return x + (math.tan(z) + (math.tan(y) - math.tan(a)))
function code(x, y, z, a) return Float64(x + Float64(tan(z) + Float64(tan(y) - tan(a)))) end
function tmp = code(x, y, z, a) tmp = x + (tan(z) + (tan(y) - tan(a))); end
code[x_, y_, z_, a_] := N[(x + N[(N[Tan[z], $MachinePrecision] + N[(N[Tan[y], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\tan z + \left(\tan y - \tan a\right)\right)
\end{array}
Initial program 79.4%
tan-sumN/A
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.8%
Applied egg-rr99.8%
Taylor expanded in y around 0
Simplified80.0%
sub-negN/A
*-lft-identityN/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
*-rgt-identityN/A
fma-defineN/A
fmm-defN/A
*-rgt-identityN/A
--lowering--.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6480.0%
Applied egg-rr80.0%
(FPCore (x y z a) :precision binary64 (let* ((t_0 (+ x (- (tan y) (tan a))))) (if (<= a -0.0066) t_0 (if (<= a 2.9e-8) (+ x (- (tan (+ y z)) a)) t_0))))
double code(double x, double y, double z, double a) {
double t_0 = x + (tan(y) - tan(a));
double tmp;
if (a <= -0.0066) {
tmp = t_0;
} else if (a <= 2.9e-8) {
tmp = x + (tan((y + z)) - a);
} else {
tmp = t_0;
}
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 = x + (tan(y) - tan(a))
if (a <= (-0.0066d0)) then
tmp = t_0
else if (a <= 2.9d-8) then
tmp = x + (tan((y + z)) - a)
else
tmp = t_0
end if
code = tmp
end function
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.0066) {
tmp = t_0;
} else if (a <= 2.9e-8) {
tmp = x + (Math.tan((y + z)) - a);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z, a): t_0 = x + (math.tan(y) - math.tan(a)) tmp = 0 if a <= -0.0066: tmp = t_0 elif a <= 2.9e-8: tmp = x + (math.tan((y + z)) - a) else: tmp = t_0 return tmp
function code(x, y, z, a) t_0 = Float64(x + Float64(tan(y) - tan(a))) tmp = 0.0 if (a <= -0.0066) tmp = t_0; elseif (a <= 2.9e-8) tmp = Float64(x + Float64(tan(Float64(y + z)) - a)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z, a) t_0 = x + (tan(y) - tan(a)); tmp = 0.0; if (a <= -0.0066) tmp = t_0; elseif (a <= 2.9e-8) tmp = x + (tan((y + z)) - a); else tmp = t_0; end tmp_2 = tmp; end
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.0066], t$95$0, If[LessEqual[a, 2.9e-8], N[(x + N[(N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(\tan y - \tan a\right)\\
\mathbf{if}\;a \leq -0.0066:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-8}:\\
\;\;\;\;x + \left(\tan \left(y + z\right) - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if a < -0.0066 or 2.9000000000000002e-8 < a Initial program 80.1%
Taylor expanded in y around inf
Simplified60.7%
if -0.0066 < a < 2.9000000000000002e-8Initial program 78.7%
Taylor expanded in a around 0
Simplified78.7%
(FPCore (x y z a) :precision binary64 (if (<= (+ y z) -2e-12) (+ x (- (tan y) (tan a))) (+ x (- (tan z) (tan a)))))
double code(double x, double y, double z, double a) {
double tmp;
if ((y + z) <= -2e-12) {
tmp = x + (tan(y) - tan(a));
} else {
tmp = x + (tan(z) - tan(a));
}
return tmp;
}
real(8) function code(x, y, z, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: a
real(8) :: tmp
if ((y + z) <= (-2d-12)) then
tmp = x + (tan(y) - tan(a))
else
tmp = x + (tan(z) - tan(a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double tmp;
if ((y + z) <= -2e-12) {
tmp = x + (Math.tan(y) - Math.tan(a));
} else {
tmp = x + (Math.tan(z) - Math.tan(a));
}
return tmp;
}
def code(x, y, z, a): tmp = 0 if (y + z) <= -2e-12: tmp = x + (math.tan(y) - math.tan(a)) else: tmp = x + (math.tan(z) - math.tan(a)) return tmp
function code(x, y, z, a) tmp = 0.0 if (Float64(y + z) <= -2e-12) tmp = Float64(x + Float64(tan(y) - tan(a))); else tmp = Float64(x + Float64(tan(z) - tan(a))); end return tmp end
function tmp_2 = code(x, y, z, a) tmp = 0.0; if ((y + z) <= -2e-12) tmp = x + (tan(y) - tan(a)); else tmp = x + (tan(z) - tan(a)); end tmp_2 = tmp; end
code[x_, y_, z_, a_] := If[LessEqual[N[(y + z), $MachinePrecision], -2e-12], 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}
\\
\begin{array}{l}
\mathbf{if}\;y + z \leq -2 \cdot 10^{-12}:\\
\;\;\;\;x + \left(\tan y - \tan a\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(\tan z - \tan a\right)\\
\end{array}
\end{array}
if (+.f64 y z) < -1.99999999999999996e-12Initial program 72.5%
Taylor expanded in y around inf
Simplified47.9%
if -1.99999999999999996e-12 < (+.f64 y z) Initial program 82.5%
Taylor expanded in y around 0
Simplified67.9%
(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 79.4%
(FPCore (x y z a)
:precision binary64
(let* ((t_0 (+ x (- y (tan a)))))
(if (<= a -470000000.0)
t_0
(if (<= a 0.0132) (+ x (- (tan (+ y z)) a)) t_0))))
double code(double x, double y, double z, double a) {
double t_0 = x + (y - tan(a));
double tmp;
if (a <= -470000000.0) {
tmp = t_0;
} else if (a <= 0.0132) {
tmp = x + (tan((y + z)) - a);
} else {
tmp = t_0;
}
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 = x + (y - tan(a))
if (a <= (-470000000.0d0)) then
tmp = t_0
else if (a <= 0.0132d0) then
tmp = x + (tan((y + z)) - a)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double t_0 = x + (y - Math.tan(a));
double tmp;
if (a <= -470000000.0) {
tmp = t_0;
} else if (a <= 0.0132) {
tmp = x + (Math.tan((y + z)) - a);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z, a): t_0 = x + (y - math.tan(a)) tmp = 0 if a <= -470000000.0: tmp = t_0 elif a <= 0.0132: tmp = x + (math.tan((y + z)) - a) else: tmp = t_0 return tmp
function code(x, y, z, a) t_0 = Float64(x + Float64(y - tan(a))) tmp = 0.0 if (a <= -470000000.0) tmp = t_0; elseif (a <= 0.0132) tmp = Float64(x + Float64(tan(Float64(y + z)) - a)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z, a) t_0 = x + (y - tan(a)); tmp = 0.0; if (a <= -470000000.0) tmp = t_0; elseif (a <= 0.0132) tmp = x + (tan((y + z)) - a); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_, a_] := Block[{t$95$0 = N[(x + N[(y - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -470000000.0], t$95$0, If[LessEqual[a, 0.0132], N[(x + N[(N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y - \tan a\right)\\
\mathbf{if}\;a \leq -470000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;a \leq 0.0132:\\
\;\;\;\;x + \left(\tan \left(y + z\right) - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if a < -4.7e8 or 0.0132 < a Initial program 80.3%
tan-sumN/A
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around 0
Simplified80.6%
Taylor expanded in y around 0
Simplified54.3%
Taylor expanded in y around inf
Simplified35.6%
if -4.7e8 < a < 0.0132Initial program 78.5%
Taylor expanded in a around 0
Simplified77.0%
(FPCore (x y z a) :precision binary64 (let* ((t_0 (+ x (- y (tan a))))) (if (<= a -470000000.0) t_0 (if (<= a 0.084) (+ x (- (tan z) a)) t_0))))
double code(double x, double y, double z, double a) {
double t_0 = x + (y - tan(a));
double tmp;
if (a <= -470000000.0) {
tmp = t_0;
} else if (a <= 0.084) {
tmp = x + (tan(z) - a);
} else {
tmp = t_0;
}
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 = x + (y - tan(a))
if (a <= (-470000000.0d0)) then
tmp = t_0
else if (a <= 0.084d0) then
tmp = x + (tan(z) - a)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double t_0 = x + (y - Math.tan(a));
double tmp;
if (a <= -470000000.0) {
tmp = t_0;
} else if (a <= 0.084) {
tmp = x + (Math.tan(z) - a);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z, a): t_0 = x + (y - math.tan(a)) tmp = 0 if a <= -470000000.0: tmp = t_0 elif a <= 0.084: tmp = x + (math.tan(z) - a) else: tmp = t_0 return tmp
function code(x, y, z, a) t_0 = Float64(x + Float64(y - tan(a))) tmp = 0.0 if (a <= -470000000.0) tmp = t_0; elseif (a <= 0.084) tmp = Float64(x + Float64(tan(z) - a)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z, a) t_0 = x + (y - tan(a)); tmp = 0.0; if (a <= -470000000.0) tmp = t_0; elseif (a <= 0.084) tmp = x + (tan(z) - a); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_, a_] := Block[{t$95$0 = N[(x + N[(y - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -470000000.0], t$95$0, If[LessEqual[a, 0.084], N[(x + N[(N[Tan[z], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y - \tan a\right)\\
\mathbf{if}\;a \leq -470000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;a \leq 0.084:\\
\;\;\;\;x + \left(\tan z - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if a < -4.7e8 or 0.0840000000000000052 < a Initial program 80.3%
tan-sumN/A
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around 0
Simplified80.6%
Taylor expanded in y around 0
Simplified54.3%
Taylor expanded in y around inf
Simplified35.6%
if -4.7e8 < a < 0.0840000000000000052Initial program 78.5%
Taylor expanded in a around 0
Simplified77.0%
Taylor expanded in y around 0
Simplified61.9%
(FPCore (x y z a) :precision binary64 (if (<= y -2.6) (+ x (- (tan y) a)) (if (<= y 1.35) (+ x (- y (tan a))) x)))
double code(double x, double y, double z, double a) {
double tmp;
if (y <= -2.6) {
tmp = x + (tan(y) - a);
} else if (y <= 1.35) {
tmp = x + (y - tan(a));
} else {
tmp = x;
}
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 <= (-2.6d0)) then
tmp = x + (tan(y) - a)
else if (y <= 1.35d0) then
tmp = x + (y - tan(a))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double tmp;
if (y <= -2.6) {
tmp = x + (Math.tan(y) - a);
} else if (y <= 1.35) {
tmp = x + (y - Math.tan(a));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, a): tmp = 0 if y <= -2.6: tmp = x + (math.tan(y) - a) elif y <= 1.35: tmp = x + (y - math.tan(a)) else: tmp = x return tmp
function code(x, y, z, a) tmp = 0.0 if (y <= -2.6) tmp = Float64(x + Float64(tan(y) - a)); elseif (y <= 1.35) tmp = Float64(x + Float64(y - tan(a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, a) tmp = 0.0; if (y <= -2.6) tmp = x + (tan(y) - a); elseif (y <= 1.35) tmp = x + (y - tan(a)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, a_] := If[LessEqual[y, -2.6], N[(x + N[(N[Tan[y], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35], N[(x + N[(y - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6:\\
\;\;\;\;x + \left(\tan y - a\right)\\
\mathbf{elif}\;y \leq 1.35:\\
\;\;\;\;x + \left(y - \tan a\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.60000000000000009Initial program 57.5%
Taylor expanded in a around 0
Simplified34.4%
Taylor expanded in y around inf
Simplified34.8%
if -2.60000000000000009 < y < 1.3500000000000001Initial program 99.0%
tan-sumN/A
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.9%
Applied egg-rr99.9%
Taylor expanded in y around 0
Simplified99.0%
Taylor expanded in y around 0
Simplified98.6%
Taylor expanded in y around inf
Simplified63.3%
if 1.3500000000000001 < y Initial program 58.2%
Taylor expanded in x around inf
Simplified23.2%
(FPCore (x y z a) :precision binary64 (if (<= y -1.25) x (if (<= y 2.1) (+ x (- y (tan a))) x)))
double code(double x, double y, double z, double a) {
double tmp;
if (y <= -1.25) {
tmp = x;
} else if (y <= 2.1) {
tmp = x + (y - tan(a));
} else {
tmp = x;
}
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 <= (-1.25d0)) then
tmp = x
else if (y <= 2.1d0) then
tmp = x + (y - tan(a))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double a) {
double tmp;
if (y <= -1.25) {
tmp = x;
} else if (y <= 2.1) {
tmp = x + (y - Math.tan(a));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, a): tmp = 0 if y <= -1.25: tmp = x elif y <= 2.1: tmp = x + (y - math.tan(a)) else: tmp = x return tmp
function code(x, y, z, a) tmp = 0.0 if (y <= -1.25) tmp = x; elseif (y <= 2.1) tmp = Float64(x + Float64(y - tan(a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, a) tmp = 0.0; if (y <= -1.25) tmp = x; elseif (y <= 2.1) tmp = x + (y - tan(a)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, a_] := If[LessEqual[y, -1.25], x, If[LessEqual[y, 2.1], N[(x + N[(y - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.1:\\
\;\;\;\;x + \left(y - \tan a\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.25 or 2.10000000000000009 < y Initial program 57.2%
Taylor expanded in x around inf
Simplified23.3%
if -1.25 < y < 2.10000000000000009Initial program 99.0%
tan-sumN/A
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f64N/A
+-lowering-+.f64N/A
tan-lowering-tan.f64N/A
tan-lowering-tan.f6499.9%
Applied egg-rr99.9%
Taylor expanded in y around 0
Simplified99.0%
Taylor expanded in y around 0
Simplified97.5%
Taylor expanded in y around inf
Simplified62.6%
(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 79.4%
Taylor expanded in x around inf
Simplified33.3%
herbie shell --seed 2024158
(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))))