
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew)))) (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((-eh * tan(t)) / ew));
return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((-eh * tan(t)) / ew))
code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((-eh * math.tan(t)) / ew)) return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((-eh * tan(t)) / ew)); tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew)))) (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((-eh * tan(t)) / ew));
return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((-eh * tan(t)) / ew))
code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((-eh * math.tan(t)) / ew)) return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((-eh * tan(t)) / ew)); tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
(FPCore (eh ew t) :precision binary64 (fabs (- (* (* ew (cos t)) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew))))) (* (* eh (sin t)) (sin (atan (/ (* eh (- (tan t))) ew)))))))
double code(double eh, double ew, double t) {
return fabs((((ew * cos(t)) * (1.0 / hypot(1.0, (tan(t) * (eh / ew))))) - ((eh * sin(t)) * sin(atan(((eh * -tan(t)) / ew))))));
}
public static double code(double eh, double ew, double t) {
return Math.abs((((ew * Math.cos(t)) * (1.0 / Math.hypot(1.0, (Math.tan(t) * (eh / ew))))) - ((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * -Math.tan(t)) / ew))))));
}
def code(eh, ew, t): return math.fabs((((ew * math.cos(t)) * (1.0 / math.hypot(1.0, (math.tan(t) * (eh / ew))))) - ((eh * math.sin(t)) * math.sin(math.atan(((eh * -math.tan(t)) / ew))))))
function code(eh, ew, t) return abs(Float64(Float64(Float64(ew * cos(t)) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew))))) - Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * Float64(-tan(t))) / ew)))))) end
function tmp = code(eh, ew, t) tmp = abs((((ew * cos(t)) * (1.0 / hypot(1.0, (tan(t) * (eh / ew))))) - ((eh * sin(t)) * sin(atan(((eh * -tan(t)) / ew)))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * (-N[Tan[t], $MachinePrecision])), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-\tan t\right)}{ew}\right)\right|
\end{array}
Initial program 99.8%
associate-*r/99.8%
cos-atan99.8%
hypot-1-def99.8%
associate-*r/99.8%
*-commutative99.8%
associate-/l*99.8%
add-sqr-sqrt49.1%
sqrt-unprod96.3%
sqr-neg96.3%
sqrt-unprod50.7%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (- (* (* ew (cos t)) (cos (atan (/ (* eh (- (tan t))) ew)))) (* (* eh (sin t)) (sin (atan (/ (* eh (- t)) ew)))))))
double code(double eh, double ew, double t) {
return fabs((((ew * cos(t)) * cos(atan(((eh * -tan(t)) / ew)))) - ((eh * sin(t)) * sin(atan(((eh * -t) / ew))))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((((ew * cos(t)) * cos(atan(((eh * -tan(t)) / ew)))) - ((eh * sin(t)) * sin(atan(((eh * -t) / ew))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((((ew * Math.cos(t)) * Math.cos(Math.atan(((eh * -Math.tan(t)) / ew)))) - ((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * -t) / ew))))));
}
def code(eh, ew, t): return math.fabs((((ew * math.cos(t)) * math.cos(math.atan(((eh * -math.tan(t)) / ew)))) - ((eh * math.sin(t)) * math.sin(math.atan(((eh * -t) / ew))))))
function code(eh, ew, t) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(eh * Float64(-tan(t))) / ew)))) - Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * Float64(-t)) / ew)))))) end
function tmp = code(eh, ew, t) tmp = abs((((ew * cos(t)) * cos(atan(((eh * -tan(t)) / ew)))) - ((eh * sin(t)) * sin(atan(((eh * -t) / ew)))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * (-N[Tan[t], $MachinePrecision])), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-\tan t\right)}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 99.3%
associate-*r/99.3%
associate-*r*99.3%
mul-1-neg99.3%
Simplified99.3%
Final simplification99.3%
(FPCore (eh ew t) :precision binary64 (fabs (fma ew (* (cos (atan (* eh (/ (tan t) (- ew))))) (- (cos t))) (* eh (- (sin t))))))
double code(double eh, double ew, double t) {
return fabs(fma(ew, (cos(atan((eh * (tan(t) / -ew)))) * -cos(t)), (eh * -sin(t))));
}
function code(eh, ew, t) return abs(fma(ew, Float64(cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) * Float64(-cos(t))), Float64(eh * Float64(-sin(t))))) end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * (-N[Cos[t], $MachinePrecision])), $MachinePrecision] + N[(eh * (-N[Sin[t], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\mathsf{fma}\left(ew, \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(-\cos t\right), eh \cdot \left(-\sin t\right)\right)\right|
\end{array}
Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
associate-*r*99.8%
sin-atan76.2%
associate-*r/72.7%
associate-*r/72.7%
*-commutative72.7%
associate-/l*70.7%
add-sqr-sqrt35.0%
sqrt-unprod61.6%
sqr-neg61.6%
sqrt-unprod35.2%
add-sqr-sqrt69.9%
hypot-1-def75.9%
associate-*r/75.9%
Applied egg-rr75.8%
Taylor expanded in eh around -inf 98.8%
mul-1-neg98.8%
distribute-rgt-neg-in98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (eh ew t) :precision binary64 (fabs (fma ew (* (cos (atan (* eh (/ (tan t) (- ew))))) (- (cos t))) (* eh (sin t)))))
double code(double eh, double ew, double t) {
return fabs(fma(ew, (cos(atan((eh * (tan(t) / -ew)))) * -cos(t)), (eh * sin(t))));
}
function code(eh, ew, t) return abs(fma(ew, Float64(cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) * Float64(-cos(t))), Float64(eh * sin(t)))) end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * (-N[Cos[t], $MachinePrecision])), $MachinePrecision] + N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\mathsf{fma}\left(ew, \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(-\cos t\right), eh \cdot \sin t\right)\right|
\end{array}
Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
associate-*r*99.8%
sin-atan76.2%
associate-*r/72.7%
associate-*r/72.7%
*-commutative72.7%
associate-/l*70.7%
add-sqr-sqrt35.0%
sqrt-unprod61.6%
sqr-neg61.6%
sqrt-unprod35.2%
add-sqr-sqrt69.9%
hypot-1-def75.9%
associate-*r/75.9%
Applied egg-rr75.8%
Taylor expanded in eh around inf 98.8%
Final simplification98.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (/ (* eh (- t)) ew))) (t_2 (* ew (cos t))))
(if (<= t -0.00155)
(fabs t_2)
(if (<= t 1.25e+23)
(fabs (fma ew (- (cos t_1)) (* (sin t_1) (* t eh))))
(fabs (fma -0.5 (/ (pow (* eh (sin t)) 2.0) t_2) t_2))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh * -t) / ew));
double t_2 = ew * cos(t);
double tmp;
if (t <= -0.00155) {
tmp = fabs(t_2);
} else if (t <= 1.25e+23) {
tmp = fabs(fma(ew, -cos(t_1), (sin(t_1) * (t * eh))));
} else {
tmp = fabs(fma(-0.5, (pow((eh * sin(t)), 2.0) / t_2), t_2));
}
return tmp;
}
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh * Float64(-t)) / ew)) t_2 = Float64(ew * cos(t)) tmp = 0.0 if (t <= -0.00155) tmp = abs(t_2); elseif (t <= 1.25e+23) tmp = abs(fma(ew, Float64(-cos(t_1)), Float64(sin(t_1) * Float64(t * eh)))); else tmp = abs(fma(-0.5, Float64((Float64(eh * sin(t)) ^ 2.0) / t_2), t_2)); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.00155], N[Abs[t$95$2], $MachinePrecision], If[LessEqual[t, 1.25e+23], N[Abs[N[(ew * (-N[Cos[t$95$1], $MachinePrecision]) + N[(N[Sin[t$95$1], $MachinePrecision] * N[(t * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(-0.5 * N[(N[Power[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t$95$2), $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\\
t_2 := ew \cdot \cos t\\
\mathbf{if}\;t \leq -0.00155:\\
\;\;\;\;\left|t\_2\right|\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+23}:\\
\;\;\;\;\left|\mathsf{fma}\left(ew, -\cos t\_1, \sin t\_1 \cdot \left(t \cdot eh\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\mathsf{fma}\left(-0.5, \frac{{\left(eh \cdot \sin t\right)}^{2}}{t\_2}, t\_2\right)\right|\\
\end{array}
\end{array}
if t < -0.00154999999999999995Initial program 99.7%
fabs-sub99.7%
sub-neg99.7%
+-commutative99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
fma-define99.7%
Simplified99.7%
sin-mult50.5%
associate-*r/50.5%
Applied egg-rr50.5%
+-inverses50.5%
*-commutative50.5%
associate-/l*50.5%
mul0-lft50.5%
Simplified50.5%
fma-undefine50.5%
+-rgt-identity50.5%
add-sqr-sqrt28.0%
associate-*l*28.1%
*-commutative28.1%
cos-atan27.9%
un-div-inv27.9%
add-sqr-sqrt20.6%
sqrt-unprod27.9%
sqr-neg27.9%
sqrt-unprod7.3%
add-sqr-sqrt27.9%
hypot-1-def27.9%
Applied egg-rr27.9%
Taylor expanded in ew around inf 50.7%
if -0.00154999999999999995 < t < 1.25e23Initial program 99.9%
fabs-sub99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
fma-define100.0%
Simplified99.9%
Taylor expanded in t around 0 93.3%
associate-*r*93.3%
associate-*r/93.3%
associate-*r*93.3%
*-commutative93.3%
associate-*l/93.3%
associate-*r/93.3%
mul-1-neg93.3%
Simplified93.3%
Taylor expanded in t around 0 93.3%
mul-1-neg93.3%
*-commutative93.3%
distribute-neg-frac293.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in t around 0 93.3%
Taylor expanded in t around 0 93.0%
mul-1-neg93.0%
associate-*r/93.0%
neg-mul-193.0%
distribute-rgt-neg-in93.0%
Simplified93.0%
if 1.25e23 < t Initial program 99.7%
fabs-sub99.7%
sub-neg99.7%
+-commutative99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
fma-define99.7%
Simplified99.7%
sin-mult48.5%
associate-*r/48.5%
Applied egg-rr48.5%
+-inverses48.5%
*-commutative48.5%
associate-/l*48.5%
mul0-lft48.5%
Simplified48.5%
fma-undefine48.5%
+-rgt-identity48.5%
add-sqr-sqrt21.2%
associate-*l*21.2%
*-commutative21.2%
cos-atan21.1%
un-div-inv21.1%
add-sqr-sqrt8.0%
sqrt-unprod21.1%
sqr-neg21.1%
sqrt-unprod13.0%
add-sqr-sqrt21.1%
hypot-1-def21.1%
Applied egg-rr21.1%
Taylor expanded in eh around 0 49.6%
fma-define49.6%
unpow249.6%
unpow249.6%
swap-sqr49.6%
unpow249.6%
Simplified49.6%
Final simplification74.1%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (cos t))))
double code(double eh, double ew, double t) {
return fabs((ew * cos(t)));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((ew * cos(t)))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew * Math.cos(t)));
}
def code(eh, ew, t): return math.fabs((ew * math.cos(t)))
function code(eh, ew, t) return abs(Float64(ew * cos(t))) end
function tmp = code(eh, ew, t) tmp = abs((ew * cos(t))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \cos t\right|
\end{array}
Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
sin-mult61.9%
associate-*r/61.9%
Applied egg-rr59.1%
+-inverses59.1%
*-commutative59.1%
associate-/l*59.1%
mul0-lft59.1%
Simplified59.1%
fma-undefine59.1%
+-rgt-identity59.1%
add-sqr-sqrt28.3%
associate-*l*28.3%
*-commutative28.3%
cos-atan28.2%
un-div-inv28.2%
add-sqr-sqrt6.5%
sqrt-unprod28.2%
sqr-neg28.2%
sqrt-unprod21.7%
add-sqr-sqrt28.2%
hypot-1-def28.2%
Applied egg-rr28.2%
Taylor expanded in ew around inf 59.3%
Final simplification59.3%
(FPCore (eh ew t) :precision binary64 (fabs ew))
double code(double eh, double ew, double t) {
return fabs(ew);
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs(ew)
end function
public static double code(double eh, double ew, double t) {
return Math.abs(ew);
}
def code(eh, ew, t): return math.fabs(ew)
function code(eh, ew, t) return abs(ew) end
function tmp = code(eh, ew, t) tmp = abs(ew); end
code[eh_, ew_, t_] := N[Abs[ew], $MachinePrecision]
\begin{array}{l}
\\
\left|ew\right|
\end{array}
Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
sin-mult61.9%
associate-*r/61.9%
Applied egg-rr59.1%
+-inverses59.1%
*-commutative59.1%
associate-/l*59.1%
mul0-lft59.1%
Simplified59.1%
fma-undefine59.1%
+-rgt-identity59.1%
add-sqr-sqrt28.3%
associate-*l*28.3%
*-commutative28.3%
cos-atan28.2%
un-div-inv28.2%
add-sqr-sqrt6.5%
sqrt-unprod28.2%
sqr-neg28.2%
sqrt-unprod21.7%
add-sqr-sqrt28.2%
hypot-1-def28.2%
Applied egg-rr28.2%
Taylor expanded in t around 0 42.8%
Final simplification42.8%
herbie shell --seed 2024055
(FPCore (eh ew t)
:name "Example 2 from Robby"
:precision binary64
(fabs (- (* (* ew (cos t)) (cos (atan (/ (* (- eh) (tan t)) ew)))) (* (* eh (sin t)) (sin (atan (/ (* (- eh) (tan t)) ew)))))))