
(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 17 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 (- (* (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew)))) (* ew (cos t))) (* (sin (atan (/ (* (tan t) (- eh)) ew))) (* eh (sin t))))))
double code(double eh, double ew, double t) {
return fabs((((1.0 / hypot(1.0, (tan(t) * (eh / ew)))) * (ew * cos(t))) - (sin(atan(((tan(t) * -eh) / ew))) * (eh * sin(t)))));
}
public static double code(double eh, double ew, double t) {
return Math.abs((((1.0 / Math.hypot(1.0, (Math.tan(t) * (eh / ew)))) * (ew * Math.cos(t))) - (Math.sin(Math.atan(((Math.tan(t) * -eh) / ew))) * (eh * Math.sin(t)))));
}
def code(eh, ew, t): return math.fabs((((1.0 / math.hypot(1.0, (math.tan(t) * (eh / ew)))) * (ew * math.cos(t))) - (math.sin(math.atan(((math.tan(t) * -eh) / ew))) * (eh * math.sin(t)))))
function code(eh, ew, t) return abs(Float64(Float64(Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))) * Float64(ew * cos(t))) - Float64(sin(atan(Float64(Float64(tan(t) * Float64(-eh)) / ew))) * Float64(eh * sin(t))))) end
function tmp = code(eh, ew, t) tmp = abs((((1.0 / hypot(1.0, (tan(t) * (eh / ew)))) * (ew * cos(t))) - (sin(atan(((tan(t) * -eh) / ew))) * (eh * sin(t))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] * (-eh)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} \cdot \left(ew \cdot \cos t\right) - \sin \tan^{-1} \left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right) \cdot \left(eh \cdot \sin t\right)\right|
\end{array}
Initial program 99.8%
expm1-log1p-u78.8%
expm1-udef77.9%
add-sqr-sqrt37.7%
sqrt-unprod73.9%
sqr-neg73.9%
sqrt-unprod42.1%
add-sqr-sqrt79.1%
Applied egg-rr79.1%
expm1-def79.9%
expm1-log1p99.8%
*-commutative99.8%
Simplified99.8%
associate-*r/99.8%
cos-atan99.8%
hypot-1-def99.8%
frac-2neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
expm1-log1p-u99.8%
expm1-udef99.8%
Applied egg-rr99.8%
expm1-def99.8%
expm1-log1p99.8%
neg-mul-199.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (- (* eh (* (sin t) (sin (atan (/ (- eh) (/ ew (tan t))))))) (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew)))))))))
double code(double eh, double ew, double t) {
return fabs(((eh * (sin(t) * sin(atan((-eh / (ew / tan(t))))))) - (ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew))))))));
}
public static double code(double eh, double ew, double t) {
return Math.abs(((eh * (Math.sin(t) * Math.sin(Math.atan((-eh / (ew / Math.tan(t))))))) - (ew * (Math.cos(t) * (1.0 / Math.hypot(1.0, (Math.tan(t) * (eh / ew))))))));
}
def code(eh, ew, t): return math.fabs(((eh * (math.sin(t) * math.sin(math.atan((-eh / (ew / math.tan(t))))))) - (ew * (math.cos(t) * (1.0 / math.hypot(1.0, (math.tan(t) * (eh / ew))))))))
function code(eh, ew, t) return abs(Float64(Float64(eh * Float64(sin(t) * sin(atan(Float64(Float64(-eh) / Float64(ew / tan(t))))))) - Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))))))) end
function tmp = code(eh, ew, t) tmp = abs(((eh * (sin(t) * sin(atan((-eh / (ew / tan(t))))))) - (ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[((-eh) / N[(ew / N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right)\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
cos-atan99.8%
hypot-1-def99.8%
associate-/r/99.8%
*-commutative99.8%
add-sqr-sqrt46.8%
sqrt-unprod91.8%
sqr-neg91.8%
sqrt-unprod53.0%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (- (* ew (* (cos t) (cos (atan (/ (- eh) (/ ew (tan t))))))) (* eh (* (sin t) (sin (atan (/ (* t (- eh)) ew))))))))
double code(double eh, double ew, double t) {
return fabs(((ew * (cos(t) * cos(atan((-eh / (ew / tan(t))))))) - (eh * (sin(t) * sin(atan(((t * -eh) / 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 / (ew / tan(t))))))) - (eh * (sin(t) * sin(atan(((t * -eh) / 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 / (ew / Math.tan(t))))))) - (eh * (Math.sin(t) * Math.sin(Math.atan(((t * -eh) / ew)))))));
}
def code(eh, ew, t): return math.fabs(((ew * (math.cos(t) * math.cos(math.atan((-eh / (ew / math.tan(t))))))) - (eh * (math.sin(t) * math.sin(math.atan(((t * -eh) / ew)))))))
function code(eh, ew, t) return abs(Float64(Float64(ew * Float64(cos(t) * cos(atan(Float64(Float64(-eh) / Float64(ew / tan(t))))))) - Float64(eh * Float64(sin(t) * sin(atan(Float64(Float64(t * Float64(-eh)) / ew))))))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * (cos(t) * cos(atan((-eh / (ew / tan(t))))))) - (eh * (sin(t) * sin(atan(((t * -eh) / ew))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[((-eh) / N[(ew / N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(t * (-eh)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right)\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
Taylor expanded in t around 0 98.7%
associate-*r/45.2%
mul-1-neg45.2%
*-commutative45.2%
distribute-rgt-neg-in45.2%
Simplified98.7%
Final simplification98.7%
(FPCore (eh ew t) :precision binary64 (fabs (- (* eh (* (sin t) (sin (atan (/ (- eh) (/ ew (tan t))))))) (* ew (cos t)))))
double code(double eh, double ew, double t) {
return fabs(((eh * (sin(t) * sin(atan((-eh / (ew / tan(t))))))) - (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(((eh * (sin(t) * sin(atan((-eh / (ew / tan(t))))))) - (ew * cos(t))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((eh * (Math.sin(t) * Math.sin(Math.atan((-eh / (ew / Math.tan(t))))))) - (ew * Math.cos(t))));
}
def code(eh, ew, t): return math.fabs(((eh * (math.sin(t) * math.sin(math.atan((-eh / (ew / math.tan(t))))))) - (ew * math.cos(t))))
function code(eh, ew, t) return abs(Float64(Float64(eh * Float64(sin(t) * sin(atan(Float64(Float64(-eh) / Float64(ew / tan(t))))))) - Float64(ew * cos(t)))) end
function tmp = code(eh, ew, t) tmp = abs(((eh * (sin(t) * sin(atan((-eh / (ew / tan(t))))))) - (ew * cos(t)))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[((-eh) / N[(ew / N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{\tan t}}\right)\right) - ew \cdot \cos t\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
cos-atan99.8%
hypot-1-def99.8%
associate-/r/99.8%
*-commutative99.8%
add-sqr-sqrt46.8%
sqrt-unprod91.8%
sqr-neg91.8%
sqrt-unprod53.0%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 98.4%
Final simplification98.4%
(FPCore (eh ew t) :precision binary64 (fabs (- (* ew (cos t)) (* (sin (atan (/ (* (tan t) (- eh)) ew))) (* eh (sin t))))))
double code(double eh, double ew, double t) {
return fabs(((ew * cos(t)) - (sin(atan(((tan(t) * -eh) / ew))) * (eh * sin(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)) - (sin(atan(((tan(t) * -eh) / ew))) * (eh * sin(t)))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((ew * Math.cos(t)) - (Math.sin(Math.atan(((Math.tan(t) * -eh) / ew))) * (eh * Math.sin(t)))));
}
def code(eh, ew, t): return math.fabs(((ew * math.cos(t)) - (math.sin(math.atan(((math.tan(t) * -eh) / ew))) * (eh * math.sin(t)))))
function code(eh, ew, t) return abs(Float64(Float64(ew * cos(t)) - Float64(sin(atan(Float64(Float64(tan(t) * Float64(-eh)) / ew))) * Float64(eh * sin(t))))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * cos(t)) - (sin(atan(((tan(t) * -eh) / ew))) * (eh * sin(t))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] * (-eh)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \cos t - \sin \tan^{-1} \left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right) \cdot \left(eh \cdot \sin t\right)\right|
\end{array}
Initial program 99.8%
expm1-log1p-u78.8%
expm1-udef77.9%
add-sqr-sqrt37.7%
sqrt-unprod73.9%
sqr-neg73.9%
sqrt-unprod42.1%
add-sqr-sqrt79.1%
Applied egg-rr79.1%
expm1-def79.9%
expm1-log1p99.8%
*-commutative99.8%
Simplified99.8%
associate-*r/99.8%
cos-atan99.8%
hypot-1-def99.8%
frac-2neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 98.4%
Final simplification98.4%
(FPCore (eh ew t)
:precision binary64
(if (or (<= ew -3.4e+101) (not (<= ew 1.02e+15)))
(fabs
(*
ew
(*
(cos t)
(cos (atan (/ (- eh) (+ (* -0.3333333333333333 (* ew t)) (/ ew t))))))))
(fabs (- ew (* (sin (atan (/ (* (tan t) (- eh)) ew))) (* eh (sin t)))))))
double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -3.4e+101) || !(ew <= 1.02e+15)) {
tmp = fabs((ew * (cos(t) * cos(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))))))));
} else {
tmp = fabs((ew - (sin(atan(((tan(t) * -eh) / ew))) * (eh * sin(t)))));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((ew <= (-3.4d+101)) .or. (.not. (ew <= 1.02d+15))) then
tmp = abs((ew * (cos(t) * cos(atan((-eh / (((-0.3333333333333333d0) * (ew * t)) + (ew / t))))))))
else
tmp = abs((ew - (sin(atan(((tan(t) * -eh) / ew))) * (eh * sin(t)))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -3.4e+101) || !(ew <= 1.02e+15)) {
tmp = Math.abs((ew * (Math.cos(t) * Math.cos(Math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))))))));
} else {
tmp = Math.abs((ew - (Math.sin(Math.atan(((Math.tan(t) * -eh) / ew))) * (eh * Math.sin(t)))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (ew <= -3.4e+101) or not (ew <= 1.02e+15): tmp = math.fabs((ew * (math.cos(t) * math.cos(math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))) else: tmp = math.fabs((ew - (math.sin(math.atan(((math.tan(t) * -eh) / ew))) * (eh * math.sin(t))))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((ew <= -3.4e+101) || !(ew <= 1.02e+15)) tmp = abs(Float64(ew * Float64(cos(t) * cos(atan(Float64(Float64(-eh) / Float64(Float64(-0.3333333333333333 * Float64(ew * t)) + Float64(ew / t)))))))); else tmp = abs(Float64(ew - Float64(sin(atan(Float64(Float64(tan(t) * Float64(-eh)) / ew))) * Float64(eh * sin(t))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((ew <= -3.4e+101) || ~((ew <= 1.02e+15))) tmp = abs((ew * (cos(t) * cos(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))); else tmp = abs((ew - (sin(atan(((tan(t) * -eh) / ew))) * (eh * sin(t))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -3.4e+101], N[Not[LessEqual[ew, 1.02e+15]], $MachinePrecision]], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[((-eh) / N[(N[(-0.3333333333333333 * N[(ew * t), $MachinePrecision]), $MachinePrecision] + N[(ew / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew - N[(N[Sin[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] * (-eh)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -3.4 \cdot 10^{+101} \lor \neg \left(ew \leq 1.02 \cdot 10^{+15}\right):\\
\;\;\;\;\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew - \sin \tan^{-1} \left(\frac{\tan t \cdot \left(-eh\right)}{ew}\right) \cdot \left(eh \cdot \sin t\right)\right|\\
\end{array}
\end{array}
if ew < -3.40000000000000017e101 or 1.02e15 < ew Initial program 99.9%
fabs-neg99.9%
sub0-neg99.9%
sub-neg99.9%
+-commutative99.9%
associate--r+99.9%
Simplified99.9%
sin-mult92.2%
associate-*r/92.2%
Applied egg-rr91.9%
+-inverses91.9%
mul0-rgt91.9%
metadata-eval91.9%
Simplified91.9%
Taylor expanded in t around 0 92.0%
if -3.40000000000000017e101 < ew < 1.02e15Initial program 99.8%
expm1-log1p-u78.4%
expm1-udef77.1%
add-sqr-sqrt36.0%
sqrt-unprod76.0%
sqr-neg76.0%
sqrt-unprod41.6%
add-sqr-sqrt74.5%
Applied egg-rr74.5%
expm1-def75.9%
expm1-log1p99.8%
*-commutative99.8%
Simplified99.8%
associate-*r/99.8%
cos-atan99.8%
hypot-1-def99.8%
frac-2neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 98.5%
Taylor expanded in t around 0 85.5%
Final simplification87.8%
(FPCore (eh ew t) :precision binary64 (fabs (- (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew)))))) (* eh (sin t)))))
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))));
}
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))));
}
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))))
function code(eh, ew, t) return abs(Float64(Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))))) - Float64(eh * sin(t)))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (eh * sin(t)))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - eh \cdot \sin t\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
cos-atan99.8%
hypot-1-def99.8%
associate-/r/99.8%
*-commutative99.8%
add-sqr-sqrt46.8%
sqrt-unprod91.8%
sqr-neg91.8%
sqrt-unprod53.0%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
associate-*r*99.8%
sin-atan77.2%
associate-*r/76.3%
associate-/r/75.7%
*-commutative75.7%
add-sqr-sqrt34.8%
sqrt-unprod62.0%
sqr-neg62.0%
sqrt-unprod40.3%
add-sqr-sqrt74.7%
hypot-1-def78.1%
associate-/r/78.0%
*-commutative78.0%
Applied egg-rr78.0%
associate-*l*77.9%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in eh around inf 98.1%
Final simplification98.1%
(FPCore (eh ew t) :precision binary64 (fabs (+ (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew)))))) (* eh (sin t)))))
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))));
}
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))));
}
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))))
function code(eh, ew, t) return abs(Float64(Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))))) + Float64(eh * sin(t)))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) + (eh * sin(t)))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) + eh \cdot \sin t\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
cos-atan99.8%
hypot-1-def99.8%
associate-/r/99.8%
*-commutative99.8%
add-sqr-sqrt46.8%
sqrt-unprod91.8%
sqr-neg91.8%
sqrt-unprod53.0%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
associate-*r*99.8%
sin-atan77.2%
associate-*r/76.3%
associate-/r/75.7%
*-commutative75.7%
add-sqr-sqrt34.8%
sqrt-unprod62.0%
sqr-neg62.0%
sqrt-unprod40.3%
add-sqr-sqrt74.7%
hypot-1-def78.1%
associate-/r/78.0%
*-commutative78.0%
Applied egg-rr78.0%
associate-*l*77.9%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in eh around -inf 98.1%
mul-1-neg98.1%
distribute-rgt-neg-in98.1%
Simplified98.1%
Final simplification98.1%
(FPCore (eh ew t)
:precision binary64
(fabs
(*
ew
(*
(cos t)
(cos (atan (/ (- eh) (+ (* -0.3333333333333333 (* ew t)) (/ ew t)))))))))
double code(double eh, double ew, double t) {
return fabs((ew * (cos(t) * cos(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / 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) * cos(atan((-eh / (((-0.3333333333333333d0) * (ew * t)) + (ew / t))))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew * (Math.cos(t) * Math.cos(Math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))))))));
}
def code(eh, ew, t): return math.fabs((ew * (math.cos(t) * math.cos(math.atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t))))))))
function code(eh, ew, t) return abs(Float64(ew * Float64(cos(t) * cos(atan(Float64(Float64(-eh) / Float64(Float64(-0.3333333333333333 * Float64(ew * t)) + Float64(ew / t)))))))) end
function tmp = code(eh, ew, t) tmp = abs((ew * (cos(t) * cos(atan((-eh / ((-0.3333333333333333 * (ew * t)) + (ew / t)))))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[((-eh) / N[(N[(-0.3333333333333333 * N[(ew * t), $MachinePrecision]), $MachinePrecision] + N[(ew / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{-0.3333333333333333 \cdot \left(ew \cdot t\right) + \frac{ew}{t}}\right)\right)\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
sin-mult58.8%
associate-*r/58.8%
Applied egg-rr57.3%
+-inverses57.3%
mul0-rgt57.3%
metadata-eval57.3%
Simplified57.3%
Taylor expanded in t around 0 57.4%
Final simplification57.4%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew))))))))
double code(double eh, double ew, double t) {
return fabs((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / 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)))))));
}
def code(eh, ew, t): return math.fabs((ew * (math.cos(t) * (1.0 / math.hypot(1.0, (math.tan(t) * (eh / ew)))))))
function code(eh, ew, t) return abs(Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew))))))) end
function tmp = code(eh, ew, t) tmp = abs((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew))))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right)\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
cos-atan99.8%
hypot-1-def99.8%
associate-/r/99.8%
*-commutative99.8%
add-sqr-sqrt46.8%
sqrt-unprod91.8%
sqr-neg91.8%
sqrt-unprod53.0%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
sin-mult58.8%
associate-*r/58.8%
Applied egg-rr57.0%
+-inverses57.3%
mul0-rgt57.3%
metadata-eval57.3%
Simplified57.0%
Final simplification57.0%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (* (cos t) (cos (atan (/ (* t (- eh)) ew)))))))
double code(double eh, double ew, double t) {
return fabs((ew * (cos(t) * cos(atan(((t * -eh) / 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(((t * -eh) / ew))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew * (Math.cos(t) * Math.cos(Math.atan(((t * -eh) / ew))))));
}
def code(eh, ew, t): return math.fabs((ew * (math.cos(t) * math.cos(math.atan(((t * -eh) / ew))))))
function code(eh, ew, t) return abs(Float64(ew * Float64(cos(t) * cos(atan(Float64(Float64(t * Float64(-eh)) / ew)))))) end
function tmp = code(eh, ew, t) tmp = abs((ew * (cos(t) * cos(atan(((t * -eh) / ew)))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(t * (-eh)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{t \cdot \left(-eh\right)}{ew}\right)\right)\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
sin-mult58.8%
associate-*r/58.8%
Applied egg-rr57.3%
+-inverses57.3%
mul0-rgt57.3%
metadata-eval57.3%
Simplified57.3%
Taylor expanded in t around 0 45.2%
associate-*r/45.2%
mul-1-neg45.2%
*-commutative45.2%
distribute-rgt-neg-in45.2%
Simplified45.2%
Final simplification45.2%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (cos (atan (* (tan t) (/ eh ew)))))))
double code(double eh, double ew, double t) {
return fabs((ew * cos(atan((tan(t) * (eh / 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(atan((tan(t) * (eh / ew))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew * Math.cos(Math.atan((Math.tan(t) * (eh / ew))))));
}
def code(eh, ew, t): return math.fabs((ew * math.cos(math.atan((math.tan(t) * (eh / ew))))))
function code(eh, ew, t) return abs(Float64(ew * cos(atan(Float64(tan(t) * Float64(eh / ew)))))) end
function tmp = code(eh, ew, t) tmp = abs((ew * cos(atan((tan(t) * (eh / ew)))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[Cos[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \cos \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right)\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
sin-mult58.8%
associate-*r/58.8%
Applied egg-rr57.3%
+-inverses57.3%
mul0-rgt57.3%
metadata-eval57.3%
Simplified57.3%
Taylor expanded in t around 0 38.4%
*-commutative38.4%
mul-1-neg38.4%
associate-*r/38.4%
distribute-rgt-neg-in38.4%
distribute-frac-neg38.4%
Simplified38.4%
add-exp-log16.9%
Applied egg-rr16.9%
add-exp-log38.4%
*-commutative38.4%
Applied egg-rr38.4%
Final simplification38.4%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (/ 1.0 (hypot 1.0 (/ (tan t) (/ ew (- eh))))))))
double code(double eh, double ew, double t) {
return fabs((ew * (1.0 / hypot(1.0, (tan(t) / (ew / -eh))))));
}
public static double code(double eh, double ew, double t) {
return Math.abs((ew * (1.0 / Math.hypot(1.0, (Math.tan(t) / (ew / -eh))))));
}
def code(eh, ew, t): return math.fabs((ew * (1.0 / math.hypot(1.0, (math.tan(t) / (ew / -eh))))))
function code(eh, ew, t) return abs(Float64(ew * Float64(1.0 / hypot(1.0, Float64(tan(t) / Float64(ew / Float64(-eh))))))) end
function tmp = code(eh, ew, t) tmp = abs((ew * (1.0 / hypot(1.0, (tan(t) / (ew / -eh)))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] / N[(ew / (-eh)), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{\tan t}{\frac{ew}{-eh}}\right)}\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
sin-mult58.8%
associate-*r/58.8%
Applied egg-rr57.3%
+-inverses57.3%
mul0-rgt57.3%
metadata-eval57.3%
Simplified57.3%
Taylor expanded in t around 0 38.4%
*-commutative38.4%
mul-1-neg38.4%
associate-*r/38.4%
distribute-rgt-neg-in38.4%
distribute-frac-neg38.4%
Simplified38.4%
cos-atan38.1%
Applied egg-rr38.1%
hypot-1-def38.1%
associate-*r/38.1%
associate-/l*38.1%
Simplified38.1%
Final simplification38.1%
(FPCore (eh ew t) :precision binary64 (fabs (/ ew (hypot 1.0 (* eh (/ (tan t) ew))))))
double code(double eh, double ew, double t) {
return fabs((ew / hypot(1.0, (eh * (tan(t) / ew)))));
}
public static double code(double eh, double ew, double t) {
return Math.abs((ew / Math.hypot(1.0, (eh * (Math.tan(t) / ew)))));
}
def code(eh, ew, t): return math.fabs((ew / math.hypot(1.0, (eh * (math.tan(t) / ew)))))
function code(eh, ew, t) return abs(Float64(ew / hypot(1.0, Float64(eh * Float64(tan(t) / ew))))) end
function tmp = code(eh, ew, t) tmp = abs((ew / hypot(1.0, (eh * (tan(t) / ew))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew / N[Sqrt[1.0 ^ 2 + N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{ew}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
sin-mult58.8%
associate-*r/58.8%
Applied egg-rr57.3%
+-inverses57.3%
mul0-rgt57.3%
metadata-eval57.3%
Simplified57.3%
Taylor expanded in t around 0 38.4%
*-commutative38.4%
mul-1-neg38.4%
associate-*r/38.4%
distribute-rgt-neg-in38.4%
distribute-frac-neg38.4%
Simplified38.4%
add-exp-log16.9%
Applied egg-rr16.9%
add-exp-log38.4%
expm1-log1p-u24.8%
expm1-udef14.3%
Applied egg-rr14.3%
expm1-def24.6%
expm1-log1p38.1%
associate-*l/38.1%
*-lft-identity38.1%
times-frac38.1%
/-rgt-identity38.1%
Simplified38.1%
Final simplification38.1%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (cos (atan (* eh (/ t ew)))))))
double code(double eh, double ew, double t) {
return fabs((ew * cos(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(atan((eh * (t / ew))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew * Math.cos(Math.atan((eh * (t / ew))))));
}
def code(eh, ew, t): return math.fabs((ew * math.cos(math.atan((eh * (t / ew))))))
function code(eh, ew, t) return abs(Float64(ew * cos(atan(Float64(eh * Float64(t / ew)))))) end
function tmp = code(eh, ew, t) tmp = abs((ew * cos(atan((eh * (t / ew)))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[Cos[N[ArcTan[N[(eh * N[(t / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \cos \tan^{-1} \left(eh \cdot \frac{t}{ew}\right)\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
sin-mult58.8%
associate-*r/58.8%
Applied egg-rr57.3%
+-inverses57.3%
mul0-rgt57.3%
metadata-eval57.3%
Simplified57.3%
Taylor expanded in t around 0 38.4%
*-commutative38.4%
mul-1-neg38.4%
associate-*r/38.4%
distribute-rgt-neg-in38.4%
distribute-frac-neg38.4%
Simplified38.4%
Taylor expanded in t around 0 37.0%
*-commutative37.0%
associate-*l/37.0%
neg-mul-137.0%
distribute-rgt-neg-in37.0%
Simplified37.0%
expm1-log1p-u37.0%
expm1-udef35.5%
*-commutative35.5%
clear-num35.5%
un-div-inv35.5%
add-sqr-sqrt16.5%
sqrt-unprod34.8%
sqr-neg34.8%
sqrt-unprod19.0%
add-sqr-sqrt35.5%
Applied egg-rr35.5%
expm1-def37.0%
expm1-log1p37.0%
associate-/r/37.0%
Simplified37.0%
Final simplification37.0%
(FPCore (eh ew t) :precision binary64 (fabs (/ ew (hypot 1.0 (* eh (/ t ew))))))
double code(double eh, double ew, double t) {
return fabs((ew / hypot(1.0, (eh * (t / ew)))));
}
public static double code(double eh, double ew, double t) {
return Math.abs((ew / Math.hypot(1.0, (eh * (t / ew)))));
}
def code(eh, ew, t): return math.fabs((ew / math.hypot(1.0, (eh * (t / ew)))))
function code(eh, ew, t) return abs(Float64(ew / hypot(1.0, Float64(eh * Float64(t / ew))))) end
function tmp = code(eh, ew, t) tmp = abs((ew / hypot(1.0, (eh * (t / ew))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew / N[Sqrt[1.0 ^ 2 + N[(eh * N[(t / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{ew}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{ew}\right)}\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
sin-mult58.8%
associate-*r/58.8%
Applied egg-rr57.3%
+-inverses57.3%
mul0-rgt57.3%
metadata-eval57.3%
Simplified57.3%
Taylor expanded in t around 0 38.4%
*-commutative38.4%
mul-1-neg38.4%
associate-*r/38.4%
distribute-rgt-neg-in38.4%
distribute-frac-neg38.4%
Simplified38.4%
Taylor expanded in t around 0 37.0%
*-commutative37.0%
associate-*l/37.0%
neg-mul-137.0%
distribute-rgt-neg-in37.0%
Simplified37.0%
expm1-log1p-u23.7%
expm1-udef13.9%
Applied egg-rr13.8%
expm1-def23.1%
expm1-log1p36.1%
associate-/r/36.1%
Simplified36.1%
Final simplification36.1%
(FPCore (eh ew t) :precision binary64 (fabs (/ ew (hypot 1.0 (/ t (/ ew eh))))))
double code(double eh, double ew, double t) {
return fabs((ew / hypot(1.0, (t / (ew / eh)))));
}
public static double code(double eh, double ew, double t) {
return Math.abs((ew / Math.hypot(1.0, (t / (ew / eh)))));
}
def code(eh, ew, t): return math.fabs((ew / math.hypot(1.0, (t / (ew / eh)))))
function code(eh, ew, t) return abs(Float64(ew / hypot(1.0, Float64(t / Float64(ew / eh))))) end
function tmp = code(eh, ew, t) tmp = abs((ew / hypot(1.0, (t / (ew / eh))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew / N[Sqrt[1.0 ^ 2 + N[(t / N[(ew / eh), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{ew}{\mathsf{hypot}\left(1, \frac{t}{\frac{ew}{eh}}\right)}\right|
\end{array}
Initial program 99.8%
fabs-neg99.8%
sub0-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
Simplified99.8%
sin-mult58.8%
associate-*r/58.8%
Applied egg-rr57.3%
+-inverses57.3%
mul0-rgt57.3%
metadata-eval57.3%
Simplified57.3%
Taylor expanded in t around 0 38.4%
*-commutative38.4%
mul-1-neg38.4%
associate-*r/38.4%
distribute-rgt-neg-in38.4%
distribute-frac-neg38.4%
Simplified38.4%
Taylor expanded in t around 0 37.0%
*-commutative37.0%
associate-*l/37.0%
neg-mul-137.0%
distribute-rgt-neg-in37.0%
Simplified37.0%
cos-atan36.1%
un-div-inv36.1%
hypot-1-def36.1%
*-commutative36.1%
clear-num36.1%
un-div-inv36.1%
add-sqr-sqrt16.7%
sqrt-unprod35.1%
sqr-neg35.1%
sqrt-unprod19.4%
add-sqr-sqrt36.1%
Applied egg-rr36.1%
Final simplification36.1%
herbie shell --seed 2023194
(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)))))))