
(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 21 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 (let* ((t_1 (atan (* eh (/ (tan t) (- ew)))))) (fabs (fma ew (* (cos t_1) (- (cos t))) (* eh (* (sin t) (sin t_1)))))))
double code(double eh, double ew, double t) {
double t_1 = atan((eh * (tan(t) / -ew)));
return fabs(fma(ew, (cos(t_1) * -cos(t)), (eh * (sin(t) * sin(t_1)))));
}
function code(eh, ew, t) t_1 = atan(Float64(eh * Float64(tan(t) / Float64(-ew)))) return abs(fma(ew, Float64(cos(t_1) * Float64(-cos(t))), Float64(eh * Float64(sin(t) * sin(t_1))))) end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(ew * N[(N[Cos[t$95$1], $MachinePrecision] * (-N[Cos[t], $MachinePrecision])), $MachinePrecision] + N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\left|\mathsf{fma}\left(ew, \cos t\_1 \cdot \left(-\cos t\right), eh \cdot \left(\sin t \cdot \sin t\_1\right)\right)\right|
\end{array}
\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%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (* eh (/ (tan t) (- ew)))))) (fabs (- (* (cos t_1) (* ew (cos t))) (* eh (* (sin t) (sin t_1)))))))
double code(double eh, double ew, double t) {
double t_1 = atan((eh * (tan(t) / -ew)));
return fabs(((cos(t_1) * (ew * cos(t))) - (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(((cos(t_1) * (ew * cos(t))) - (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(((Math.cos(t_1) * (ew * Math.cos(t))) - (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(((math.cos(t_1) * (ew * math.cos(t))) - (eh * (math.sin(t) * math.sin(t_1)))))
function code(eh, ew, t) t_1 = atan(Float64(eh * Float64(tan(t) / Float64(-ew)))) return abs(Float64(Float64(cos(t_1) * Float64(ew * cos(t))) - Float64(eh * Float64(sin(t) * sin(t_1))))) end
function tmp = code(eh, ew, t) t_1 = atan((eh * (tan(t) / -ew))); tmp = abs(((cos(t_1) * (ew * cos(t))) - (eh * (sin(t) * sin(t_1))))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[Cos[t$95$1], $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\left|\cos t\_1 \cdot \left(ew \cdot \cos t\right) - eh \cdot \left(\sin t \cdot \sin t\_1\right)\right|
\end{array}
\end{array}
Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (cos (atan (* eh (/ (tan t) (- ew)))))))
(if (or (<= ew -1.02e+117) (not (<= ew 6.5e+122)))
(fabs (* t_1 (* ew (cos t))))
(fabs
(*
eh
(-
(* ew (* t_1 (/ (cos t) eh)))
(* (sin t) (sin (atan (* eh (/ t (- ew))))))))))))
double code(double eh, double ew, double t) {
double t_1 = cos(atan((eh * (tan(t) / -ew))));
double tmp;
if ((ew <= -1.02e+117) || !(ew <= 6.5e+122)) {
tmp = fabs((t_1 * (ew * cos(t))));
} else {
tmp = fabs((eh * ((ew * (t_1 * (cos(t) / eh))) - (sin(t) * sin(atan((eh * (t / -ew))))))));
}
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) :: t_1
real(8) :: tmp
t_1 = cos(atan((eh * (tan(t) / -ew))))
if ((ew <= (-1.02d+117)) .or. (.not. (ew <= 6.5d+122))) then
tmp = abs((t_1 * (ew * cos(t))))
else
tmp = abs((eh * ((ew * (t_1 * (cos(t) / eh))) - (sin(t) * sin(atan((eh * (t / -ew))))))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.cos(Math.atan((eh * (Math.tan(t) / -ew))));
double tmp;
if ((ew <= -1.02e+117) || !(ew <= 6.5e+122)) {
tmp = Math.abs((t_1 * (ew * Math.cos(t))));
} else {
tmp = Math.abs((eh * ((ew * (t_1 * (Math.cos(t) / eh))) - (Math.sin(t) * Math.sin(Math.atan((eh * (t / -ew))))))));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.cos(math.atan((eh * (math.tan(t) / -ew)))) tmp = 0 if (ew <= -1.02e+117) or not (ew <= 6.5e+122): tmp = math.fabs((t_1 * (ew * math.cos(t)))) else: tmp = math.fabs((eh * ((ew * (t_1 * (math.cos(t) / eh))) - (math.sin(t) * math.sin(math.atan((eh * (t / -ew)))))))) return tmp
function code(eh, ew, t) t_1 = cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) tmp = 0.0 if ((ew <= -1.02e+117) || !(ew <= 6.5e+122)) tmp = abs(Float64(t_1 * Float64(ew * cos(t)))); else tmp = abs(Float64(eh * Float64(Float64(ew * Float64(t_1 * Float64(cos(t) / eh))) - Float64(sin(t) * sin(atan(Float64(eh * Float64(t / Float64(-ew))))))))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = cos(atan((eh * (tan(t) / -ew)))); tmp = 0.0; if ((ew <= -1.02e+117) || ~((ew <= 6.5e+122))) tmp = abs((t_1 * (ew * cos(t)))); else tmp = abs((eh * ((ew * (t_1 * (cos(t) / eh))) - (sin(t) * sin(atan((eh * (t / -ew)))))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[ew, -1.02e+117], N[Not[LessEqual[ew, 6.5e+122]], $MachinePrecision]], N[Abs[N[(t$95$1 * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(eh * N[(N[(ew * N[(t$95$1 * N[(N[Cos[t], $MachinePrecision] / eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(t / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\mathbf{if}\;ew \leq -1.02 \cdot 10^{+117} \lor \neg \left(ew \leq 6.5 \cdot 10^{+122}\right):\\
\;\;\;\;\left|t\_1 \cdot \left(ew \cdot \cos t\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|eh \cdot \left(ew \cdot \left(t\_1 \cdot \frac{\cos t}{eh}\right) - \sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right)\right)\right|\\
\end{array}
\end{array}
if ew < -1.02e117 or 6.49999999999999963e122 < ew Initial program 99.9%
sub-neg99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
cancel-sign-sub99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in ew around inf 93.8%
associate-*r*93.8%
*-commutative93.8%
mul-1-neg93.8%
distribute-frac-neg293.8%
associate-/l*93.8%
Simplified93.8%
if -1.02e117 < ew < 6.49999999999999963e122Initial 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%
Taylor expanded in eh around inf 98.1%
+-commutative98.1%
fma-define98.1%
mul-1-neg98.1%
remove-double-neg98.1%
neg-mul-198.1%
fma-neg98.1%
Simplified98.1%
Taylor expanded in t around 0 97.3%
mul-1-neg97.3%
associate-/l*97.3%
distribute-lft-neg-in97.3%
Simplified97.3%
Final simplification96.2%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (* eh (/ (tan t) (- ew))))) (t_2 (cos t_1)))
(if (or (<= eh -4.6e-55) (not (<= eh 9.5e-51)))
(fabs (* eh (- (* ew (/ t_2 eh)) (* (sin t) (sin t_1)))))
(fabs (* t_2 (* ew (cos t)))))))
double code(double eh, double ew, double t) {
double t_1 = atan((eh * (tan(t) / -ew)));
double t_2 = cos(t_1);
double tmp;
if ((eh <= -4.6e-55) || !(eh <= 9.5e-51)) {
tmp = fabs((eh * ((ew * (t_2 / eh)) - (sin(t) * sin(t_1)))));
} else {
tmp = fabs((t_2 * (ew * cos(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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = atan((eh * (tan(t) / -ew)))
t_2 = cos(t_1)
if ((eh <= (-4.6d-55)) .or. (.not. (eh <= 9.5d-51))) then
tmp = abs((eh * ((ew * (t_2 / eh)) - (sin(t) * sin(t_1)))))
else
tmp = abs((t_2 * (ew * cos(t))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan((eh * (Math.tan(t) / -ew)));
double t_2 = Math.cos(t_1);
double tmp;
if ((eh <= -4.6e-55) || !(eh <= 9.5e-51)) {
tmp = Math.abs((eh * ((ew * (t_2 / eh)) - (Math.sin(t) * Math.sin(t_1)))));
} else {
tmp = Math.abs((t_2 * (ew * Math.cos(t))));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.atan((eh * (math.tan(t) / -ew))) t_2 = math.cos(t_1) tmp = 0 if (eh <= -4.6e-55) or not (eh <= 9.5e-51): tmp = math.fabs((eh * ((ew * (t_2 / eh)) - (math.sin(t) * math.sin(t_1))))) else: tmp = math.fabs((t_2 * (ew * math.cos(t)))) return tmp
function code(eh, ew, t) t_1 = atan(Float64(eh * Float64(tan(t) / Float64(-ew)))) t_2 = cos(t_1) tmp = 0.0 if ((eh <= -4.6e-55) || !(eh <= 9.5e-51)) tmp = abs(Float64(eh * Float64(Float64(ew * Float64(t_2 / eh)) - Float64(sin(t) * sin(t_1))))); else tmp = abs(Float64(t_2 * Float64(ew * cos(t)))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = atan((eh * (tan(t) / -ew))); t_2 = cos(t_1); tmp = 0.0; if ((eh <= -4.6e-55) || ~((eh <= 9.5e-51))) tmp = abs((eh * ((ew * (t_2 / eh)) - (sin(t) * sin(t_1))))); else tmp = abs((t_2 * (ew * cos(t)))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, If[Or[LessEqual[eh, -4.6e-55], N[Not[LessEqual[eh, 9.5e-51]], $MachinePrecision]], N[Abs[N[(eh * N[(N[(ew * N[(t$95$2 / eh), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(t$95$2 * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
t_2 := \cos t\_1\\
\mathbf{if}\;eh \leq -4.6 \cdot 10^{-55} \lor \neg \left(eh \leq 9.5 \cdot 10^{-51}\right):\\
\;\;\;\;\left|eh \cdot \left(ew \cdot \frac{t\_2}{eh} - \sin t \cdot \sin t\_1\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t\_2 \cdot \left(ew \cdot \cos t\right)\right|\\
\end{array}
\end{array}
if eh < -4.60000000000000023e-55 or 9.4999999999999998e-51 < eh 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%
Taylor expanded in eh around inf 99.7%
+-commutative99.7%
fma-define99.7%
mul-1-neg99.7%
remove-double-neg99.7%
neg-mul-199.7%
fma-neg99.7%
Simplified99.7%
Taylor expanded in t around 0 94.0%
associate-/l*94.0%
mul-1-neg94.0%
distribute-frac-neg294.0%
associate-*r/94.0%
distribute-frac-neg294.0%
distribute-neg-frac94.0%
Simplified94.0%
if -4.60000000000000023e-55 < eh < 9.4999999999999998e-51Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 89.6%
associate-*r*89.6%
*-commutative89.6%
mul-1-neg89.6%
distribute-frac-neg289.6%
associate-/l*89.6%
Simplified89.6%
Final simplification91.9%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (tan t) (/ eh ew)))
(t_2 (* ew (cos t)))
(t_3 (/ eh (/ ew (tan t)))))
(if (<= ew -1.55e-254)
(- (* (- eh) (* (sin t) (sin (atan t_1)))) (/ t_2 (hypot 1.0 t_1)))
(if (<= ew 9e-180)
(fabs (* eh (* (sin t) (sin (atan (* eh (/ t (- ew))))))))
(if (<= ew 7.2e+113)
(+
(* (sin (atan t_3)) (* eh (sin t)))
(* ew (/ (cos t) (hypot 1.0 t_3))))
(fabs (* (cos (atan (* eh (/ (tan t) (- ew))))) t_2)))))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) * (eh / ew);
double t_2 = ew * cos(t);
double t_3 = eh / (ew / tan(t));
double tmp;
if (ew <= -1.55e-254) {
tmp = (-eh * (sin(t) * sin(atan(t_1)))) - (t_2 / hypot(1.0, t_1));
} else if (ew <= 9e-180) {
tmp = fabs((eh * (sin(t) * sin(atan((eh * (t / -ew)))))));
} else if (ew <= 7.2e+113) {
tmp = (sin(atan(t_3)) * (eh * sin(t))) + (ew * (cos(t) / hypot(1.0, t_3)));
} else {
tmp = fabs((cos(atan((eh * (tan(t) / -ew)))) * t_2));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = Math.tan(t) * (eh / ew);
double t_2 = ew * Math.cos(t);
double t_3 = eh / (ew / Math.tan(t));
double tmp;
if (ew <= -1.55e-254) {
tmp = (-eh * (Math.sin(t) * Math.sin(Math.atan(t_1)))) - (t_2 / Math.hypot(1.0, t_1));
} else if (ew <= 9e-180) {
tmp = Math.abs((eh * (Math.sin(t) * Math.sin(Math.atan((eh * (t / -ew)))))));
} else if (ew <= 7.2e+113) {
tmp = (Math.sin(Math.atan(t_3)) * (eh * Math.sin(t))) + (ew * (Math.cos(t) / Math.hypot(1.0, t_3)));
} else {
tmp = Math.abs((Math.cos(Math.atan((eh * (Math.tan(t) / -ew)))) * t_2));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.tan(t) * (eh / ew) t_2 = ew * math.cos(t) t_3 = eh / (ew / math.tan(t)) tmp = 0 if ew <= -1.55e-254: tmp = (-eh * (math.sin(t) * math.sin(math.atan(t_1)))) - (t_2 / math.hypot(1.0, t_1)) elif ew <= 9e-180: tmp = math.fabs((eh * (math.sin(t) * math.sin(math.atan((eh * (t / -ew))))))) elif ew <= 7.2e+113: tmp = (math.sin(math.atan(t_3)) * (eh * math.sin(t))) + (ew * (math.cos(t) / math.hypot(1.0, t_3))) else: tmp = math.fabs((math.cos(math.atan((eh * (math.tan(t) / -ew)))) * t_2)) return tmp
function code(eh, ew, t) t_1 = Float64(tan(t) * Float64(eh / ew)) t_2 = Float64(ew * cos(t)) t_3 = Float64(eh / Float64(ew / tan(t))) tmp = 0.0 if (ew <= -1.55e-254) tmp = Float64(Float64(Float64(-eh) * Float64(sin(t) * sin(atan(t_1)))) - Float64(t_2 / hypot(1.0, t_1))); elseif (ew <= 9e-180) tmp = abs(Float64(eh * Float64(sin(t) * sin(atan(Float64(eh * Float64(t / Float64(-ew)))))))); elseif (ew <= 7.2e+113) tmp = Float64(Float64(sin(atan(t_3)) * Float64(eh * sin(t))) + Float64(ew * Float64(cos(t) / hypot(1.0, t_3)))); else tmp = abs(Float64(cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) * t_2)); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = tan(t) * (eh / ew); t_2 = ew * cos(t); t_3 = eh / (ew / tan(t)); tmp = 0.0; if (ew <= -1.55e-254) tmp = (-eh * (sin(t) * sin(atan(t_1)))) - (t_2 / hypot(1.0, t_1)); elseif (ew <= 9e-180) tmp = abs((eh * (sin(t) * sin(atan((eh * (t / -ew))))))); elseif (ew <= 7.2e+113) tmp = (sin(atan(t_3)) * (eh * sin(t))) + (ew * (cos(t) / hypot(1.0, t_3))); else tmp = abs((cos(atan((eh * (tan(t) / -ew)))) * t_2)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(eh / N[(ew / N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -1.55e-254], N[(N[((-eh) * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 9e-180], N[Abs[N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(t / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 7.2e+113], N[(N[(N[Sin[N[ArcTan[t$95$3], $MachinePrecision]], $MachinePrecision] * N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(ew * N[(N[Cos[t], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + t$95$3 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan t \cdot \frac{eh}{ew}\\
t_2 := ew \cdot \cos t\\
t_3 := \frac{eh}{\frac{ew}{\tan t}}\\
\mathbf{if}\;ew \leq -1.55 \cdot 10^{-254}:\\
\;\;\;\;\left(-eh\right) \cdot \left(\sin t \cdot \sin \tan^{-1} t\_1\right) - \frac{t\_2}{\mathsf{hypot}\left(1, t\_1\right)}\\
\mathbf{elif}\;ew \leq 9 \cdot 10^{-180}:\\
\;\;\;\;\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right)\right)\right|\\
\mathbf{elif}\;ew \leq 7.2 \cdot 10^{+113}:\\
\;\;\;\;\sin \tan^{-1} t\_3 \cdot \left(eh \cdot \sin t\right) + ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, t\_3\right)}\\
\mathbf{else}:\\
\;\;\;\;\left|\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot t\_2\right|\\
\end{array}
\end{array}
if ew < -1.54999999999999994e-254Initial program 99.9%
sub-neg99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
cancel-sign-sub99.9%
associate-/l*99.9%
Simplified99.9%
Applied egg-rr80.6%
neg-sub080.6%
fma-undefine80.6%
associate-*r*80.6%
fma-undefine80.6%
associate-/r/80.6%
*-commutative80.6%
associate-*r/80.6%
*-commutative80.6%
associate-/l*80.6%
Simplified80.6%
fma-undefine80.6%
associate-*r/80.6%
Applied egg-rr80.6%
if -1.54999999999999994e-254 < ew < 9.00000000000000019e-180Initial program 99.6%
sub-neg99.6%
associate-*l*99.6%
distribute-rgt-neg-in99.6%
cancel-sign-sub99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in ew around inf 62.3%
+-commutative62.3%
mul-1-neg62.3%
unsub-neg62.3%
*-commutative62.3%
mul-1-neg62.3%
distribute-frac-neg262.3%
associate-/l*62.3%
Simplified62.2%
Taylor expanded in ew around 0 87.9%
associate-*r*87.9%
neg-mul-187.9%
mul-1-neg87.9%
distribute-frac-neg287.9%
associate-*r/87.9%
Simplified87.9%
Taylor expanded in t around 0 87.9%
mul-1-neg99.2%
associate-/l*99.2%
distribute-lft-neg-in99.2%
Simplified87.9%
if 9.00000000000000019e-180 < ew < 7.19999999999999984e113Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Applied egg-rr78.9%
if 7.19999999999999984e113 < ew Initial program 99.7%
sub-neg99.7%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 92.6%
associate-*r*92.6%
*-commutative92.6%
mul-1-neg92.6%
distribute-frac-neg292.6%
associate-/l*92.6%
Simplified92.6%
Final simplification83.1%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (* (* eh (sin t)) (sin (atan (/ (* eh (- t)) ew))))))
(t_2 (atan (* eh (/ (tan t) (- ew)))))
(t_3 (cos t_2)))
(if (<= eh -4.4e+69)
t_1
(if (<= eh -4.8e-55)
(fabs (- (* (sin t_2) (* eh t)) (* ew t_3)))
(if (<= eh 3.4e+104) (fabs (* t_3 (* ew (cos t)))) t_1)))))
double code(double eh, double ew, double t) {
double t_1 = fabs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
double t_2 = atan((eh * (tan(t) / -ew)));
double t_3 = cos(t_2);
double tmp;
if (eh <= -4.4e+69) {
tmp = t_1;
} else if (eh <= -4.8e-55) {
tmp = fabs(((sin(t_2) * (eh * t)) - (ew * t_3)));
} else if (eh <= 3.4e+104) {
tmp = fabs((t_3 * (ew * cos(t))));
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))))
t_2 = atan((eh * (tan(t) / -ew)))
t_3 = cos(t_2)
if (eh <= (-4.4d+69)) then
tmp = t_1
else if (eh <= (-4.8d-55)) then
tmp = abs(((sin(t_2) * (eh * t)) - (ew * t_3)))
else if (eh <= 3.4d+104) then
tmp = abs((t_3 * (ew * cos(t))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * -t) / ew)))));
double t_2 = Math.atan((eh * (Math.tan(t) / -ew)));
double t_3 = Math.cos(t_2);
double tmp;
if (eh <= -4.4e+69) {
tmp = t_1;
} else if (eh <= -4.8e-55) {
tmp = Math.abs(((Math.sin(t_2) * (eh * t)) - (ew * t_3)));
} else if (eh <= 3.4e+104) {
tmp = Math.abs((t_3 * (ew * Math.cos(t))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs(((eh * math.sin(t)) * math.sin(math.atan(((eh * -t) / ew))))) t_2 = math.atan((eh * (math.tan(t) / -ew))) t_3 = math.cos(t_2) tmp = 0 if eh <= -4.4e+69: tmp = t_1 elif eh <= -4.8e-55: tmp = math.fabs(((math.sin(t_2) * (eh * t)) - (ew * t_3))) elif eh <= 3.4e+104: tmp = math.fabs((t_3 * (ew * math.cos(t)))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * Float64(-t)) / ew))))) t_2 = atan(Float64(eh * Float64(tan(t) / Float64(-ew)))) t_3 = cos(t_2) tmp = 0.0 if (eh <= -4.4e+69) tmp = t_1; elseif (eh <= -4.8e-55) tmp = abs(Float64(Float64(sin(t_2) * Float64(eh * t)) - Float64(ew * t_3))); elseif (eh <= 3.4e+104) tmp = abs(Float64(t_3 * Float64(ew * cos(t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew))))); t_2 = atan((eh * (tan(t) / -ew))); t_3 = cos(t_2); tmp = 0.0; if (eh <= -4.4e+69) tmp = t_1; elseif (eh <= -4.8e-55) tmp = abs(((sin(t_2) * (eh * t)) - (ew * t_3))); elseif (eh <= 3.4e+104) tmp = abs((t_3 * (ew * cos(t)))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$2], $MachinePrecision]}, If[LessEqual[eh, -4.4e+69], t$95$1, If[LessEqual[eh, -4.8e-55], N[Abs[N[(N[(N[Sin[t$95$2], $MachinePrecision] * N[(eh * t), $MachinePrecision]), $MachinePrecision] - N[(ew * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 3.4e+104], N[Abs[N[(t$95$3 * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\
t_2 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
t_3 := \cos t\_2\\
\mathbf{if}\;eh \leq -4.4 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;eh \leq -4.8 \cdot 10^{-55}:\\
\;\;\;\;\left|\sin t\_2 \cdot \left(eh \cdot t\right) - ew \cdot t\_3\right|\\
\mathbf{elif}\;eh \leq 3.4 \cdot 10^{+104}:\\
\;\;\;\;\left|t\_3 \cdot \left(ew \cdot \cos t\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if eh < -4.4000000000000003e69 or 3.3999999999999997e104 < eh Initial program 99.7%
sub-neg99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
cancel-sign-sub99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in ew around inf 82.9%
+-commutative82.9%
mul-1-neg82.9%
unsub-neg82.9%
*-commutative82.9%
mul-1-neg82.9%
distribute-frac-neg282.9%
associate-/l*82.9%
Simplified82.7%
add-log-exp82.7%
exp-prod82.7%
Applied egg-rr82.7%
Taylor expanded in t around 0 81.8%
mul-1-neg98.8%
associate-/l*98.8%
distribute-lft-neg-in98.8%
Simplified81.8%
Taylor expanded in ew around 0 79.2%
mul-1-neg79.2%
associate-*r*79.2%
distribute-rgt-neg-in79.2%
associate-/l*79.2%
mul-1-neg79.2%
distribute-lft-neg-in79.2%
Simplified79.2%
if -4.4000000000000003e69 < eh < -4.79999999999999983e-55Initial program 99.9%
fabs-sub99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
fma-define100.0%
Simplified100.0%
Taylor expanded in t around 0 80.8%
+-commutative80.8%
mul-1-neg80.8%
unsub-neg80.8%
associate-*r*80.8%
mul-1-neg80.8%
distribute-frac-neg280.8%
associate-/l*80.8%
mul-1-neg80.8%
distribute-frac-neg280.8%
associate-/l*80.8%
Simplified80.8%
if -4.79999999999999983e-55 < eh < 3.3999999999999997e104Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 84.7%
associate-*r*84.7%
*-commutative84.7%
mul-1-neg84.7%
distribute-frac-neg284.7%
associate-/l*84.7%
Simplified84.7%
Final simplification82.5%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (* (* eh (sin t)) (sin (atan (/ (* eh (- t)) ew))))))
(t_2 (cos (atan (* eh (/ (tan t) (- ew)))))))
(if (<= eh -5.3e+70)
t_1
(if (<= eh -7e-55)
(fabs (- (* (* eh t) (sin (atan (* eh (/ t (- ew)))))) (* ew t_2)))
(if (<= eh 4.8e+104) (fabs (* t_2 (* ew (cos t)))) t_1)))))
double code(double eh, double ew, double t) {
double t_1 = fabs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
double t_2 = cos(atan((eh * (tan(t) / -ew))));
double tmp;
if (eh <= -5.3e+70) {
tmp = t_1;
} else if (eh <= -7e-55) {
tmp = fabs((((eh * t) * sin(atan((eh * (t / -ew))))) - (ew * t_2)));
} else if (eh <= 4.8e+104) {
tmp = fabs((t_2 * (ew * cos(t))));
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))))
t_2 = cos(atan((eh * (tan(t) / -ew))))
if (eh <= (-5.3d+70)) then
tmp = t_1
else if (eh <= (-7d-55)) then
tmp = abs((((eh * t) * sin(atan((eh * (t / -ew))))) - (ew * t_2)))
else if (eh <= 4.8d+104) then
tmp = abs((t_2 * (ew * cos(t))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * -t) / ew)))));
double t_2 = Math.cos(Math.atan((eh * (Math.tan(t) / -ew))));
double tmp;
if (eh <= -5.3e+70) {
tmp = t_1;
} else if (eh <= -7e-55) {
tmp = Math.abs((((eh * t) * Math.sin(Math.atan((eh * (t / -ew))))) - (ew * t_2)));
} else if (eh <= 4.8e+104) {
tmp = Math.abs((t_2 * (ew * Math.cos(t))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs(((eh * math.sin(t)) * math.sin(math.atan(((eh * -t) / ew))))) t_2 = math.cos(math.atan((eh * (math.tan(t) / -ew)))) tmp = 0 if eh <= -5.3e+70: tmp = t_1 elif eh <= -7e-55: tmp = math.fabs((((eh * t) * math.sin(math.atan((eh * (t / -ew))))) - (ew * t_2))) elif eh <= 4.8e+104: tmp = math.fabs((t_2 * (ew * math.cos(t)))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * Float64(-t)) / ew))))) t_2 = cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) tmp = 0.0 if (eh <= -5.3e+70) tmp = t_1; elseif (eh <= -7e-55) tmp = abs(Float64(Float64(Float64(eh * t) * sin(atan(Float64(eh * Float64(t / Float64(-ew)))))) - Float64(ew * t_2))); elseif (eh <= 4.8e+104) tmp = abs(Float64(t_2 * Float64(ew * cos(t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew))))); t_2 = cos(atan((eh * (tan(t) / -ew)))); tmp = 0.0; if (eh <= -5.3e+70) tmp = t_1; elseif (eh <= -7e-55) tmp = abs((((eh * t) * sin(atan((eh * (t / -ew))))) - (ew * t_2))); elseif (eh <= 4.8e+104) tmp = abs((t_2 * (ew * cos(t)))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -5.3e+70], t$95$1, If[LessEqual[eh, -7e-55], N[Abs[N[(N[(N[(eh * t), $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(t / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(ew * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 4.8e+104], N[Abs[N[(t$95$2 * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\
t_2 := \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\mathbf{if}\;eh \leq -5.3 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;eh \leq -7 \cdot 10^{-55}:\\
\;\;\;\;\left|\left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right) - ew \cdot t\_2\right|\\
\mathbf{elif}\;eh \leq 4.8 \cdot 10^{+104}:\\
\;\;\;\;\left|t\_2 \cdot \left(ew \cdot \cos t\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if eh < -5.3e70 or 4.8e104 < eh Initial program 99.7%
sub-neg99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
cancel-sign-sub99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in ew around inf 82.9%
+-commutative82.9%
mul-1-neg82.9%
unsub-neg82.9%
*-commutative82.9%
mul-1-neg82.9%
distribute-frac-neg282.9%
associate-/l*82.9%
Simplified82.7%
add-log-exp82.7%
exp-prod82.7%
Applied egg-rr82.7%
Taylor expanded in t around 0 81.8%
mul-1-neg98.8%
associate-/l*98.8%
distribute-lft-neg-in98.8%
Simplified81.8%
Taylor expanded in ew around 0 79.2%
mul-1-neg79.2%
associate-*r*79.2%
distribute-rgt-neg-in79.2%
associate-/l*79.2%
mul-1-neg79.2%
distribute-lft-neg-in79.2%
Simplified79.2%
if -5.3e70 < eh < -7.00000000000000051e-55Initial program 99.9%
sub-neg99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
cancel-sign-sub99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in ew around inf 91.9%
+-commutative91.9%
mul-1-neg91.9%
unsub-neg91.9%
*-commutative91.9%
mul-1-neg91.9%
distribute-frac-neg291.9%
associate-/l*91.9%
Simplified91.8%
add-log-exp91.8%
exp-prod91.8%
Applied egg-rr91.8%
Taylor expanded in t around 0 91.8%
mul-1-neg99.8%
associate-/l*99.8%
distribute-lft-neg-in99.8%
Simplified91.8%
Taylor expanded in t around 0 80.3%
Simplified80.3%
if -7.00000000000000051e-55 < eh < 4.8e104Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 84.7%
associate-*r*84.7%
*-commutative84.7%
mul-1-neg84.7%
distribute-frac-neg284.7%
associate-/l*84.7%
Simplified84.7%
Final simplification82.4%
(FPCore (eh ew t) :precision binary64 (if (or (<= eh -9e+20) (not (<= eh 3.4e+104))) (fabs (* (* eh (sin t)) (sin (atan (/ (* eh (- t)) ew))))) (fabs (* (cos (atan (* eh (/ (tan t) (- ew))))) (* ew (cos t))))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -9e+20) || !(eh <= 3.4e+104)) {
tmp = fabs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
} else {
tmp = fabs((cos(atan((eh * (tan(t) / -ew)))) * (ew * cos(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 ((eh <= (-9d+20)) .or. (.not. (eh <= 3.4d+104))) then
tmp = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))))
else
tmp = abs((cos(atan((eh * (tan(t) / -ew)))) * (ew * cos(t))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -9e+20) || !(eh <= 3.4e+104)) {
tmp = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * -t) / ew)))));
} else {
tmp = Math.abs((Math.cos(Math.atan((eh * (Math.tan(t) / -ew)))) * (ew * Math.cos(t))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -9e+20) or not (eh <= 3.4e+104): tmp = math.fabs(((eh * math.sin(t)) * math.sin(math.atan(((eh * -t) / ew))))) else: tmp = math.fabs((math.cos(math.atan((eh * (math.tan(t) / -ew)))) * (ew * math.cos(t)))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -9e+20) || !(eh <= 3.4e+104)) tmp = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * Float64(-t)) / ew))))); else tmp = abs(Float64(cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) * Float64(ew * cos(t)))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -9e+20) || ~((eh <= 3.4e+104))) tmp = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew))))); else tmp = abs((cos(atan((eh * (tan(t) / -ew)))) * (ew * cos(t)))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -9e+20], N[Not[LessEqual[eh, 3.4e+104]], $MachinePrecision]], N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -9 \cdot 10^{+20} \lor \neg \left(eh \leq 3.4 \cdot 10^{+104}\right):\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(ew \cdot \cos t\right)\right|\\
\end{array}
\end{array}
if eh < -9e20 or 3.3999999999999997e104 < eh Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 83.0%
+-commutative83.0%
mul-1-neg83.0%
unsub-neg83.0%
*-commutative83.0%
mul-1-neg83.0%
distribute-frac-neg283.0%
associate-/l*83.0%
Simplified82.9%
add-log-exp82.8%
exp-prod82.8%
Applied egg-rr82.8%
Taylor expanded in t around 0 82.1%
mul-1-neg98.9%
associate-/l*98.9%
distribute-lft-neg-in98.9%
Simplified82.1%
Taylor expanded in ew around 0 76.8%
mul-1-neg76.8%
associate-*r*76.9%
distribute-rgt-neg-in76.9%
associate-/l*76.9%
mul-1-neg76.9%
distribute-lft-neg-in76.9%
Simplified76.9%
if -9e20 < eh < 3.3999999999999997e104Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 83.1%
associate-*r*83.1%
*-commutative83.1%
mul-1-neg83.1%
distribute-frac-neg283.1%
associate-/l*83.1%
Simplified83.1%
Final simplification80.6%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (* (* eh (sin t)) (sin (atan (/ (* eh (- t)) ew)))))))
(if (<= eh -9.5e+72)
t_1
(if (<= eh -7e-55)
(fabs (+ ew (* eh (* t (sin (atan (* (tan t) (/ eh (- ew)))))))))
(if (<= eh 3.6e+104)
(fabs (* (* ew (cos t)) (/ -1.0 (hypot 1.0 (* eh (/ (tan t) ew))))))
t_1)))))
double code(double eh, double ew, double t) {
double t_1 = fabs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
double tmp;
if (eh <= -9.5e+72) {
tmp = t_1;
} else if (eh <= -7e-55) {
tmp = fabs((ew + (eh * (t * sin(atan((tan(t) * (eh / -ew))))))));
} else if (eh <= 3.6e+104) {
tmp = fabs(((ew * cos(t)) * (-1.0 / hypot(1.0, (eh * (tan(t) / ew))))));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * -t) / ew)))));
double tmp;
if (eh <= -9.5e+72) {
tmp = t_1;
} else if (eh <= -7e-55) {
tmp = Math.abs((ew + (eh * (t * Math.sin(Math.atan((Math.tan(t) * (eh / -ew))))))));
} else if (eh <= 3.6e+104) {
tmp = Math.abs(((ew * Math.cos(t)) * (-1.0 / Math.hypot(1.0, (eh * (Math.tan(t) / ew))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs(((eh * math.sin(t)) * math.sin(math.atan(((eh * -t) / ew))))) tmp = 0 if eh <= -9.5e+72: tmp = t_1 elif eh <= -7e-55: tmp = math.fabs((ew + (eh * (t * math.sin(math.atan((math.tan(t) * (eh / -ew)))))))) elif eh <= 3.6e+104: tmp = math.fabs(((ew * math.cos(t)) * (-1.0 / math.hypot(1.0, (eh * (math.tan(t) / ew)))))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * Float64(-t)) / ew))))) tmp = 0.0 if (eh <= -9.5e+72) tmp = t_1; elseif (eh <= -7e-55) tmp = abs(Float64(ew + Float64(eh * Float64(t * sin(atan(Float64(tan(t) * Float64(eh / Float64(-ew))))))))); elseif (eh <= 3.6e+104) tmp = abs(Float64(Float64(ew * cos(t)) * Float64(-1.0 / hypot(1.0, Float64(eh * Float64(tan(t) / ew)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew))))); tmp = 0.0; if (eh <= -9.5e+72) tmp = t_1; elseif (eh <= -7e-55) tmp = abs((ew + (eh * (t * sin(atan((tan(t) * (eh / -ew)))))))); elseif (eh <= 3.6e+104) tmp = abs(((ew * cos(t)) * (-1.0 / hypot(1.0, (eh * (tan(t) / ew)))))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -9.5e+72], t$95$1, If[LessEqual[eh, -7e-55], N[Abs[N[(ew + N[(eh * N[(t * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 3.6e+104], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / N[Sqrt[1.0 ^ 2 + N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\
\mathbf{if}\;eh \leq -9.5 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;eh \leq -7 \cdot 10^{-55}:\\
\;\;\;\;\left|ew + eh \cdot \left(t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right)\right|\\
\mathbf{elif}\;eh \leq 3.6 \cdot 10^{+104}:\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if eh < -9.50000000000000054e72 or 3.60000000000000001e104 < eh Initial program 99.7%
sub-neg99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
cancel-sign-sub99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in ew around inf 82.9%
+-commutative82.9%
mul-1-neg82.9%
unsub-neg82.9%
*-commutative82.9%
mul-1-neg82.9%
distribute-frac-neg282.9%
associate-/l*82.9%
Simplified82.7%
add-log-exp82.7%
exp-prod82.7%
Applied egg-rr82.7%
Taylor expanded in t around 0 81.8%
mul-1-neg98.8%
associate-/l*98.8%
distribute-lft-neg-in98.8%
Simplified81.8%
Taylor expanded in ew around 0 79.2%
mul-1-neg79.2%
associate-*r*79.2%
distribute-rgt-neg-in79.2%
associate-/l*79.2%
mul-1-neg79.2%
distribute-lft-neg-in79.2%
Simplified79.2%
if -9.50000000000000054e72 < eh < -7.00000000000000051e-55Initial program 99.9%
fabs-sub99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
fma-define100.0%
Simplified100.0%
expm1-log1p-u100.0%
expm1-undefine100.0%
Applied egg-rr97.3%
Taylor expanded in t around 0 78.2%
mul-1-neg78.2%
associate-*l/78.2%
*-commutative78.2%
distribute-rgt-neg-in78.2%
distribute-neg-frac278.2%
Simplified78.2%
if -7.00000000000000051e-55 < eh < 3.60000000000000001e104Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 99.1%
+-commutative99.1%
mul-1-neg99.1%
unsub-neg99.1%
*-commutative99.1%
mul-1-neg99.1%
distribute-frac-neg299.1%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in ew around inf 84.7%
associate-*r*84.7%
mul-1-neg84.7%
associate-*l/84.7%
*-commutative84.7%
distribute-rgt-neg-in84.7%
distribute-neg-frac284.7%
Simplified84.7%
cos-atan84.6%
hypot-1-def84.6%
Applied egg-rr84.6%
hypot-undefine84.6%
metadata-eval84.6%
associate-*r/84.6%
*-commutative84.6%
distribute-frac-neg284.6%
associate-*r/84.6%
associate-*r/84.6%
*-commutative84.6%
distribute-frac-neg284.6%
associate-*r/84.6%
sqr-neg84.6%
hypot-1-def84.6%
Simplified84.6%
Final simplification82.2%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (* (* ew (cos t)) (cos (atan (/ (* eh (- t)) ew)))))))
(if (<= ew -7.6e+26)
t_1
(if (<= ew -3.2e-254)
(- (- ew) (* (* eh t) (sin (atan (* eh (/ (tan t) ew))))))
(if (<= ew 1e-179)
(* eh (* (sin t) (- (sin (atan (/ (* eh t) ew))))))
t_1)))))
double code(double eh, double ew, double t) {
double t_1 = fabs(((ew * cos(t)) * cos(atan(((eh * -t) / ew)))));
double tmp;
if (ew <= -7.6e+26) {
tmp = t_1;
} else if (ew <= -3.2e-254) {
tmp = -ew - ((eh * t) * sin(atan((eh * (tan(t) / ew)))));
} else if (ew <= 1e-179) {
tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew))));
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = abs(((ew * cos(t)) * cos(atan(((eh * -t) / ew)))))
if (ew <= (-7.6d+26)) then
tmp = t_1
else if (ew <= (-3.2d-254)) then
tmp = -ew - ((eh * t) * sin(atan((eh * (tan(t) / ew)))))
else if (ew <= 1d-179) then
tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs(((ew * Math.cos(t)) * Math.cos(Math.atan(((eh * -t) / ew)))));
double tmp;
if (ew <= -7.6e+26) {
tmp = t_1;
} else if (ew <= -3.2e-254) {
tmp = -ew - ((eh * t) * Math.sin(Math.atan((eh * (Math.tan(t) / ew)))));
} else if (ew <= 1e-179) {
tmp = eh * (Math.sin(t) * -Math.sin(Math.atan(((eh * t) / ew))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs(((ew * math.cos(t)) * math.cos(math.atan(((eh * -t) / ew))))) tmp = 0 if ew <= -7.6e+26: tmp = t_1 elif ew <= -3.2e-254: tmp = -ew - ((eh * t) * math.sin(math.atan((eh * (math.tan(t) / ew))))) elif ew <= 1e-179: tmp = eh * (math.sin(t) * -math.sin(math.atan(((eh * t) / ew)))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(eh * Float64(-t)) / ew))))) tmp = 0.0 if (ew <= -7.6e+26) tmp = t_1; elseif (ew <= -3.2e-254) tmp = Float64(Float64(-ew) - Float64(Float64(eh * t) * sin(atan(Float64(eh * Float64(tan(t) / ew)))))); elseif (ew <= 1e-179) tmp = Float64(eh * Float64(sin(t) * Float64(-sin(atan(Float64(Float64(eh * t) / ew)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = abs(((ew * cos(t)) * cos(atan(((eh * -t) / ew))))); tmp = 0.0; if (ew <= -7.6e+26) tmp = t_1; elseif (ew <= -3.2e-254) tmp = -ew - ((eh * t) * sin(atan((eh * (tan(t) / ew))))); elseif (ew <= 1e-179) tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew)))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -7.6e+26], t$95$1, If[LessEqual[ew, -3.2e-254], N[((-ew) - N[(N[(eh * t), $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 1e-179], N[(eh * N[(N[Sin[t], $MachinePrecision] * (-N[Sin[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\
\mathbf{if}\;ew \leq -7.6 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq -3.2 \cdot 10^{-254}:\\
\;\;\;\;\left(-ew\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\\
\mathbf{elif}\;ew \leq 10^{-179}:\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if ew < -7.6000000000000004e26 or 1e-179 < ew Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 99.8%
+-commutative99.8%
mul-1-neg99.8%
unsub-neg99.8%
*-commutative99.8%
mul-1-neg99.8%
distribute-frac-neg299.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 74.1%
associate-*r*74.1%
mul-1-neg74.1%
associate-*l/74.1%
*-commutative74.1%
distribute-rgt-neg-in74.1%
distribute-neg-frac274.1%
Simplified74.1%
Taylor expanded in t around 0 66.3%
associate-/l*66.3%
mul-1-neg66.3%
distribute-lft-neg-in66.3%
Simplified66.3%
if -7.6000000000000004e26 < ew < -3.2e-254Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Applied egg-rr77.4%
neg-sub077.4%
fma-undefine77.4%
associate-*r*77.4%
fma-undefine77.4%
associate-/r/77.4%
*-commutative77.4%
associate-*r/77.4%
*-commutative77.4%
associate-/l*77.4%
Simplified77.4%
Taylor expanded in t around 0 55.8%
mul-1-neg55.8%
associate-*r*55.8%
distribute-lft-neg-in55.8%
distribute-rgt-neg-in55.8%
associate-/l*55.8%
Simplified55.8%
if -3.2e-254 < ew < 1e-179Initial program 99.6%
sub-neg99.6%
associate-*l*99.6%
distribute-rgt-neg-in99.6%
cancel-sign-sub99.6%
associate-/l*99.6%
Simplified99.6%
Applied egg-rr41.2%
neg-sub041.2%
fma-undefine41.2%
associate-*r*41.2%
fma-undefine41.3%
associate-/r/41.3%
*-commutative41.3%
associate-*r/41.3%
*-commutative41.3%
associate-/l*41.3%
Simplified41.3%
Taylor expanded in eh around inf 36.4%
associate-*r*36.4%
neg-mul-136.4%
associate-/l*36.4%
Simplified36.4%
Taylor expanded in t around 0 46.2%
Final simplification60.7%
(FPCore (eh ew t)
:precision binary64
(if (<= ew -2.1e+209)
(* (cos t) (- ew))
(if (<= ew -1.2e-237)
(- (- ew) (* (* eh t) (sin (atan (* eh (/ (tan t) ew))))))
(if (<= ew 1e-179)
(* eh (* (sin t) (- (sin (atan (/ (* eh t) ew))))))
(fabs (* ew (cos (atan (* eh (/ (tan t) (- ew)))))))))))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= -2.1e+209) {
tmp = cos(t) * -ew;
} else if (ew <= -1.2e-237) {
tmp = -ew - ((eh * t) * sin(atan((eh * (tan(t) / ew)))));
} else if (ew <= 1e-179) {
tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew))));
} else {
tmp = fabs((ew * cos(atan((eh * (tan(t) / -ew))))));
}
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 <= (-2.1d+209)) then
tmp = cos(t) * -ew
else if (ew <= (-1.2d-237)) then
tmp = -ew - ((eh * t) * sin(atan((eh * (tan(t) / ew)))))
else if (ew <= 1d-179) then
tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew))))
else
tmp = abs((ew * cos(atan((eh * (tan(t) / -ew))))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (ew <= -2.1e+209) {
tmp = Math.cos(t) * -ew;
} else if (ew <= -1.2e-237) {
tmp = -ew - ((eh * t) * Math.sin(Math.atan((eh * (Math.tan(t) / ew)))));
} else if (ew <= 1e-179) {
tmp = eh * (Math.sin(t) * -Math.sin(Math.atan(((eh * t) / ew))));
} else {
tmp = Math.abs((ew * Math.cos(Math.atan((eh * (Math.tan(t) / -ew))))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if ew <= -2.1e+209: tmp = math.cos(t) * -ew elif ew <= -1.2e-237: tmp = -ew - ((eh * t) * math.sin(math.atan((eh * (math.tan(t) / ew))))) elif ew <= 1e-179: tmp = eh * (math.sin(t) * -math.sin(math.atan(((eh * t) / ew)))) else: tmp = math.fabs((ew * math.cos(math.atan((eh * (math.tan(t) / -ew)))))) return tmp
function code(eh, ew, t) tmp = 0.0 if (ew <= -2.1e+209) tmp = Float64(cos(t) * Float64(-ew)); elseif (ew <= -1.2e-237) tmp = Float64(Float64(-ew) - Float64(Float64(eh * t) * sin(atan(Float64(eh * Float64(tan(t) / ew)))))); elseif (ew <= 1e-179) tmp = Float64(eh * Float64(sin(t) * Float64(-sin(atan(Float64(Float64(eh * t) / ew)))))); else tmp = abs(Float64(ew * cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (ew <= -2.1e+209) tmp = cos(t) * -ew; elseif (ew <= -1.2e-237) tmp = -ew - ((eh * t) * sin(atan((eh * (tan(t) / ew))))); elseif (ew <= 1e-179) tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew)))); else tmp = abs((ew * cos(atan((eh * (tan(t) / -ew)))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[ew, -2.1e+209], N[(N[Cos[t], $MachinePrecision] * (-ew)), $MachinePrecision], If[LessEqual[ew, -1.2e-237], N[((-ew) - N[(N[(eh * t), $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 1e-179], N[(eh * N[(N[Sin[t], $MachinePrecision] * (-N[Sin[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[Abs[N[(ew * N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -2.1 \cdot 10^{+209}:\\
\;\;\;\;\cos t \cdot \left(-ew\right)\\
\mathbf{elif}\;ew \leq -1.2 \cdot 10^{-237}:\\
\;\;\;\;\left(-ew\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\\
\mathbf{elif}\;ew \leq 10^{-179}:\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right|\\
\end{array}
\end{array}
if ew < -2.1e209Initial program 99.9%
sub-neg99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
cancel-sign-sub99.9%
associate-/l*99.9%
Simplified99.9%
Applied egg-rr87.5%
neg-sub087.5%
fma-undefine87.5%
associate-*r*87.5%
fma-undefine87.5%
associate-/r/87.5%
*-commutative87.5%
associate-*r/87.5%
*-commutative87.5%
associate-/l*87.5%
Simplified87.5%
Taylor expanded in eh around 0 87.5%
associate-*r*87.5%
neg-mul-187.5%
Simplified87.5%
if -2.1e209 < ew < -1.2e-237Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Applied egg-rr78.7%
neg-sub078.7%
fma-undefine78.7%
associate-*r*78.7%
fma-undefine78.7%
associate-/r/78.7%
*-commutative78.7%
associate-*r/78.7%
*-commutative78.7%
associate-/l*78.7%
Simplified78.7%
Taylor expanded in t around 0 56.7%
mul-1-neg56.7%
associate-*r*56.7%
distribute-lft-neg-in56.7%
distribute-rgt-neg-in56.7%
associate-/l*56.7%
Simplified56.7%
if -1.2e-237 < ew < 1e-179Initial program 99.6%
sub-neg99.6%
associate-*l*99.6%
distribute-rgt-neg-in99.6%
cancel-sign-sub99.6%
associate-/l*99.6%
Simplified99.6%
Applied egg-rr41.2%
neg-sub041.2%
fma-undefine41.2%
associate-*r*41.2%
fma-undefine41.3%
associate-/r/41.3%
*-commutative41.3%
associate-*r/41.3%
*-commutative41.3%
associate-/l*41.3%
Simplified41.3%
Taylor expanded in eh around inf 36.4%
associate-*r*36.4%
neg-mul-136.4%
associate-/l*36.4%
Simplified36.4%
Taylor expanded in t around 0 46.2%
if 1e-179 < ew Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 48.1%
mul-1-neg48.1%
distribute-frac-neg248.1%
associate-/l*48.1%
Simplified48.1%
Final simplification54.4%
(FPCore (eh ew t) :precision binary64 (if (or (<= eh -2.6e+20) (not (<= eh 5.1e+104))) (fabs (* (* eh (sin t)) (sin (atan (/ (* eh (- t)) ew))))) (fabs (* (* ew (cos t)) (/ -1.0 (hypot 1.0 (* eh (/ (tan t) ew))))))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -2.6e+20) || !(eh <= 5.1e+104)) {
tmp = fabs(((eh * sin(t)) * sin(atan(((eh * -t) / ew)))));
} else {
tmp = fabs(((ew * cos(t)) * (-1.0 / hypot(1.0, (eh * (tan(t) / ew))))));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -2.6e+20) || !(eh <= 5.1e+104)) {
tmp = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * -t) / ew)))));
} else {
tmp = Math.abs(((ew * Math.cos(t)) * (-1.0 / Math.hypot(1.0, (eh * (Math.tan(t) / ew))))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -2.6e+20) or not (eh <= 5.1e+104): tmp = math.fabs(((eh * math.sin(t)) * math.sin(math.atan(((eh * -t) / ew))))) else: tmp = math.fabs(((ew * math.cos(t)) * (-1.0 / math.hypot(1.0, (eh * (math.tan(t) / ew)))))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -2.6e+20) || !(eh <= 5.1e+104)) tmp = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * Float64(-t)) / ew))))); else tmp = abs(Float64(Float64(ew * cos(t)) * Float64(-1.0 / hypot(1.0, Float64(eh * Float64(tan(t) / ew)))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -2.6e+20) || ~((eh <= 5.1e+104))) tmp = abs(((eh * sin(t)) * sin(atan(((eh * -t) / ew))))); else tmp = abs(((ew * cos(t)) * (-1.0 / hypot(1.0, (eh * (tan(t) / ew)))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -2.6e+20], N[Not[LessEqual[eh, 5.1e+104]], $MachinePrecision]], N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / N[Sqrt[1.0 ^ 2 + N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -2.6 \cdot 10^{+20} \lor \neg \left(eh \leq 5.1 \cdot 10^{+104}\right):\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\
\end{array}
\end{array}
if eh < -2.6e20 or 5.1000000000000002e104 < eh Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 83.0%
+-commutative83.0%
mul-1-neg83.0%
unsub-neg83.0%
*-commutative83.0%
mul-1-neg83.0%
distribute-frac-neg283.0%
associate-/l*83.0%
Simplified82.9%
add-log-exp82.8%
exp-prod82.8%
Applied egg-rr82.8%
Taylor expanded in t around 0 82.1%
mul-1-neg98.9%
associate-/l*98.9%
distribute-lft-neg-in98.9%
Simplified82.1%
Taylor expanded in ew around 0 76.8%
mul-1-neg76.8%
associate-*r*76.9%
distribute-rgt-neg-in76.9%
associate-/l*76.9%
mul-1-neg76.9%
distribute-lft-neg-in76.9%
Simplified76.9%
if -2.6e20 < eh < 5.1000000000000002e104Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 99.2%
+-commutative99.2%
mul-1-neg99.2%
unsub-neg99.2%
*-commutative99.2%
mul-1-neg99.2%
distribute-frac-neg299.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in ew around inf 83.1%
associate-*r*83.1%
mul-1-neg83.1%
associate-*l/83.1%
*-commutative83.1%
distribute-rgt-neg-in83.1%
distribute-neg-frac283.1%
Simplified83.1%
cos-atan83.0%
hypot-1-def83.0%
Applied egg-rr83.0%
hypot-undefine83.0%
metadata-eval83.0%
associate-*r/83.0%
*-commutative83.0%
distribute-frac-neg283.0%
associate-*r/83.0%
associate-*r/83.0%
*-commutative83.0%
distribute-frac-neg283.0%
associate-*r/83.0%
sqr-neg83.0%
hypot-1-def83.0%
Simplified83.0%
Final simplification80.6%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (/ (* eh (- t)) ew))))
(if (or (<= eh -8.8e+20) (not (<= eh 3.8e+104)))
(fabs (* (* eh (sin t)) (sin t_1)))
(fabs (* (* ew (cos t)) (cos t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh * -t) / ew));
double tmp;
if ((eh <= -8.8e+20) || !(eh <= 3.8e+104)) {
tmp = fabs(((eh * sin(t)) * sin(t_1)));
} else {
tmp = fabs(((ew * cos(t)) * cos(t_1)));
}
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) :: t_1
real(8) :: tmp
t_1 = atan(((eh * -t) / ew))
if ((eh <= (-8.8d+20)) .or. (.not. (eh <= 3.8d+104))) then
tmp = abs(((eh * sin(t)) * sin(t_1)))
else
tmp = abs(((ew * cos(t)) * cos(t_1)))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((eh * -t) / ew));
double tmp;
if ((eh <= -8.8e+20) || !(eh <= 3.8e+104)) {
tmp = Math.abs(((eh * Math.sin(t)) * Math.sin(t_1)));
} else {
tmp = Math.abs(((ew * Math.cos(t)) * Math.cos(t_1)));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.atan(((eh * -t) / ew)) tmp = 0 if (eh <= -8.8e+20) or not (eh <= 3.8e+104): tmp = math.fabs(((eh * math.sin(t)) * math.sin(t_1))) else: tmp = math.fabs(((ew * math.cos(t)) * math.cos(t_1))) return tmp
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh * Float64(-t)) / ew)) tmp = 0.0 if ((eh <= -8.8e+20) || !(eh <= 3.8e+104)) tmp = abs(Float64(Float64(eh * sin(t)) * sin(t_1))); else tmp = abs(Float64(Float64(ew * cos(t)) * cos(t_1))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = atan(((eh * -t) / ew)); tmp = 0.0; if ((eh <= -8.8e+20) || ~((eh <= 3.8e+104))) tmp = abs(((eh * sin(t)) * sin(t_1))); else tmp = abs(((ew * cos(t)) * cos(t_1))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[eh, -8.8e+20], N[Not[LessEqual[eh, 3.8e+104]], $MachinePrecision]], N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\\
\mathbf{if}\;eh \leq -8.8 \cdot 10^{+20} \lor \neg \left(eh \leq 3.8 \cdot 10^{+104}\right):\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1\right|\\
\end{array}
\end{array}
if eh < -8.8e20 or 3.79999999999999969e104 < eh Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 83.0%
+-commutative83.0%
mul-1-neg83.0%
unsub-neg83.0%
*-commutative83.0%
mul-1-neg83.0%
distribute-frac-neg283.0%
associate-/l*83.0%
Simplified82.9%
add-log-exp82.8%
exp-prod82.8%
Applied egg-rr82.8%
Taylor expanded in t around 0 82.1%
mul-1-neg98.9%
associate-/l*98.9%
distribute-lft-neg-in98.9%
Simplified82.1%
Taylor expanded in ew around 0 76.8%
mul-1-neg76.8%
associate-*r*76.9%
distribute-rgt-neg-in76.9%
associate-/l*76.9%
mul-1-neg76.9%
distribute-lft-neg-in76.9%
Simplified76.9%
if -8.8e20 < eh < 3.79999999999999969e104Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 99.2%
+-commutative99.2%
mul-1-neg99.2%
unsub-neg99.2%
*-commutative99.2%
mul-1-neg99.2%
distribute-frac-neg299.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in ew around inf 83.1%
associate-*r*83.1%
mul-1-neg83.1%
associate-*l/83.1%
*-commutative83.1%
distribute-rgt-neg-in83.1%
distribute-neg-frac283.1%
Simplified83.1%
Taylor expanded in t around 0 70.1%
associate-/l*70.1%
mul-1-neg70.1%
distribute-lft-neg-in70.1%
Simplified70.1%
Final simplification72.7%
(FPCore (eh ew t) :precision binary64 (if (or (<= eh -2.15e+18) (not (<= eh 3.8e+104))) (fabs (* eh (* (sin t) (sin (atan (* eh (/ t (- ew)))))))) (fabs (* (* ew (cos t)) (cos (atan (/ (* eh (- t)) ew)))))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -2.15e+18) || !(eh <= 3.8e+104)) {
tmp = fabs((eh * (sin(t) * sin(atan((eh * (t / -ew)))))));
} else {
tmp = fabs(((ew * cos(t)) * cos(atan(((eh * -t) / ew)))));
}
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 ((eh <= (-2.15d+18)) .or. (.not. (eh <= 3.8d+104))) then
tmp = abs((eh * (sin(t) * sin(atan((eh * (t / -ew)))))))
else
tmp = abs(((ew * cos(t)) * cos(atan(((eh * -t) / ew)))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -2.15e+18) || !(eh <= 3.8e+104)) {
tmp = Math.abs((eh * (Math.sin(t) * Math.sin(Math.atan((eh * (t / -ew)))))));
} else {
tmp = Math.abs(((ew * Math.cos(t)) * Math.cos(Math.atan(((eh * -t) / ew)))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -2.15e+18) or not (eh <= 3.8e+104): tmp = math.fabs((eh * (math.sin(t) * math.sin(math.atan((eh * (t / -ew))))))) else: tmp = math.fabs(((ew * math.cos(t)) * math.cos(math.atan(((eh * -t) / ew))))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -2.15e+18) || !(eh <= 3.8e+104)) tmp = abs(Float64(eh * Float64(sin(t) * sin(atan(Float64(eh * Float64(t / Float64(-ew)))))))); else tmp = abs(Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(eh * Float64(-t)) / ew))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -2.15e+18) || ~((eh <= 3.8e+104))) tmp = abs((eh * (sin(t) * sin(atan((eh * (t / -ew))))))); else tmp = abs(((ew * cos(t)) * cos(atan(((eh * -t) / ew))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -2.15e+18], N[Not[LessEqual[eh, 3.8e+104]], $MachinePrecision]], N[Abs[N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(t / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -2.15 \cdot 10^{+18} \lor \neg \left(eh \leq 3.8 \cdot 10^{+104}\right):\\
\;\;\;\;\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{t}{-ew}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\
\end{array}
\end{array}
if eh < -2.15e18 or 3.79999999999999969e104 < eh Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 83.0%
+-commutative83.0%
mul-1-neg83.0%
unsub-neg83.0%
*-commutative83.0%
mul-1-neg83.0%
distribute-frac-neg283.0%
associate-/l*83.0%
Simplified82.9%
Taylor expanded in ew around 0 76.8%
associate-*r*76.8%
neg-mul-176.8%
mul-1-neg76.8%
distribute-frac-neg276.8%
associate-*r/76.7%
Simplified76.7%
Taylor expanded in t around 0 76.8%
mul-1-neg98.9%
associate-/l*98.9%
distribute-lft-neg-in98.9%
Simplified76.8%
if -2.15e18 < eh < 3.79999999999999969e104Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 99.2%
+-commutative99.2%
mul-1-neg99.2%
unsub-neg99.2%
*-commutative99.2%
mul-1-neg99.2%
distribute-frac-neg299.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in ew around inf 83.1%
associate-*r*83.1%
mul-1-neg83.1%
associate-*l/83.1%
*-commutative83.1%
distribute-rgt-neg-in83.1%
distribute-neg-frac283.1%
Simplified83.1%
Taylor expanded in t around 0 70.1%
associate-/l*70.1%
mul-1-neg70.1%
distribute-lft-neg-in70.1%
Simplified70.1%
Final simplification72.7%
(FPCore (eh ew t) :precision binary64 (if (or (<= eh -2.6e+164) (not (<= eh 1e+160))) (* eh (* (sin t) (- (sin (atan (* eh (/ (tan t) ew))))))) (fabs (* (* ew (cos t)) (cos (atan (/ (* eh (- t)) ew)))))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -2.6e+164) || !(eh <= 1e+160)) {
tmp = eh * (sin(t) * -sin(atan((eh * (tan(t) / ew)))));
} else {
tmp = fabs(((ew * cos(t)) * cos(atan(((eh * -t) / ew)))));
}
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 ((eh <= (-2.6d+164)) .or. (.not. (eh <= 1d+160))) then
tmp = eh * (sin(t) * -sin(atan((eh * (tan(t) / ew)))))
else
tmp = abs(((ew * cos(t)) * cos(atan(((eh * -t) / ew)))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -2.6e+164) || !(eh <= 1e+160)) {
tmp = eh * (Math.sin(t) * -Math.sin(Math.atan((eh * (Math.tan(t) / ew)))));
} else {
tmp = Math.abs(((ew * Math.cos(t)) * Math.cos(Math.atan(((eh * -t) / ew)))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -2.6e+164) or not (eh <= 1e+160): tmp = eh * (math.sin(t) * -math.sin(math.atan((eh * (math.tan(t) / ew))))) else: tmp = math.fabs(((ew * math.cos(t)) * math.cos(math.atan(((eh * -t) / ew))))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -2.6e+164) || !(eh <= 1e+160)) tmp = Float64(eh * Float64(sin(t) * Float64(-sin(atan(Float64(eh * Float64(tan(t) / ew))))))); else tmp = abs(Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(eh * Float64(-t)) / ew))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -2.6e+164) || ~((eh <= 1e+160))) tmp = eh * (sin(t) * -sin(atan((eh * (tan(t) / ew))))); else tmp = abs(((ew * cos(t)) * cos(atan(((eh * -t) / ew))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -2.6e+164], N[Not[LessEqual[eh, 1e+160]], $MachinePrecision]], N[(eh * N[(N[Sin[t], $MachinePrecision] * (-N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -2.6 \cdot 10^{+164} \lor \neg \left(eh \leq 10^{+160}\right):\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\
\end{array}
\end{array}
if eh < -2.5999999999999999e164 or 1.00000000000000001e160 < eh Initial program 99.7%
sub-neg99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
cancel-sign-sub99.7%
associate-/l*99.7%
Simplified99.7%
Applied egg-rr54.4%
neg-sub054.4%
fma-undefine54.3%
associate-*r*54.4%
fma-undefine54.4%
associate-/r/54.4%
*-commutative54.4%
associate-*r/54.4%
*-commutative54.4%
associate-/l*54.4%
Simplified54.4%
Taylor expanded in eh around inf 46.7%
associate-*r*46.7%
neg-mul-146.7%
associate-/l*46.7%
Simplified46.7%
if -2.5999999999999999e164 < eh < 1.00000000000000001e160Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in ew around inf 98.3%
+-commutative98.3%
mul-1-neg98.3%
unsub-neg98.3%
*-commutative98.3%
mul-1-neg98.3%
distribute-frac-neg298.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in ew around inf 74.1%
associate-*r*74.1%
mul-1-neg74.1%
associate-*l/74.1%
*-commutative74.1%
distribute-rgt-neg-in74.1%
distribute-neg-frac274.1%
Simplified74.1%
Taylor expanded in t around 0 62.9%
associate-/l*62.9%
mul-1-neg62.9%
distribute-lft-neg-in62.9%
Simplified62.9%
Final simplification59.2%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (/ (tan t) ew))))
(if (<= ew -2.1e+209)
(* (cos t) (- ew))
(if (<= ew -1.7e-228)
(- (- ew) (* (* eh t) (sin (atan t_1))))
(if (<= ew 9.5e-178)
(* eh (* (sin t) (- (sin (atan (/ (* eh t) ew))))))
(fabs (* ew (/ -1.0 (hypot 1.0 t_1)))))))))
double code(double eh, double ew, double t) {
double t_1 = eh * (tan(t) / ew);
double tmp;
if (ew <= -2.1e+209) {
tmp = cos(t) * -ew;
} else if (ew <= -1.7e-228) {
tmp = -ew - ((eh * t) * sin(atan(t_1)));
} else if (ew <= 9.5e-178) {
tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew))));
} else {
tmp = fabs((ew * (-1.0 / hypot(1.0, t_1))));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = eh * (Math.tan(t) / ew);
double tmp;
if (ew <= -2.1e+209) {
tmp = Math.cos(t) * -ew;
} else if (ew <= -1.7e-228) {
tmp = -ew - ((eh * t) * Math.sin(Math.atan(t_1)));
} else if (ew <= 9.5e-178) {
tmp = eh * (Math.sin(t) * -Math.sin(Math.atan(((eh * t) / ew))));
} else {
tmp = Math.abs((ew * (-1.0 / Math.hypot(1.0, t_1))));
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * (math.tan(t) / ew) tmp = 0 if ew <= -2.1e+209: tmp = math.cos(t) * -ew elif ew <= -1.7e-228: tmp = -ew - ((eh * t) * math.sin(math.atan(t_1))) elif ew <= 9.5e-178: tmp = eh * (math.sin(t) * -math.sin(math.atan(((eh * t) / ew)))) else: tmp = math.fabs((ew * (-1.0 / math.hypot(1.0, t_1)))) return tmp
function code(eh, ew, t) t_1 = Float64(eh * Float64(tan(t) / ew)) tmp = 0.0 if (ew <= -2.1e+209) tmp = Float64(cos(t) * Float64(-ew)); elseif (ew <= -1.7e-228) tmp = Float64(Float64(-ew) - Float64(Float64(eh * t) * sin(atan(t_1)))); elseif (ew <= 9.5e-178) tmp = Float64(eh * Float64(sin(t) * Float64(-sin(atan(Float64(Float64(eh * t) / ew)))))); else tmp = abs(Float64(ew * Float64(-1.0 / hypot(1.0, t_1)))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * (tan(t) / ew); tmp = 0.0; if (ew <= -2.1e+209) tmp = cos(t) * -ew; elseif (ew <= -1.7e-228) tmp = -ew - ((eh * t) * sin(atan(t_1))); elseif (ew <= 9.5e-178) tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew)))); else tmp = abs((ew * (-1.0 / hypot(1.0, t_1)))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -2.1e+209], N[(N[Cos[t], $MachinePrecision] * (-ew)), $MachinePrecision], If[LessEqual[ew, -1.7e-228], N[((-ew) - N[(N[(eh * t), $MachinePrecision] * N[Sin[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 9.5e-178], N[(eh * N[(N[Sin[t], $MachinePrecision] * (-N[Sin[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[Abs[N[(ew * N[(-1.0 / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \frac{\tan t}{ew}\\
\mathbf{if}\;ew \leq -2.1 \cdot 10^{+209}:\\
\;\;\;\;\cos t \cdot \left(-ew\right)\\
\mathbf{elif}\;ew \leq -1.7 \cdot 10^{-228}:\\
\;\;\;\;\left(-ew\right) - \left(eh \cdot t\right) \cdot \sin \tan^{-1} t\_1\\
\mathbf{elif}\;ew \leq 9.5 \cdot 10^{-178}:\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \frac{-1}{\mathsf{hypot}\left(1, t\_1\right)}\right|\\
\end{array}
\end{array}
if ew < -2.1e209Initial program 99.9%
sub-neg99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
cancel-sign-sub99.9%
associate-/l*99.9%
Simplified99.9%
Applied egg-rr87.5%
neg-sub087.5%
fma-undefine87.5%
associate-*r*87.5%
fma-undefine87.5%
associate-/r/87.5%
*-commutative87.5%
associate-*r/87.5%
*-commutative87.5%
associate-/l*87.5%
Simplified87.5%
Taylor expanded in eh around 0 87.5%
associate-*r*87.5%
neg-mul-187.5%
Simplified87.5%
if -2.1e209 < ew < -1.69999999999999995e-228Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Applied egg-rr78.7%
neg-sub078.7%
fma-undefine78.7%
associate-*r*78.7%
fma-undefine78.7%
associate-/r/78.7%
*-commutative78.7%
associate-*r/78.7%
*-commutative78.7%
associate-/l*78.7%
Simplified78.7%
Taylor expanded in t around 0 56.7%
mul-1-neg56.7%
associate-*r*56.7%
distribute-lft-neg-in56.7%
distribute-rgt-neg-in56.7%
associate-/l*56.7%
Simplified56.7%
if -1.69999999999999995e-228 < ew < 9.50000000000000009e-178Initial program 99.6%
sub-neg99.6%
associate-*l*99.6%
distribute-rgt-neg-in99.6%
cancel-sign-sub99.6%
associate-/l*99.6%
Simplified99.6%
Applied egg-rr41.2%
neg-sub041.2%
fma-undefine41.2%
associate-*r*41.2%
fma-undefine41.3%
associate-/r/41.3%
*-commutative41.3%
associate-*r/41.3%
*-commutative41.3%
associate-/l*41.3%
Simplified41.3%
Taylor expanded in eh around inf 36.4%
associate-*r*36.4%
neg-mul-136.4%
associate-/l*36.4%
Simplified36.4%
Taylor expanded in t around 0 46.2%
if 9.50000000000000009e-178 < ew Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 48.1%
mul-1-neg48.1%
distribute-frac-neg248.1%
associate-/l*48.1%
Simplified48.1%
cos-atan47.8%
hypot-1-def47.8%
Applied egg-rr47.8%
hypot-undefine47.8%
associate-*r/47.8%
distribute-frac-neg247.8%
associate-*l/47.8%
associate-*r/47.8%
distribute-frac-neg247.8%
associate-*l/47.8%
sqr-neg47.8%
hypot-undefine47.8%
associate-*l/47.8%
associate-*r/47.8%
Simplified47.8%
Final simplification54.3%
(FPCore (eh ew t)
:precision binary64
(if (<= ew -1.8e-166)
(* (cos t) (- ew))
(if (<= ew 9e-180)
(* eh (* (sin t) (- (sin (atan (/ (* eh t) ew))))))
(fabs (* ew (/ -1.0 (hypot 1.0 (* eh (/ (tan t) ew)))))))))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= -1.8e-166) {
tmp = cos(t) * -ew;
} else if (ew <= 9e-180) {
tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew))));
} else {
tmp = fabs((ew * (-1.0 / hypot(1.0, (eh * (tan(t) / ew))))));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double tmp;
if (ew <= -1.8e-166) {
tmp = Math.cos(t) * -ew;
} else if (ew <= 9e-180) {
tmp = eh * (Math.sin(t) * -Math.sin(Math.atan(((eh * t) / ew))));
} else {
tmp = Math.abs((ew * (-1.0 / Math.hypot(1.0, (eh * (Math.tan(t) / ew))))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if ew <= -1.8e-166: tmp = math.cos(t) * -ew elif ew <= 9e-180: tmp = eh * (math.sin(t) * -math.sin(math.atan(((eh * t) / ew)))) else: tmp = math.fabs((ew * (-1.0 / math.hypot(1.0, (eh * (math.tan(t) / ew)))))) return tmp
function code(eh, ew, t) tmp = 0.0 if (ew <= -1.8e-166) tmp = Float64(cos(t) * Float64(-ew)); elseif (ew <= 9e-180) tmp = Float64(eh * Float64(sin(t) * Float64(-sin(atan(Float64(Float64(eh * t) / ew)))))); else tmp = abs(Float64(ew * Float64(-1.0 / hypot(1.0, Float64(eh * Float64(tan(t) / ew)))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (ew <= -1.8e-166) tmp = cos(t) * -ew; elseif (ew <= 9e-180) tmp = eh * (sin(t) * -sin(atan(((eh * t) / ew)))); else tmp = abs((ew * (-1.0 / hypot(1.0, (eh * (tan(t) / ew)))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[ew, -1.8e-166], N[(N[Cos[t], $MachinePrecision] * (-ew)), $MachinePrecision], If[LessEqual[ew, 9e-180], N[(eh * N[(N[Sin[t], $MachinePrecision] * (-N[Sin[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[Abs[N[(ew * N[(-1.0 / N[Sqrt[1.0 ^ 2 + N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -1.8 \cdot 10^{-166}:\\
\;\;\;\;\cos t \cdot \left(-ew\right)\\
\mathbf{elif}\;ew \leq 9 \cdot 10^{-180}:\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-\sin \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \frac{-1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|\\
\end{array}
\end{array}
if ew < -1.8e-166Initial program 99.9%
sub-neg99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
cancel-sign-sub99.9%
associate-/l*99.9%
Simplified99.9%
Applied egg-rr80.6%
neg-sub080.6%
fma-undefine80.6%
associate-*r*80.6%
fma-undefine80.6%
associate-/r/80.6%
*-commutative80.6%
associate-*r/80.6%
*-commutative80.6%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in eh around 0 59.3%
associate-*r*59.3%
neg-mul-159.3%
Simplified59.3%
if -1.8e-166 < ew < 9.00000000000000019e-180Initial program 99.7%
sub-neg99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
cancel-sign-sub99.7%
associate-/l*99.7%
Simplified99.7%
Applied egg-rr54.3%
neg-sub054.3%
fma-undefine54.3%
associate-*r*54.3%
fma-undefine54.4%
associate-/r/54.4%
*-commutative54.4%
associate-*r/54.4%
*-commutative54.4%
associate-/l*54.4%
Simplified54.4%
Taylor expanded in eh around inf 38.6%
associate-*r*38.6%
neg-mul-138.6%
associate-/l*38.6%
Simplified38.6%
Taylor expanded in t around 0 45.2%
if 9.00000000000000019e-180 < ew Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 48.1%
mul-1-neg48.1%
distribute-frac-neg248.1%
associate-/l*48.1%
Simplified48.1%
cos-atan47.8%
hypot-1-def47.8%
Applied egg-rr47.8%
hypot-undefine47.8%
associate-*r/47.8%
distribute-frac-neg247.8%
associate-*l/47.8%
associate-*r/47.8%
distribute-frac-neg247.8%
associate-*l/47.8%
sqr-neg47.8%
hypot-undefine47.8%
associate-*l/47.8%
associate-*r/47.8%
Simplified47.8%
Final simplification51.3%
(FPCore (eh ew t) :precision binary64 (if (or (<= t -0.000202) (not (<= t 58000000.0))) (* ew (- (cos t))) (* (cos (atan (* eh (/ t ew)))) (fabs ew))))
double code(double eh, double ew, double t) {
double tmp;
if ((t <= -0.000202) || !(t <= 58000000.0)) {
tmp = ew * -cos(t);
} else {
tmp = cos(atan((eh * (t / ew)))) * fabs(ew);
}
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 ((t <= (-0.000202d0)) .or. (.not. (t <= 58000000.0d0))) then
tmp = ew * -cos(t)
else
tmp = cos(atan((eh * (t / ew)))) * abs(ew)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((t <= -0.000202) || !(t <= 58000000.0)) {
tmp = ew * -Math.cos(t);
} else {
tmp = Math.cos(Math.atan((eh * (t / ew)))) * Math.abs(ew);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (t <= -0.000202) or not (t <= 58000000.0): tmp = ew * -math.cos(t) else: tmp = math.cos(math.atan((eh * (t / ew)))) * math.fabs(ew) return tmp
function code(eh, ew, t) tmp = 0.0 if ((t <= -0.000202) || !(t <= 58000000.0)) tmp = Float64(ew * Float64(-cos(t))); else tmp = Float64(cos(atan(Float64(eh * Float64(t / ew)))) * abs(ew)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((t <= -0.000202) || ~((t <= 58000000.0))) tmp = ew * -cos(t); else tmp = cos(atan((eh * (t / ew)))) * abs(ew); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -0.000202], N[Not[LessEqual[t, 58000000.0]], $MachinePrecision]], N[(ew * (-N[Cos[t], $MachinePrecision])), $MachinePrecision], N[(N[Cos[N[ArcTan[N[(eh * N[(t / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Abs[ew], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.000202 \lor \neg \left(t \leq 58000000\right):\\
\;\;\;\;ew \cdot \left(-\cos t\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \tan^{-1} \left(eh \cdot \frac{t}{ew}\right) \cdot \left|ew\right|\\
\end{array}
\end{array}
if t < -2.02000000000000004e-4 or 5.8e7 < t Initial program 99.6%
sub-neg99.6%
associate-*l*99.6%
distribute-rgt-neg-in99.6%
cancel-sign-sub99.6%
associate-/l*99.6%
Simplified99.6%
Applied egg-rr53.3%
neg-sub053.3%
fma-undefine53.3%
associate-*r*53.3%
fma-undefine53.3%
associate-/r/53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
associate-/l*53.3%
Simplified53.3%
Taylor expanded in eh around 0 24.7%
associate-*r*24.7%
neg-mul-124.7%
Simplified24.7%
if -2.02000000000000004e-4 < t < 5.8e7Initial program 100.0%
sub-neg100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
cancel-sign-sub100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around 0 71.0%
mul-1-neg71.0%
distribute-frac-neg271.0%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in t around 0 71.0%
mul-1-neg84.6%
associate-/l*84.6%
distribute-lft-neg-in84.6%
Simplified71.0%
*-un-lft-identity71.0%
distribute-lft-neg-out71.0%
atan-neg71.0%
Applied egg-rr71.0%
*-lft-identity71.0%
fabs-mul71.0%
*-commutative71.0%
rem-square-sqrt71.0%
fabs-sqr71.0%
rem-square-sqrt71.0%
cos-neg71.0%
Simplified71.0%
Final simplification49.1%
(FPCore (eh ew t) :precision binary64 (if (or (<= t -0.00042) (not (<= t 58000000.0))) (* (cos t) (- ew)) (fabs (* ew (/ 1.0 (hypot 1.0 (* eh (/ t (- ew)))))))))
double code(double eh, double ew, double t) {
double tmp;
if ((t <= -0.00042) || !(t <= 58000000.0)) {
tmp = cos(t) * -ew;
} else {
tmp = fabs((ew * (1.0 / hypot(1.0, (eh * (t / -ew))))));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double tmp;
if ((t <= -0.00042) || !(t <= 58000000.0)) {
tmp = Math.cos(t) * -ew;
} else {
tmp = Math.abs((ew * (1.0 / Math.hypot(1.0, (eh * (t / -ew))))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (t <= -0.00042) or not (t <= 58000000.0): tmp = math.cos(t) * -ew else: tmp = math.fabs((ew * (1.0 / math.hypot(1.0, (eh * (t / -ew)))))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((t <= -0.00042) || !(t <= 58000000.0)) tmp = Float64(cos(t) * Float64(-ew)); else tmp = abs(Float64(ew * Float64(1.0 / hypot(1.0, Float64(eh * Float64(t / Float64(-ew))))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((t <= -0.00042) || ~((t <= 58000000.0))) tmp = cos(t) * -ew; else tmp = abs((ew * (1.0 / hypot(1.0, (eh * (t / -ew)))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -0.00042], N[Not[LessEqual[t, 58000000.0]], $MachinePrecision]], N[(N[Cos[t], $MachinePrecision] * (-ew)), $MachinePrecision], N[Abs[N[(ew * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(eh * N[(t / (-ew)), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.00042 \lor \neg \left(t \leq 58000000\right):\\
\;\;\;\;\cos t \cdot \left(-ew\right)\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{-ew}\right)}\right|\\
\end{array}
\end{array}
if t < -4.2000000000000002e-4 or 5.8e7 < t Initial program 99.6%
sub-neg99.6%
associate-*l*99.6%
distribute-rgt-neg-in99.6%
cancel-sign-sub99.6%
associate-/l*99.6%
Simplified99.6%
Applied egg-rr53.3%
neg-sub053.3%
fma-undefine53.3%
associate-*r*53.3%
fma-undefine53.3%
associate-/r/53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
associate-/l*53.3%
Simplified53.3%
Taylor expanded in eh around 0 24.7%
associate-*r*24.7%
neg-mul-124.7%
Simplified24.7%
if -4.2000000000000002e-4 < t < 5.8e7Initial program 100.0%
sub-neg100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
cancel-sign-sub100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around 0 71.0%
mul-1-neg71.0%
distribute-frac-neg271.0%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in t around 0 71.0%
mul-1-neg84.6%
associate-/l*84.6%
distribute-lft-neg-in84.6%
Simplified71.0%
cos-atan70.8%
hypot-1-def70.8%
Applied egg-rr70.8%
Final simplification49.0%
(FPCore (eh ew t) :precision binary64 (* ew (- (cos t))))
double code(double eh, double ew, double t) {
return 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 = ew * -cos(t)
end function
public static double code(double eh, double ew, double t) {
return ew * -Math.cos(t);
}
def code(eh, ew, t): return ew * -math.cos(t)
function code(eh, ew, t) return Float64(ew * Float64(-cos(t))) end
function tmp = code(eh, ew, t) tmp = ew * -cos(t); end
code[eh_, ew_, t_] := N[(ew * (-N[Cos[t], $MachinePrecision])), $MachinePrecision]
\begin{array}{l}
\\
ew \cdot \left(-\cos t\right)
\end{array}
Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Applied egg-rr51.4%
neg-sub051.4%
fma-undefine51.4%
associate-*r*51.4%
fma-undefine51.4%
associate-/r/51.4%
*-commutative51.4%
associate-*r/51.4%
*-commutative51.4%
associate-/l*51.4%
Simplified51.4%
Taylor expanded in eh around 0 31.4%
associate-*r*31.4%
neg-mul-131.4%
Simplified31.4%
Final simplification31.4%
(FPCore (eh ew t) :precision binary64 (- ew))
double code(double eh, double ew, double t) {
return -ew;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = -ew
end function
public static double code(double eh, double ew, double t) {
return -ew;
}
def code(eh, ew, t): return -ew
function code(eh, ew, t) return Float64(-ew) end
function tmp = code(eh, ew, t) tmp = -ew; end
code[eh_, ew_, t_] := (-ew)
\begin{array}{l}
\\
-ew
\end{array}
Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Applied egg-rr51.4%
neg-sub051.4%
fma-undefine51.4%
associate-*r*51.4%
fma-undefine51.4%
associate-/r/51.4%
*-commutative51.4%
associate-*r/51.4%
*-commutative51.4%
associate-/l*51.4%
Simplified51.4%
Taylor expanded in t around 0 23.3%
neg-mul-123.3%
Simplified23.3%
herbie shell --seed 2024119
(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)))))))