
(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 20 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 (- (* (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(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(cos(t_1) * Float64(ew * cos(t))) - Float64(Float64(eh * 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[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[Cos[t$95$1], $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $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|\cos t\_1 \cdot \left(ew \cdot \cos t\right) - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (fma ew (log1p (+ (exp (cos t)) -1.0)) (* eh (* (sin t) (sin (atan (* eh (/ (tan t) (- ew))))))))))
double code(double eh, double ew, double t) {
return fabs(fma(ew, log1p((exp(cos(t)) + -1.0)), (eh * (sin(t) * sin(atan((eh * (tan(t) / -ew))))))));
}
function code(eh, ew, t) return abs(fma(ew, log1p(Float64(exp(cos(t)) + -1.0)), Float64(eh * Float64(sin(t) * sin(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))))))) end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[Log[1 + N[(N[Exp[N[Cos[t], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision]], $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]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(e^{\cos t} + -1\right), eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right)\right)\right|
\end{array}
Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
associate-*r/99.8%
add-sqr-sqrt25.2%
sqrt-unprod99.1%
sqr-neg99.1%
sqrt-unprod73.7%
add-sqr-sqrt99.1%
log1p-expm1-u99.0%
associate-*r/99.0%
cos-atan99.0%
associate-*l/99.0%
Applied egg-rr99.0%
Taylor expanded in eh around 0 98.5%
Final simplification98.5%
(FPCore (eh ew t) :precision binary64 (fabs (fma ew (pow (cbrt (cos t)) 3.0) (* eh (* (sin t) (sin (atan (* eh (/ (tan t) (- ew))))))))))
double code(double eh, double ew, double t) {
return fabs(fma(ew, pow(cbrt(cos(t)), 3.0), (eh * (sin(t) * sin(atan((eh * (tan(t) / -ew))))))));
}
function code(eh, ew, t) return abs(fma(ew, (cbrt(cos(t)) ^ 3.0), Float64(eh * Float64(sin(t) * sin(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))))))) end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[Power[N[Power[N[Cos[t], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $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]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\mathsf{fma}\left(ew, {\left(\sqrt[3]{\cos t}\right)}^{3}, eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right)\right)\right|
\end{array}
Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
associate-*r/99.8%
add-sqr-sqrt25.2%
sqrt-unprod99.1%
sqr-neg99.1%
sqrt-unprod73.7%
add-sqr-sqrt99.1%
log1p-expm1-u99.0%
associate-*r/99.0%
cos-atan99.0%
associate-*l/99.0%
Applied egg-rr99.0%
Taylor expanded in eh around 0 98.5%
expm1-define98.6%
log1p-expm1-u98.7%
add-cube-cbrt98.3%
pow398.3%
Applied egg-rr98.3%
Final simplification98.3%
(FPCore (eh ew t)
:precision binary64
(if (or (<= ew -6.8e-107) (not (<= ew 4.9e-185)))
(fabs
(*
ew
(+
(cos t)
(* eh (/ (* (sin t) (sin (atan (* (tan t) (/ (- eh) ew))))) ew)))))
(fabs
(fma
ew
1.0
(*
eh
(* (sin (atan (* eh (/ (tan t) (- ew))))) (log1p (expm1 (sin t)))))))))
double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -6.8e-107) || !(ew <= 4.9e-185)) {
tmp = fabs((ew * (cos(t) + (eh * ((sin(t) * sin(atan((tan(t) * (-eh / ew))))) / ew)))));
} else {
tmp = fabs(fma(ew, 1.0, (eh * (sin(atan((eh * (tan(t) / -ew)))) * log1p(expm1(sin(t)))))));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if ((ew <= -6.8e-107) || !(ew <= 4.9e-185)) tmp = abs(Float64(ew * Float64(cos(t) + Float64(eh * Float64(Float64(sin(t) * sin(atan(Float64(tan(t) * Float64(Float64(-eh) / ew))))) / ew))))); else tmp = abs(fma(ew, 1.0, Float64(eh * Float64(sin(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) * log1p(expm1(sin(t))))))); end return tmp end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -6.8e-107], N[Not[LessEqual[ew, 4.9e-185]], $MachinePrecision]], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] + N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[((-eh) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * 1.0 + N[(eh * N[(N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Log[1 + N[(Exp[N[Sin[t], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -6.8 \cdot 10^{-107} \lor \neg \left(ew \leq 4.9 \cdot 10^{-185}\right):\\
\;\;\;\;\left|ew \cdot \left(\cos t + eh \cdot \frac{\sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right)}{ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\mathsf{fma}\left(ew, 1, eh \cdot \left(\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin t\right)\right)\right)\right)\right|\\
\end{array}
\end{array}
if ew < -6.79999999999999989e-107 or 4.9000000000000003e-185 < ew Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
associate-*r/99.8%
add-sqr-sqrt26.1%
sqrt-unprod99.4%
sqr-neg99.4%
sqrt-unprod73.1%
add-sqr-sqrt99.4%
log1p-expm1-u99.3%
associate-*r/99.3%
cos-atan99.3%
associate-*l/99.3%
Applied egg-rr99.3%
Taylor expanded in ew around inf 97.1%
associate-/l*97.1%
mul-1-neg97.1%
associate-*l/97.1%
*-commutative97.1%
distribute-rgt-neg-in97.1%
mul-1-neg97.1%
associate-*r/97.1%
neg-mul-197.1%
Simplified97.1%
if -6.79999999999999989e-107 < ew < 4.9000000000000003e-185Initial program 99.7%
fabs-sub99.7%
sub-neg99.7%
+-commutative99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
fma-define99.7%
Simplified99.7%
associate-*r/99.7%
add-sqr-sqrt22.5%
sqrt-unprod98.1%
sqr-neg98.1%
sqrt-unprod75.6%
add-sqr-sqrt98.1%
log1p-expm1-u98.1%
associate-*r/98.1%
cos-atan98.1%
associate-*l/98.1%
Applied egg-rr98.1%
log1p-expm1-u98.1%
Applied egg-rr98.1%
Taylor expanded in t around 0 95.0%
Final simplification96.6%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sin (atan (* (tan t) (/ (- eh) ew))))))
(if (<= eh -7e+209)
(fabs (* (sin t) (* eh t_1)))
(fabs (* ew (+ (cos t) (* eh (/ (* (sin t) t_1) ew))))))))
double code(double eh, double ew, double t) {
double t_1 = sin(atan((tan(t) * (-eh / ew))));
double tmp;
if (eh <= -7e+209) {
tmp = fabs((sin(t) * (eh * t_1)));
} else {
tmp = fabs((ew * (cos(t) + (eh * ((sin(t) * t_1) / 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 = sin(atan((tan(t) * (-eh / ew))))
if (eh <= (-7d+209)) then
tmp = abs((sin(t) * (eh * t_1)))
else
tmp = abs((ew * (cos(t) + (eh * ((sin(t) * t_1) / ew)))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.sin(Math.atan((Math.tan(t) * (-eh / ew))));
double tmp;
if (eh <= -7e+209) {
tmp = Math.abs((Math.sin(t) * (eh * t_1)));
} else {
tmp = Math.abs((ew * (Math.cos(t) + (eh * ((Math.sin(t) * t_1) / ew)))));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.sin(math.atan((math.tan(t) * (-eh / ew)))) tmp = 0 if eh <= -7e+209: tmp = math.fabs((math.sin(t) * (eh * t_1))) else: tmp = math.fabs((ew * (math.cos(t) + (eh * ((math.sin(t) * t_1) / ew))))) return tmp
function code(eh, ew, t) t_1 = sin(atan(Float64(tan(t) * Float64(Float64(-eh) / ew)))) tmp = 0.0 if (eh <= -7e+209) tmp = abs(Float64(sin(t) * Float64(eh * t_1))); else tmp = abs(Float64(ew * Float64(cos(t) + Float64(eh * Float64(Float64(sin(t) * t_1) / ew))))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = sin(atan((tan(t) * (-eh / ew)))); tmp = 0.0; if (eh <= -7e+209) tmp = abs((sin(t) * (eh * t_1))); else tmp = abs((ew * (cos(t) + (eh * ((sin(t) * t_1) / ew))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[((-eh) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -7e+209], N[Abs[N[(N[Sin[t], $MachinePrecision] * N[(eh * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] + N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * t$95$1), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin \tan^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right)\\
\mathbf{if}\;eh \leq -7 \cdot 10^{+209}:\\
\;\;\;\;\left|\sin t \cdot \left(eh \cdot t\_1\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \left(\cos t + eh \cdot \frac{\sin t \cdot t\_1}{ew}\right)\right|\\
\end{array}
\end{array}
if eh < -7.0000000000000005e209Initial program 99.7%
fabs-sub99.7%
sub-neg99.7%
+-commutative99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in ew around 0 91.4%
*-commutative91.4%
associate-*l*91.4%
*-commutative91.4%
mul-1-neg91.4%
associate-*l/91.4%
distribute-rgt-neg-in91.4%
Simplified91.4%
if -7.0000000000000005e209 < 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%
associate-*r/99.8%
add-sqr-sqrt23.9%
sqrt-unprod99.0%
sqr-neg99.0%
sqrt-unprod75.0%
add-sqr-sqrt99.0%
log1p-expm1-u99.0%
associate-*r/99.0%
cos-atan99.0%
associate-*l/99.0%
Applied egg-rr99.0%
Taylor expanded in ew around inf 93.3%
associate-/l*93.2%
mul-1-neg93.2%
associate-*l/93.2%
*-commutative93.2%
distribute-rgt-neg-in93.2%
mul-1-neg93.2%
associate-*r/93.2%
neg-mul-193.2%
Simplified93.2%
Final simplification93.0%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (/ (* (sin t) (sin (atan (* eh (/ (tan t) ew))))) ew)))
(t_2 (atan (* (tan t) (/ (- eh) ew))))
(t_3 (fabs (* (cos t_2) (* ew (cos t))))))
(if (<= ew -8.6e+170)
t_3
(if (<= ew -9.5e-108)
(* ew (- (- (cos t)) t_1))
(if (<= ew 1e-189)
(fabs (* (sin t) (* eh (sin t_2))))
(if (<= ew 8.5e+66) (* ew (+ (cos t) t_1)) t_3))))))
double code(double eh, double ew, double t) {
double t_1 = eh * ((sin(t) * sin(atan((eh * (tan(t) / ew))))) / ew);
double t_2 = atan((tan(t) * (-eh / ew)));
double t_3 = fabs((cos(t_2) * (ew * cos(t))));
double tmp;
if (ew <= -8.6e+170) {
tmp = t_3;
} else if (ew <= -9.5e-108) {
tmp = ew * (-cos(t) - t_1);
} else if (ew <= 1e-189) {
tmp = fabs((sin(t) * (eh * sin(t_2))));
} else if (ew <= 8.5e+66) {
tmp = ew * (cos(t) + t_1);
} else {
tmp = t_3;
}
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 = eh * ((sin(t) * sin(atan((eh * (tan(t) / ew))))) / ew)
t_2 = atan((tan(t) * (-eh / ew)))
t_3 = abs((cos(t_2) * (ew * cos(t))))
if (ew <= (-8.6d+170)) then
tmp = t_3
else if (ew <= (-9.5d-108)) then
tmp = ew * (-cos(t) - t_1)
else if (ew <= 1d-189) then
tmp = abs((sin(t) * (eh * sin(t_2))))
else if (ew <= 8.5d+66) then
tmp = ew * (cos(t) + t_1)
else
tmp = t_3
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * ((Math.sin(t) * Math.sin(Math.atan((eh * (Math.tan(t) / ew))))) / ew);
double t_2 = Math.atan((Math.tan(t) * (-eh / ew)));
double t_3 = Math.abs((Math.cos(t_2) * (ew * Math.cos(t))));
double tmp;
if (ew <= -8.6e+170) {
tmp = t_3;
} else if (ew <= -9.5e-108) {
tmp = ew * (-Math.cos(t) - t_1);
} else if (ew <= 1e-189) {
tmp = Math.abs((Math.sin(t) * (eh * Math.sin(t_2))));
} else if (ew <= 8.5e+66) {
tmp = ew * (Math.cos(t) + t_1);
} else {
tmp = t_3;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * ((math.sin(t) * math.sin(math.atan((eh * (math.tan(t) / ew))))) / ew) t_2 = math.atan((math.tan(t) * (-eh / ew))) t_3 = math.fabs((math.cos(t_2) * (ew * math.cos(t)))) tmp = 0 if ew <= -8.6e+170: tmp = t_3 elif ew <= -9.5e-108: tmp = ew * (-math.cos(t) - t_1) elif ew <= 1e-189: tmp = math.fabs((math.sin(t) * (eh * math.sin(t_2)))) elif ew <= 8.5e+66: tmp = ew * (math.cos(t) + t_1) else: tmp = t_3 return tmp
function code(eh, ew, t) t_1 = Float64(eh * Float64(Float64(sin(t) * sin(atan(Float64(eh * Float64(tan(t) / ew))))) / ew)) t_2 = atan(Float64(tan(t) * Float64(Float64(-eh) / ew))) t_3 = abs(Float64(cos(t_2) * Float64(ew * cos(t)))) tmp = 0.0 if (ew <= -8.6e+170) tmp = t_3; elseif (ew <= -9.5e-108) tmp = Float64(ew * Float64(Float64(-cos(t)) - t_1)); elseif (ew <= 1e-189) tmp = abs(Float64(sin(t) * Float64(eh * sin(t_2)))); elseif (ew <= 8.5e+66) tmp = Float64(ew * Float64(cos(t) + t_1)); else tmp = t_3; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * ((sin(t) * sin(atan((eh * (tan(t) / ew))))) / ew); t_2 = atan((tan(t) * (-eh / ew))); t_3 = abs((cos(t_2) * (ew * cos(t)))); tmp = 0.0; if (ew <= -8.6e+170) tmp = t_3; elseif (ew <= -9.5e-108) tmp = ew * (-cos(t) - t_1); elseif (ew <= 1e-189) tmp = abs((sin(t) * (eh * sin(t_2)))); elseif (ew <= 8.5e+66) tmp = ew * (cos(t) + t_1); else tmp = t_3; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[((-eh) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(N[Cos[t$95$2], $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -8.6e+170], t$95$3, If[LessEqual[ew, -9.5e-108], N[(ew * N[((-N[Cos[t], $MachinePrecision]) - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 1e-189], N[Abs[N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 8.5e+66], N[(ew * N[(N[Cos[t], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \frac{\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}{ew}\\
t_2 := \tan^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right)\\
t_3 := \left|\cos t\_2 \cdot \left(ew \cdot \cos t\right)\right|\\
\mathbf{if}\;ew \leq -8.6 \cdot 10^{+170}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;ew \leq -9.5 \cdot 10^{-108}:\\
\;\;\;\;ew \cdot \left(\left(-\cos t\right) - t\_1\right)\\
\mathbf{elif}\;ew \leq 10^{-189}:\\
\;\;\;\;\left|\sin t \cdot \left(eh \cdot \sin t\_2\right)\right|\\
\mathbf{elif}\;ew \leq 8.5 \cdot 10^{+66}:\\
\;\;\;\;ew \cdot \left(\cos t + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if ew < -8.5999999999999997e170 or 8.5000000000000004e66 < ew Initial program 99.8%
Taylor expanded in ew around inf 85.9%
*-commutative85.9%
*-commutative85.9%
associate-*l*85.9%
mul-1-neg85.9%
associate-*l/85.9%
distribute-rgt-neg-in85.9%
*-commutative85.9%
Simplified85.9%
if -8.5999999999999997e170 < ew < -9.5000000000000005e-108Initial program 99.9%
Applied egg-rr76.6%
neg-sub076.6%
associate-*r/76.6%
*-commutative76.6%
associate-/l*76.6%
associate-*r/76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in ew around inf 74.1%
associate-/l*74.1%
associate-*r/74.1%
Simplified74.1%
if -9.5000000000000005e-108 < ew < 1.00000000000000007e-189Initial program 99.7%
fabs-sub99.7%
sub-neg99.7%
+-commutative99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in ew around 0 85.8%
*-commutative85.8%
associate-*l*85.8%
*-commutative85.8%
mul-1-neg85.8%
associate-*l/85.8%
distribute-rgt-neg-in85.8%
Simplified85.8%
if 1.00000000000000007e-189 < ew < 8.5000000000000004e66Initial program 99.8%
Applied egg-rr75.9%
Taylor expanded in ew around inf 74.5%
associate-/l*74.5%
*-commutative74.5%
*-commutative74.5%
associate-*r/74.5%
Simplified74.5%
Final simplification81.0%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (* (tan t) (/ (- eh) ew))))
(t_2 (fabs (* (sin t) (* eh (sin t_1)))))
(t_3 (fabs (* (cos t_1) (* ew (cos t))))))
(if (<= t -8e+173)
t_3
(if (<= t -2350000.0)
t_2
(if (<= t 0.095)
(fabs (+ ew (* (* t eh) (sin (atan (/ (* eh (tan t)) ew))))))
(if (<= t 4.8e+147) t_3 t_2))))))
double code(double eh, double ew, double t) {
double t_1 = atan((tan(t) * (-eh / ew)));
double t_2 = fabs((sin(t) * (eh * sin(t_1))));
double t_3 = fabs((cos(t_1) * (ew * cos(t))));
double tmp;
if (t <= -8e+173) {
tmp = t_3;
} else if (t <= -2350000.0) {
tmp = t_2;
} else if (t <= 0.095) {
tmp = fabs((ew + ((t * eh) * sin(atan(((eh * tan(t)) / ew))))));
} else if (t <= 4.8e+147) {
tmp = t_3;
} else {
tmp = t_2;
}
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 = atan((tan(t) * (-eh / ew)))
t_2 = abs((sin(t) * (eh * sin(t_1))))
t_3 = abs((cos(t_1) * (ew * cos(t))))
if (t <= (-8d+173)) then
tmp = t_3
else if (t <= (-2350000.0d0)) then
tmp = t_2
else if (t <= 0.095d0) then
tmp = abs((ew + ((t * eh) * sin(atan(((eh * tan(t)) / ew))))))
else if (t <= 4.8d+147) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan((Math.tan(t) * (-eh / ew)));
double t_2 = Math.abs((Math.sin(t) * (eh * Math.sin(t_1))));
double t_3 = Math.abs((Math.cos(t_1) * (ew * Math.cos(t))));
double tmp;
if (t <= -8e+173) {
tmp = t_3;
} else if (t <= -2350000.0) {
tmp = t_2;
} else if (t <= 0.095) {
tmp = Math.abs((ew + ((t * eh) * Math.sin(Math.atan(((eh * Math.tan(t)) / ew))))));
} else if (t <= 4.8e+147) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.atan((math.tan(t) * (-eh / ew))) t_2 = math.fabs((math.sin(t) * (eh * math.sin(t_1)))) t_3 = math.fabs((math.cos(t_1) * (ew * math.cos(t)))) tmp = 0 if t <= -8e+173: tmp = t_3 elif t <= -2350000.0: tmp = t_2 elif t <= 0.095: tmp = math.fabs((ew + ((t * eh) * math.sin(math.atan(((eh * math.tan(t)) / ew)))))) elif t <= 4.8e+147: tmp = t_3 else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = atan(Float64(tan(t) * Float64(Float64(-eh) / ew))) t_2 = abs(Float64(sin(t) * Float64(eh * sin(t_1)))) t_3 = abs(Float64(cos(t_1) * Float64(ew * cos(t)))) tmp = 0.0 if (t <= -8e+173) tmp = t_3; elseif (t <= -2350000.0) tmp = t_2; elseif (t <= 0.095) tmp = abs(Float64(ew + Float64(Float64(t * eh) * sin(atan(Float64(Float64(eh * tan(t)) / ew)))))); elseif (t <= 4.8e+147) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = atan((tan(t) * (-eh / ew))); t_2 = abs((sin(t) * (eh * sin(t_1)))); t_3 = abs((cos(t_1) * (ew * cos(t)))); tmp = 0.0; if (t <= -8e+173) tmp = t_3; elseif (t <= -2350000.0) tmp = t_2; elseif (t <= 0.095) tmp = abs((ew + ((t * eh) * sin(atan(((eh * tan(t)) / ew)))))); elseif (t <= 4.8e+147) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[((-eh) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(N[Cos[t$95$1], $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -8e+173], t$95$3, If[LessEqual[t, -2350000.0], t$95$2, If[LessEqual[t, 0.095], N[Abs[N[(ew + N[(N[(t * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 4.8e+147], t$95$3, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right)\\
t_2 := \left|\sin t \cdot \left(eh \cdot \sin t\_1\right)\right|\\
t_3 := \left|\cos t\_1 \cdot \left(ew \cdot \cos t\right)\right|\\
\mathbf{if}\;t \leq -8 \cdot 10^{+173}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -2350000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 0.095:\\
\;\;\;\;\left|ew + \left(t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right|\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+147}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -8.0000000000000001e173 or 0.095000000000000001 < t < 4.80000000000000004e147Initial program 99.7%
Taylor expanded in ew around inf 61.5%
*-commutative61.5%
*-commutative61.5%
associate-*l*61.5%
mul-1-neg61.5%
associate-*l/61.5%
distribute-rgt-neg-in61.5%
*-commutative61.5%
Simplified61.5%
if -8.0000000000000001e173 < t < -2.35e6 or 4.80000000000000004e147 < t Initial program 99.6%
fabs-sub99.6%
sub-neg99.6%
+-commutative99.6%
associate-*l*99.6%
distribute-rgt-neg-in99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in ew around 0 66.6%
*-commutative66.6%
associate-*l*66.6%
*-commutative66.6%
mul-1-neg66.6%
associate-*l/66.6%
distribute-rgt-neg-in66.6%
Simplified66.6%
if -2.35e6 < t < 0.095000000000000001Initial program 100.0%
fabs-sub100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
Simplified100.0%
associate-*r/100.0%
add-sqr-sqrt0.8%
sqrt-unprod98.5%
sqr-neg98.5%
sqrt-unprod97.7%
add-sqr-sqrt98.5%
log1p-expm1-u98.5%
associate-*r/98.5%
cos-atan98.5%
associate-*l/98.5%
Applied egg-rr98.5%
Taylor expanded in t around 0 96.9%
associate-*r*96.9%
mul-1-neg96.9%
associate-*l/96.9%
*-commutative96.9%
distribute-rgt-neg-in96.9%
mul-1-neg96.9%
associate-*r/96.9%
neg-mul-196.9%
Simplified96.9%
tan-quot96.9%
log1p-expm1-u96.9%
frac-times96.9%
add-sqr-sqrt42.7%
sqrt-unprod96.4%
sqr-neg96.4%
sqrt-unprod54.2%
add-sqr-sqrt97.0%
frac-times97.0%
log1p-expm1-u97.0%
tan-quot97.0%
associate-*r/97.0%
Applied egg-rr97.0%
Final simplification80.1%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (* (tan t) (/ (- eh) ew)))))
(if (<= ew -1.35e-21)
(fabs (fma ew (log1p (+ (exp (cos t)) -1.0)) 0.0))
(if (<= ew 7.8e-190)
(fabs (* (sin t) (* eh (sin t_1))))
(if (<= ew 8e+66)
(*
ew
(+
(cos t)
(* eh (/ (* (sin t) (sin (atan (* eh (/ (tan t) ew))))) ew))))
(fabs (* (cos t_1) (* ew (cos t)))))))))
double code(double eh, double ew, double t) {
double t_1 = atan((tan(t) * (-eh / ew)));
double tmp;
if (ew <= -1.35e-21) {
tmp = fabs(fma(ew, log1p((exp(cos(t)) + -1.0)), 0.0));
} else if (ew <= 7.8e-190) {
tmp = fabs((sin(t) * (eh * sin(t_1))));
} else if (ew <= 8e+66) {
tmp = ew * (cos(t) + (eh * ((sin(t) * sin(atan((eh * (tan(t) / ew))))) / ew)));
} else {
tmp = fabs((cos(t_1) * (ew * cos(t))));
}
return tmp;
}
function code(eh, ew, t) t_1 = atan(Float64(tan(t) * Float64(Float64(-eh) / ew))) tmp = 0.0 if (ew <= -1.35e-21) tmp = abs(fma(ew, log1p(Float64(exp(cos(t)) + -1.0)), 0.0)); elseif (ew <= 7.8e-190) tmp = abs(Float64(sin(t) * Float64(eh * sin(t_1)))); elseif (ew <= 8e+66) tmp = Float64(ew * Float64(cos(t) + Float64(eh * Float64(Float64(sin(t) * sin(atan(Float64(eh * Float64(tan(t) / ew))))) / ew)))); else tmp = abs(Float64(cos(t_1) * Float64(ew * cos(t)))); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[((-eh) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -1.35e-21], N[Abs[N[(ew * N[Log[1 + N[(N[Exp[N[Cos[t], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] + 0.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 7.8e-190], N[Abs[N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 8e+66], N[(ew * N[(N[Cos[t], $MachinePrecision] + N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[Cos[t$95$1], $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right)\\
\mathbf{if}\;ew \leq -1.35 \cdot 10^{-21}:\\
\;\;\;\;\left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(e^{\cos t} + -1\right), 0\right)\right|\\
\mathbf{elif}\;ew \leq 7.8 \cdot 10^{-190}:\\
\;\;\;\;\left|\sin t \cdot \left(eh \cdot \sin t\_1\right)\right|\\
\mathbf{elif}\;ew \leq 8 \cdot 10^{+66}:\\
\;\;\;\;ew \cdot \left(\cos t + eh \cdot \frac{\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}{ew}\right)\\
\mathbf{else}:\\
\;\;\;\;\left|\cos t\_1 \cdot \left(ew \cdot \cos t\right)\right|\\
\end{array}
\end{array}
if ew < -1.3500000000000001e-21Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
associate-*r/99.8%
add-sqr-sqrt21.6%
sqrt-unprod99.2%
sqr-neg99.2%
sqrt-unprod77.5%
add-sqr-sqrt99.2%
log1p-expm1-u99.2%
associate-*r/99.2%
cos-atan99.2%
associate-*l/99.2%
Applied egg-rr99.2%
Taylor expanded in eh around 0 98.7%
Applied egg-rr79.5%
+-inverses79.5%
mul0-rgt79.5%
metadata-eval79.5%
Simplified79.5%
if -1.3500000000000001e-21 < ew < 7.7999999999999999e-190Initial 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 ew around 0 78.1%
*-commutative78.1%
associate-*l*78.1%
*-commutative78.1%
mul-1-neg78.1%
associate-*l/78.1%
distribute-rgt-neg-in78.1%
Simplified78.1%
if 7.7999999999999999e-190 < ew < 7.99999999999999956e66Initial program 99.8%
Applied egg-rr75.9%
Taylor expanded in ew around inf 74.5%
associate-/l*74.5%
*-commutative74.5%
*-commutative74.5%
associate-*r/74.5%
Simplified74.5%
if 7.99999999999999956e66 < ew Initial program 99.8%
Taylor expanded in ew around inf 83.1%
*-commutative83.1%
*-commutative83.1%
associate-*l*83.1%
mul-1-neg83.1%
associate-*l/83.1%
distribute-rgt-neg-in83.1%
*-commutative83.1%
Simplified83.1%
Final simplification78.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (* (cos (atan (* (tan t) (/ (- eh) ew)))) (* ew (cos t)))))
(t_2 (sin (atan (/ (* eh (tan t)) ew)))))
(if (<= t -2e+83)
t_1
(if (<= t -2600000.0)
(* eh (* (sin t) t_2))
(if (<= t 0.025) (fabs (+ ew (* (* t eh) t_2))) t_1)))))
double code(double eh, double ew, double t) {
double t_1 = fabs((cos(atan((tan(t) * (-eh / ew)))) * (ew * cos(t))));
double t_2 = sin(atan(((eh * tan(t)) / ew)));
double tmp;
if (t <= -2e+83) {
tmp = t_1;
} else if (t <= -2600000.0) {
tmp = eh * (sin(t) * t_2);
} else if (t <= 0.025) {
tmp = fabs((ew + ((t * eh) * t_2)));
} 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((cos(atan((tan(t) * (-eh / ew)))) * (ew * cos(t))))
t_2 = sin(atan(((eh * tan(t)) / ew)))
if (t <= (-2d+83)) then
tmp = t_1
else if (t <= (-2600000.0d0)) then
tmp = eh * (sin(t) * t_2)
else if (t <= 0.025d0) then
tmp = abs((ew + ((t * eh) * t_2)))
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((Math.cos(Math.atan((Math.tan(t) * (-eh / ew)))) * (ew * Math.cos(t))));
double t_2 = Math.sin(Math.atan(((eh * Math.tan(t)) / ew)));
double tmp;
if (t <= -2e+83) {
tmp = t_1;
} else if (t <= -2600000.0) {
tmp = eh * (Math.sin(t) * t_2);
} else if (t <= 0.025) {
tmp = Math.abs((ew + ((t * eh) * t_2)));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs((math.cos(math.atan((math.tan(t) * (-eh / ew)))) * (ew * math.cos(t)))) t_2 = math.sin(math.atan(((eh * math.tan(t)) / ew))) tmp = 0 if t <= -2e+83: tmp = t_1 elif t <= -2600000.0: tmp = eh * (math.sin(t) * t_2) elif t <= 0.025: tmp = math.fabs((ew + ((t * eh) * t_2))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(cos(atan(Float64(tan(t) * Float64(Float64(-eh) / ew)))) * Float64(ew * cos(t)))) t_2 = sin(atan(Float64(Float64(eh * tan(t)) / ew))) tmp = 0.0 if (t <= -2e+83) tmp = t_1; elseif (t <= -2600000.0) tmp = Float64(eh * Float64(sin(t) * t_2)); elseif (t <= 0.025) tmp = abs(Float64(ew + Float64(Float64(t * eh) * t_2))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = abs((cos(atan((tan(t) * (-eh / ew)))) * (ew * cos(t)))); t_2 = sin(atan(((eh * tan(t)) / ew))); tmp = 0.0; if (t <= -2e+83) tmp = t_1; elseif (t <= -2600000.0) tmp = eh * (sin(t) * t_2); elseif (t <= 0.025) tmp = abs((ew + ((t * eh) * t_2))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[Cos[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[((-eh) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2e+83], t$95$1, If[LessEqual[t, -2600000.0], N[(eh * N[(N[Sin[t], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.025], N[Abs[N[(ew + N[(N[(t * eh), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|\cos \tan^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right) \cdot \left(ew \cdot \cos t\right)\right|\\
t_2 := \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\\
\mathbf{if}\;t \leq -2 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2600000:\\
\;\;\;\;eh \cdot \left(\sin t \cdot t\_2\right)\\
\mathbf{elif}\;t \leq 0.025:\\
\;\;\;\;\left|ew + \left(t \cdot eh\right) \cdot t\_2\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.00000000000000006e83 or 0.025000000000000001 < t Initial program 99.6%
Taylor expanded in ew around inf 52.7%
*-commutative52.7%
*-commutative52.7%
associate-*l*52.7%
mul-1-neg52.7%
associate-*l/52.7%
distribute-rgt-neg-in52.7%
*-commutative52.7%
Simplified52.7%
if -2.00000000000000006e83 < t < -2.6e6Initial program 99.7%
Applied egg-rr67.4%
Taylor expanded in eh around inf 63.7%
if -2.6e6 < t < 0.025000000000000001Initial program 100.0%
fabs-sub100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
Simplified100.0%
associate-*r/100.0%
add-sqr-sqrt0.8%
sqrt-unprod98.5%
sqr-neg98.5%
sqrt-unprod97.7%
add-sqr-sqrt98.5%
log1p-expm1-u98.5%
associate-*r/98.5%
cos-atan98.5%
associate-*l/98.5%
Applied egg-rr98.5%
Taylor expanded in t around 0 96.9%
associate-*r*96.9%
mul-1-neg96.9%
associate-*l/96.9%
*-commutative96.9%
distribute-rgt-neg-in96.9%
mul-1-neg96.9%
associate-*r/96.9%
neg-mul-196.9%
Simplified96.9%
tan-quot96.9%
log1p-expm1-u96.9%
frac-times96.9%
add-sqr-sqrt42.7%
sqrt-unprod96.4%
sqr-neg96.4%
sqrt-unprod54.2%
add-sqr-sqrt97.0%
frac-times97.0%
log1p-expm1-u97.0%
tan-quot97.0%
associate-*r/97.0%
Applied egg-rr97.0%
Final simplification74.9%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (fma ew (log1p (+ (exp (cos t)) -1.0)) 0.0)))
(t_2 (sin (atan (/ (* eh (tan t)) ew)))))
(if (<= t -4.2e+83)
t_1
(if (<= t -2350000.0)
(* eh (* (sin t) t_2))
(if (<= t 0.0065) (fabs (+ ew (* (* t eh) t_2))) t_1)))))
double code(double eh, double ew, double t) {
double t_1 = fabs(fma(ew, log1p((exp(cos(t)) + -1.0)), 0.0));
double t_2 = sin(atan(((eh * tan(t)) / ew)));
double tmp;
if (t <= -4.2e+83) {
tmp = t_1;
} else if (t <= -2350000.0) {
tmp = eh * (sin(t) * t_2);
} else if (t <= 0.0065) {
tmp = fabs((ew + ((t * eh) * t_2)));
} else {
tmp = t_1;
}
return tmp;
}
function code(eh, ew, t) t_1 = abs(fma(ew, log1p(Float64(exp(cos(t)) + -1.0)), 0.0)) t_2 = sin(atan(Float64(Float64(eh * tan(t)) / ew))) tmp = 0.0 if (t <= -4.2e+83) tmp = t_1; elseif (t <= -2350000.0) tmp = Float64(eh * Float64(sin(t) * t_2)); elseif (t <= 0.0065) tmp = abs(Float64(ew + Float64(Float64(t * eh) * t_2))); else tmp = t_1; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(ew * N[Log[1 + N[(N[Exp[N[Cos[t], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] + 0.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.2e+83], t$95$1, If[LessEqual[t, -2350000.0], N[(eh * N[(N[Sin[t], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.0065], N[Abs[N[(ew + N[(N[(t * eh), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|\mathsf{fma}\left(ew, \mathsf{log1p}\left(e^{\cos t} + -1\right), 0\right)\right|\\
t_2 := \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2350000:\\
\;\;\;\;eh \cdot \left(\sin t \cdot t\_2\right)\\
\mathbf{elif}\;t \leq 0.0065:\\
\;\;\;\;\left|ew + \left(t \cdot eh\right) \cdot t\_2\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.20000000000000005e83 or 0.0064999999999999997 < t Initial program 99.6%
fabs-sub99.6%
sub-neg99.6%
+-commutative99.6%
associate-*l*99.6%
distribute-rgt-neg-in99.6%
fma-define99.6%
Simplified99.6%
associate-*r/99.6%
add-sqr-sqrt49.2%
sqrt-unprod99.6%
sqr-neg99.6%
sqrt-unprod50.1%
add-sqr-sqrt99.6%
log1p-expm1-u99.5%
associate-*r/99.5%
cos-atan99.5%
associate-*l/99.5%
Applied egg-rr99.5%
Taylor expanded in eh around 0 98.8%
Applied egg-rr52.5%
+-inverses52.5%
mul0-rgt52.5%
metadata-eval52.5%
Simplified52.5%
if -4.20000000000000005e83 < t < -2.35e6Initial program 99.7%
Applied egg-rr67.4%
Taylor expanded in eh around inf 63.7%
if -2.35e6 < t < 0.0064999999999999997Initial program 100.0%
fabs-sub100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
Simplified100.0%
associate-*r/100.0%
add-sqr-sqrt0.8%
sqrt-unprod98.5%
sqr-neg98.5%
sqrt-unprod97.7%
add-sqr-sqrt98.5%
log1p-expm1-u98.5%
associate-*r/98.5%
cos-atan98.5%
associate-*l/98.5%
Applied egg-rr98.5%
Taylor expanded in t around 0 96.9%
associate-*r*96.9%
mul-1-neg96.9%
associate-*l/96.9%
*-commutative96.9%
distribute-rgt-neg-in96.9%
mul-1-neg96.9%
associate-*r/96.9%
neg-mul-196.9%
Simplified96.9%
tan-quot96.9%
log1p-expm1-u96.9%
frac-times96.9%
add-sqr-sqrt42.7%
sqrt-unprod96.4%
sqr-neg96.4%
sqrt-unprod54.2%
add-sqr-sqrt97.0%
frac-times97.0%
log1p-expm1-u97.0%
tan-quot97.0%
associate-*r/97.0%
Applied egg-rr97.0%
Final simplification74.9%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sin (atan (/ (* eh (tan t)) ew)))) (t_2 (* ew (cos t))))
(if (<= t -1.9e+183)
t_2
(if (<= t -5400000.0)
(* eh (* (sin t) t_1))
(if (<= t 0.24) (fabs (+ ew (* (* t eh) t_1))) t_2)))))
double code(double eh, double ew, double t) {
double t_1 = sin(atan(((eh * tan(t)) / ew)));
double t_2 = ew * cos(t);
double tmp;
if (t <= -1.9e+183) {
tmp = t_2;
} else if (t <= -5400000.0) {
tmp = eh * (sin(t) * t_1);
} else if (t <= 0.24) {
tmp = fabs((ew + ((t * eh) * t_1)));
} else {
tmp = t_2;
}
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 = sin(atan(((eh * tan(t)) / ew)))
t_2 = ew * cos(t)
if (t <= (-1.9d+183)) then
tmp = t_2
else if (t <= (-5400000.0d0)) then
tmp = eh * (sin(t) * t_1)
else if (t <= 0.24d0) then
tmp = abs((ew + ((t * eh) * t_1)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.sin(Math.atan(((eh * Math.tan(t)) / ew)));
double t_2 = ew * Math.cos(t);
double tmp;
if (t <= -1.9e+183) {
tmp = t_2;
} else if (t <= -5400000.0) {
tmp = eh * (Math.sin(t) * t_1);
} else if (t <= 0.24) {
tmp = Math.abs((ew + ((t * eh) * t_1)));
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.sin(math.atan(((eh * math.tan(t)) / ew))) t_2 = ew * math.cos(t) tmp = 0 if t <= -1.9e+183: tmp = t_2 elif t <= -5400000.0: tmp = eh * (math.sin(t) * t_1) elif t <= 0.24: tmp = math.fabs((ew + ((t * eh) * t_1))) else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = sin(atan(Float64(Float64(eh * tan(t)) / ew))) t_2 = Float64(ew * cos(t)) tmp = 0.0 if (t <= -1.9e+183) tmp = t_2; elseif (t <= -5400000.0) tmp = Float64(eh * Float64(sin(t) * t_1)); elseif (t <= 0.24) tmp = abs(Float64(ew + Float64(Float64(t * eh) * t_1))); else tmp = t_2; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = sin(atan(((eh * tan(t)) / ew))); t_2 = ew * cos(t); tmp = 0.0; if (t <= -1.9e+183) tmp = t_2; elseif (t <= -5400000.0) tmp = eh * (sin(t) * t_1); elseif (t <= 0.24) tmp = abs((ew + ((t * eh) * t_1))); else tmp = t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e+183], t$95$2, If[LessEqual[t, -5400000.0], N[(eh * N[(N[Sin[t], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.24], N[Abs[N[(ew + N[(N[(t * eh), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\\
t_2 := ew \cdot \cos t\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+183}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -5400000:\\
\;\;\;\;eh \cdot \left(\sin t \cdot t\_1\right)\\
\mathbf{elif}\;t \leq 0.24:\\
\;\;\;\;\left|ew + \left(t \cdot eh\right) \cdot t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.9e183 or 0.23999999999999999 < t Initial program 99.7%
Applied egg-rr54.3%
Taylor expanded in ew around -inf 35.5%
associate-*r*35.5%
neg-mul-135.5%
rem-cube-cbrt35.5%
neg-mul-135.5%
Simplified35.5%
if -1.9e183 < t < -5.4e6Initial program 99.5%
Applied egg-rr51.4%
Taylor expanded in eh around inf 48.4%
if -5.4e6 < t < 0.23999999999999999Initial program 100.0%
fabs-sub100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
Simplified100.0%
associate-*r/100.0%
add-sqr-sqrt0.8%
sqrt-unprod98.5%
sqr-neg98.5%
sqrt-unprod97.7%
add-sqr-sqrt98.5%
log1p-expm1-u98.5%
associate-*r/98.5%
cos-atan98.5%
associate-*l/98.5%
Applied egg-rr98.5%
Taylor expanded in t around 0 96.9%
associate-*r*96.9%
mul-1-neg96.9%
associate-*l/96.9%
*-commutative96.9%
distribute-rgt-neg-in96.9%
mul-1-neg96.9%
associate-*r/96.9%
neg-mul-196.9%
Simplified96.9%
tan-quot96.9%
log1p-expm1-u96.9%
frac-times96.9%
add-sqr-sqrt42.7%
sqrt-unprod96.4%
sqr-neg96.4%
sqrt-unprod54.2%
add-sqr-sqrt97.0%
frac-times97.0%
log1p-expm1-u97.0%
tan-quot97.0%
associate-*r/97.0%
Applied egg-rr97.0%
Final simplification67.6%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (cos t))))
(if (<= t -2.5e+194)
t_1
(if (<= t -2350000.0)
(* eh (* (sin t) (sin (atan (/ (* eh (tan t)) ew)))))
(if (<= t 0.96)
(fabs (+ ew (* (* t eh) (sin (atan (* eh (/ (- t) ew)))))))
t_1)))))
double code(double eh, double ew, double t) {
double t_1 = ew * cos(t);
double tmp;
if (t <= -2.5e+194) {
tmp = t_1;
} else if (t <= -2350000.0) {
tmp = eh * (sin(t) * sin(atan(((eh * tan(t)) / ew))));
} else if (t <= 0.96) {
tmp = fabs((ew + ((t * eh) * 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 = ew * cos(t)
if (t <= (-2.5d+194)) then
tmp = t_1
else if (t <= (-2350000.0d0)) then
tmp = eh * (sin(t) * sin(atan(((eh * tan(t)) / ew))))
else if (t <= 0.96d0) then
tmp = abs((ew + ((t * eh) * 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 = ew * Math.cos(t);
double tmp;
if (t <= -2.5e+194) {
tmp = t_1;
} else if (t <= -2350000.0) {
tmp = eh * (Math.sin(t) * Math.sin(Math.atan(((eh * Math.tan(t)) / ew))));
} else if (t <= 0.96) {
tmp = Math.abs((ew + ((t * eh) * Math.sin(Math.atan((eh * (-t / ew)))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = ew * math.cos(t) tmp = 0 if t <= -2.5e+194: tmp = t_1 elif t <= -2350000.0: tmp = eh * (math.sin(t) * math.sin(math.atan(((eh * math.tan(t)) / ew)))) elif t <= 0.96: tmp = math.fabs((ew + ((t * eh) * math.sin(math.atan((eh * (-t / ew))))))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = Float64(ew * cos(t)) tmp = 0.0 if (t <= -2.5e+194) tmp = t_1; elseif (t <= -2350000.0) tmp = Float64(eh * Float64(sin(t) * sin(atan(Float64(Float64(eh * tan(t)) / ew))))); elseif (t <= 0.96) tmp = abs(Float64(ew + Float64(Float64(t * eh) * sin(atan(Float64(eh * Float64(Float64(-t) / ew))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = ew * cos(t); tmp = 0.0; if (t <= -2.5e+194) tmp = t_1; elseif (t <= -2350000.0) tmp = eh * (sin(t) * sin(atan(((eh * tan(t)) / ew)))); elseif (t <= 0.96) tmp = abs((ew + ((t * eh) * sin(atan((eh * (-t / ew))))))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e+194], t$95$1, If[LessEqual[t, -2350000.0], N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.96], N[Abs[N[(ew + N[(N[(t * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[((-t) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \cos t\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2350000:\\
\;\;\;\;eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{ew}\right)\right)\\
\mathbf{elif}\;t \leq 0.96:\\
\;\;\;\;\left|ew + \left(t \cdot eh\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{-t}{ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.49999999999999994e194 or 0.95999999999999996 < t Initial program 99.7%
Applied egg-rr54.3%
Taylor expanded in ew around -inf 35.5%
associate-*r*35.5%
neg-mul-135.5%
rem-cube-cbrt35.5%
neg-mul-135.5%
Simplified35.5%
if -2.49999999999999994e194 < t < -2.35e6Initial program 99.5%
Applied egg-rr51.4%
Taylor expanded in eh around inf 48.4%
if -2.35e6 < t < 0.95999999999999996Initial program 100.0%
fabs-sub100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
Simplified100.0%
associate-*r/100.0%
add-sqr-sqrt0.8%
sqrt-unprod98.5%
sqr-neg98.5%
sqrt-unprod97.7%
add-sqr-sqrt98.5%
log1p-expm1-u98.5%
associate-*r/98.5%
cos-atan98.5%
associate-*l/98.5%
Applied egg-rr98.5%
Taylor expanded in t around 0 96.9%
associate-*r*96.9%
mul-1-neg96.9%
associate-*l/96.9%
*-commutative96.9%
distribute-rgt-neg-in96.9%
mul-1-neg96.9%
associate-*r/96.9%
neg-mul-196.9%
Simplified96.9%
Taylor expanded in t around 0 96.9%
mul-1-neg96.9%
associate-/l*96.9%
distribute-lft-neg-in96.9%
Simplified96.9%
Final simplification67.5%
(FPCore (eh ew t)
:precision binary64
(if (<= ew -1.38e-64)
(* ew (- (cos t)))
(if (<= ew -4e-310)
(* (* t eh) (- (sin (atan (/ (* t eh) ew)))))
(if (<= ew 1.15e-21)
(+ ew (* (sin (atan (* eh (/ (tan t) ew)))) (* t eh)))
(* ew (cos t))))))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= -1.38e-64) {
tmp = ew * -cos(t);
} else if (ew <= -4e-310) {
tmp = (t * eh) * -sin(atan(((t * eh) / ew)));
} else if (ew <= 1.15e-21) {
tmp = ew + (sin(atan((eh * (tan(t) / ew)))) * (t * eh));
} else {
tmp = 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 (ew <= (-1.38d-64)) then
tmp = ew * -cos(t)
else if (ew <= (-4d-310)) then
tmp = (t * eh) * -sin(atan(((t * eh) / ew)))
else if (ew <= 1.15d-21) then
tmp = ew + (sin(atan((eh * (tan(t) / ew)))) * (t * eh))
else
tmp = ew * cos(t)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (ew <= -1.38e-64) {
tmp = ew * -Math.cos(t);
} else if (ew <= -4e-310) {
tmp = (t * eh) * -Math.sin(Math.atan(((t * eh) / ew)));
} else if (ew <= 1.15e-21) {
tmp = ew + (Math.sin(Math.atan((eh * (Math.tan(t) / ew)))) * (t * eh));
} else {
tmp = ew * Math.cos(t);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if ew <= -1.38e-64: tmp = ew * -math.cos(t) elif ew <= -4e-310: tmp = (t * eh) * -math.sin(math.atan(((t * eh) / ew))) elif ew <= 1.15e-21: tmp = ew + (math.sin(math.atan((eh * (math.tan(t) / ew)))) * (t * eh)) else: tmp = ew * math.cos(t) return tmp
function code(eh, ew, t) tmp = 0.0 if (ew <= -1.38e-64) tmp = Float64(ew * Float64(-cos(t))); elseif (ew <= -4e-310) tmp = Float64(Float64(t * eh) * Float64(-sin(atan(Float64(Float64(t * eh) / ew))))); elseif (ew <= 1.15e-21) tmp = Float64(ew + Float64(sin(atan(Float64(eh * Float64(tan(t) / ew)))) * Float64(t * eh))); else tmp = Float64(ew * cos(t)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (ew <= -1.38e-64) tmp = ew * -cos(t); elseif (ew <= -4e-310) tmp = (t * eh) * -sin(atan(((t * eh) / ew))); elseif (ew <= 1.15e-21) tmp = ew + (sin(atan((eh * (tan(t) / ew)))) * (t * eh)); else tmp = ew * cos(t); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[ew, -1.38e-64], N[(ew * (-N[Cos[t], $MachinePrecision])), $MachinePrecision], If[LessEqual[ew, -4e-310], N[(N[(t * eh), $MachinePrecision] * (-N[Sin[N[ArcTan[N[(N[(t * eh), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[ew, 1.15e-21], N[(ew + N[(N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(t * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -1.38 \cdot 10^{-64}:\\
\;\;\;\;ew \cdot \left(-\cos t\right)\\
\mathbf{elif}\;ew \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\left(t \cdot eh\right) \cdot \left(-\sin \tan^{-1} \left(\frac{t \cdot eh}{ew}\right)\right)\\
\mathbf{elif}\;ew \leq 1.15 \cdot 10^{-21}:\\
\;\;\;\;ew + \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \left(t \cdot eh\right)\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t\\
\end{array}
\end{array}
if ew < -1.37999999999999998e-64Initial program 99.9%
Applied egg-rr76.7%
neg-sub076.7%
associate-*r/76.7%
*-commutative76.7%
associate-/l*76.7%
associate-*r/76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in eh around 0 63.3%
neg-mul-163.3%
distribute-lft-neg-in63.3%
Simplified63.3%
if -1.37999999999999998e-64 < ew < -3.999999999999988e-310Initial program 99.7%
Applied egg-rr71.4%
neg-sub071.4%
associate-*r/71.4%
*-commutative71.4%
associate-/l*71.4%
associate-*r/71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in t around 0 50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in t around inf 34.5%
*-commutative34.5%
*-commutative34.5%
*-commutative34.5%
associate-*r/34.5%
associate-*r*34.5%
associate-*r/34.5%
*-commutative34.5%
associate-/l*34.5%
*-commutative34.5%
Simplified34.5%
Taylor expanded in t around 0 35.5%
if -3.999999999999988e-310 < ew < 1.15e-21Initial program 99.8%
Applied egg-rr77.3%
Taylor expanded in t around 0 50.8%
associate-*r*50.8%
*-commutative50.8%
*-commutative50.8%
*-commutative50.8%
*-commutative50.8%
associate-*r/50.8%
*-commutative50.8%
Simplified50.8%
if 1.15e-21 < ew Initial program 99.8%
Applied egg-rr70.6%
Taylor expanded in ew around -inf 57.9%
associate-*r*57.9%
neg-mul-157.9%
rem-cube-cbrt57.9%
neg-mul-157.9%
Simplified57.9%
Final simplification53.7%
(FPCore (eh ew t)
:precision binary64
(if (<= ew -1.2e-64)
(* ew (- (cos t)))
(if (<= ew -4e-310)
(* (* t eh) (- (sin (atan (/ (* t eh) ew)))))
(if (<= ew 1.85e-194)
(* t (* eh (sin (atan (* eh (/ (tan t) ew))))))
(* ew (cos t))))))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= -1.2e-64) {
tmp = ew * -cos(t);
} else if (ew <= -4e-310) {
tmp = (t * eh) * -sin(atan(((t * eh) / ew)));
} else if (ew <= 1.85e-194) {
tmp = t * (eh * sin(atan((eh * (tan(t) / ew)))));
} else {
tmp = 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 (ew <= (-1.2d-64)) then
tmp = ew * -cos(t)
else if (ew <= (-4d-310)) then
tmp = (t * eh) * -sin(atan(((t * eh) / ew)))
else if (ew <= 1.85d-194) then
tmp = t * (eh * sin(atan((eh * (tan(t) / ew)))))
else
tmp = ew * cos(t)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (ew <= -1.2e-64) {
tmp = ew * -Math.cos(t);
} else if (ew <= -4e-310) {
tmp = (t * eh) * -Math.sin(Math.atan(((t * eh) / ew)));
} else if (ew <= 1.85e-194) {
tmp = t * (eh * Math.sin(Math.atan((eh * (Math.tan(t) / ew)))));
} else {
tmp = ew * Math.cos(t);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if ew <= -1.2e-64: tmp = ew * -math.cos(t) elif ew <= -4e-310: tmp = (t * eh) * -math.sin(math.atan(((t * eh) / ew))) elif ew <= 1.85e-194: tmp = t * (eh * math.sin(math.atan((eh * (math.tan(t) / ew))))) else: tmp = ew * math.cos(t) return tmp
function code(eh, ew, t) tmp = 0.0 if (ew <= -1.2e-64) tmp = Float64(ew * Float64(-cos(t))); elseif (ew <= -4e-310) tmp = Float64(Float64(t * eh) * Float64(-sin(atan(Float64(Float64(t * eh) / ew))))); elseif (ew <= 1.85e-194) tmp = Float64(t * Float64(eh * sin(atan(Float64(eh * Float64(tan(t) / ew)))))); else tmp = Float64(ew * cos(t)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (ew <= -1.2e-64) tmp = ew * -cos(t); elseif (ew <= -4e-310) tmp = (t * eh) * -sin(atan(((t * eh) / ew))); elseif (ew <= 1.85e-194) tmp = t * (eh * sin(atan((eh * (tan(t) / ew))))); else tmp = ew * cos(t); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[ew, -1.2e-64], N[(ew * (-N[Cos[t], $MachinePrecision])), $MachinePrecision], If[LessEqual[ew, -4e-310], N[(N[(t * eh), $MachinePrecision] * (-N[Sin[N[ArcTan[N[(N[(t * eh), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[ew, 1.85e-194], N[(t * N[(eh * N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -1.2 \cdot 10^{-64}:\\
\;\;\;\;ew \cdot \left(-\cos t\right)\\
\mathbf{elif}\;ew \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\left(t \cdot eh\right) \cdot \left(-\sin \tan^{-1} \left(\frac{t \cdot eh}{ew}\right)\right)\\
\mathbf{elif}\;ew \leq 1.85 \cdot 10^{-194}:\\
\;\;\;\;t \cdot \left(eh \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t\\
\end{array}
\end{array}
if ew < -1.19999999999999999e-64Initial program 99.9%
Applied egg-rr76.7%
neg-sub076.7%
associate-*r/76.7%
*-commutative76.7%
associate-/l*76.7%
associate-*r/76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in eh around 0 63.3%
neg-mul-163.3%
distribute-lft-neg-in63.3%
Simplified63.3%
if -1.19999999999999999e-64 < ew < -3.999999999999988e-310Initial program 99.7%
Applied egg-rr71.4%
neg-sub071.4%
associate-*r/71.4%
*-commutative71.4%
associate-/l*71.4%
associate-*r/71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in t around 0 50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in t around inf 34.5%
*-commutative34.5%
*-commutative34.5%
*-commutative34.5%
associate-*r/34.5%
associate-*r*34.5%
associate-*r/34.5%
*-commutative34.5%
associate-/l*34.5%
*-commutative34.5%
Simplified34.5%
Taylor expanded in t around 0 35.5%
if -3.999999999999988e-310 < ew < 1.85000000000000004e-194Initial program 99.8%
Applied egg-rr15.8%
neg-sub015.8%
associate-*r/15.8%
*-commutative15.8%
associate-/l*15.8%
associate-*r/15.8%
*-commutative15.8%
Simplified15.8%
Taylor expanded in t around 0 3.3%
*-commutative3.3%
Simplified3.3%
Taylor expanded in t around inf 3.5%
*-commutative3.5%
*-commutative3.5%
*-commutative3.5%
associate-*r/3.5%
associate-*r*3.5%
associate-*r/3.5%
*-commutative3.5%
associate-/l*3.5%
*-commutative3.5%
Simplified3.5%
add-sqr-sqrt2.6%
sqrt-unprod41.4%
sqr-neg41.4%
sqrt-unprod48.1%
add-sqr-sqrt49.0%
associate-*r*49.0%
Applied egg-rr49.0%
if 1.85000000000000004e-194 < ew Initial program 99.8%
Applied egg-rr71.8%
Taylor expanded in ew around -inf 52.7%
associate-*r*52.7%
neg-mul-152.7%
rem-cube-cbrt52.7%
neg-mul-152.7%
Simplified52.7%
Final simplification52.4%
(FPCore (eh ew t)
:precision binary64
(if (<= t -1.1)
(* ew (- (cos t)))
(if (<= t 0.85)
(fabs (+ ew (* (* t eh) (sin (atan (* eh (/ (- t) ew)))))))
(* ew (cos t)))))
double code(double eh, double ew, double t) {
double tmp;
if (t <= -1.1) {
tmp = ew * -cos(t);
} else if (t <= 0.85) {
tmp = fabs((ew + ((t * eh) * sin(atan((eh * (-t / ew)))))));
} else {
tmp = 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 (t <= (-1.1d0)) then
tmp = ew * -cos(t)
else if (t <= 0.85d0) then
tmp = abs((ew + ((t * eh) * sin(atan((eh * (-t / ew)))))))
else
tmp = ew * cos(t)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (t <= -1.1) {
tmp = ew * -Math.cos(t);
} else if (t <= 0.85) {
tmp = Math.abs((ew + ((t * eh) * Math.sin(Math.atan((eh * (-t / ew)))))));
} else {
tmp = ew * Math.cos(t);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if t <= -1.1: tmp = ew * -math.cos(t) elif t <= 0.85: tmp = math.fabs((ew + ((t * eh) * math.sin(math.atan((eh * (-t / ew))))))) else: tmp = ew * math.cos(t) return tmp
function code(eh, ew, t) tmp = 0.0 if (t <= -1.1) tmp = Float64(ew * Float64(-cos(t))); elseif (t <= 0.85) tmp = abs(Float64(ew + Float64(Float64(t * eh) * sin(atan(Float64(eh * Float64(Float64(-t) / ew))))))); else tmp = Float64(ew * cos(t)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (t <= -1.1) tmp = ew * -cos(t); elseif (t <= 0.85) tmp = abs((ew + ((t * eh) * sin(atan((eh * (-t / ew))))))); else tmp = ew * cos(t); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[t, -1.1], N[(ew * (-N[Cos[t], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 0.85], N[Abs[N[(ew + N[(N[(t * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[((-t) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1:\\
\;\;\;\;ew \cdot \left(-\cos t\right)\\
\mathbf{elif}\;t \leq 0.85:\\
\;\;\;\;\left|ew + \left(t \cdot eh\right) \cdot \sin \tan^{-1} \left(eh \cdot \frac{-t}{ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t\\
\end{array}
\end{array}
if t < -1.1000000000000001Initial program 99.6%
Applied egg-rr48.8%
neg-sub048.8%
associate-*r/48.8%
*-commutative48.8%
associate-/l*48.8%
associate-*r/48.8%
*-commutative48.8%
Simplified48.8%
Taylor expanded in eh around 0 29.4%
neg-mul-129.4%
distribute-lft-neg-in29.4%
Simplified29.4%
if -1.1000000000000001 < t < 0.849999999999999978Initial program 100.0%
fabs-sub100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
Simplified100.0%
associate-*r/100.0%
add-sqr-sqrt0.0%
sqrt-unprod98.5%
sqr-neg98.5%
sqrt-unprod98.5%
add-sqr-sqrt98.5%
log1p-expm1-u98.5%
associate-*r/98.5%
cos-atan98.5%
associate-*l/98.5%
Applied egg-rr98.5%
Taylor expanded in t around 0 97.5%
associate-*r*97.5%
mul-1-neg97.5%
associate-*l/97.5%
*-commutative97.5%
distribute-rgt-neg-in97.5%
mul-1-neg97.5%
associate-*r/97.5%
neg-mul-197.5%
Simplified97.5%
Taylor expanded in t around 0 97.5%
mul-1-neg97.5%
associate-/l*97.5%
distribute-lft-neg-in97.5%
Simplified97.5%
if 0.849999999999999978 < t Initial program 99.7%
Applied egg-rr55.4%
Taylor expanded in ew around -inf 34.6%
associate-*r*34.6%
neg-mul-134.6%
rem-cube-cbrt34.6%
neg-mul-134.6%
Simplified34.6%
Final simplification63.4%
(FPCore (eh ew t) :precision binary64 (if (or (<= t -0.00074) (not (<= t 11500000000000.0))) (* ew (- (cos t))) (fabs ew)))
double code(double eh, double ew, double t) {
double tmp;
if ((t <= -0.00074) || !(t <= 11500000000000.0)) {
tmp = ew * -cos(t);
} else {
tmp = 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.00074d0)) .or. (.not. (t <= 11500000000000.0d0))) then
tmp = ew * -cos(t)
else
tmp = abs(ew)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((t <= -0.00074) || !(t <= 11500000000000.0)) {
tmp = ew * -Math.cos(t);
} else {
tmp = Math.abs(ew);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (t <= -0.00074) or not (t <= 11500000000000.0): tmp = ew * -math.cos(t) else: tmp = math.fabs(ew) return tmp
function code(eh, ew, t) tmp = 0.0 if ((t <= -0.00074) || !(t <= 11500000000000.0)) tmp = Float64(ew * Float64(-cos(t))); else tmp = abs(ew); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((t <= -0.00074) || ~((t <= 11500000000000.0))) tmp = ew * -cos(t); else tmp = abs(ew); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -0.00074], N[Not[LessEqual[t, 11500000000000.0]], $MachinePrecision]], N[(ew * (-N[Cos[t], $MachinePrecision])), $MachinePrecision], N[Abs[ew], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.00074 \lor \neg \left(t \leq 11500000000000\right):\\
\;\;\;\;ew \cdot \left(-\cos t\right)\\
\mathbf{else}:\\
\;\;\;\;\left|ew\right|\\
\end{array}
\end{array}
if t < -7.3999999999999999e-4 or 1.15e13 < t Initial program 99.6%
Applied egg-rr47.7%
neg-sub047.7%
associate-*r/47.7%
*-commutative47.7%
associate-/l*47.7%
associate-*r/47.7%
*-commutative47.7%
Simplified47.7%
Taylor expanded in eh around 0 25.8%
neg-mul-125.8%
distribute-lft-neg-in25.8%
Simplified25.8%
if -7.3999999999999999e-4 < t < 1.15e13Initial program 100.0%
fabs-sub100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
Simplified100.0%
associate-*r/100.0%
add-sqr-sqrt1.6%
sqrt-unprod98.6%
sqr-neg98.6%
sqrt-unprod97.0%
add-sqr-sqrt98.6%
log1p-expm1-u98.6%
associate-*r/98.6%
cos-atan98.6%
associate-*l/98.6%
Applied egg-rr98.6%
Taylor expanded in t around 0 67.3%
Final simplification46.4%
(FPCore (eh ew t) :precision binary64 (if (<= t -0.000195) (* ew (- (cos t))) (if (<= t 0.009) (fabs ew) (* ew (cos t)))))
double code(double eh, double ew, double t) {
double tmp;
if (t <= -0.000195) {
tmp = ew * -cos(t);
} else if (t <= 0.009) {
tmp = fabs(ew);
} else {
tmp = 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 (t <= (-0.000195d0)) then
tmp = ew * -cos(t)
else if (t <= 0.009d0) then
tmp = abs(ew)
else
tmp = ew * cos(t)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (t <= -0.000195) {
tmp = ew * -Math.cos(t);
} else if (t <= 0.009) {
tmp = Math.abs(ew);
} else {
tmp = ew * Math.cos(t);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if t <= -0.000195: tmp = ew * -math.cos(t) elif t <= 0.009: tmp = math.fabs(ew) else: tmp = ew * math.cos(t) return tmp
function code(eh, ew, t) tmp = 0.0 if (t <= -0.000195) tmp = Float64(ew * Float64(-cos(t))); elseif (t <= 0.009) tmp = abs(ew); else tmp = Float64(ew * cos(t)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (t <= -0.000195) tmp = ew * -cos(t); elseif (t <= 0.009) tmp = abs(ew); else tmp = ew * cos(t); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[t, -0.000195], N[(ew * (-N[Cos[t], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 0.009], N[Abs[ew], $MachinePrecision], N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.000195:\\
\;\;\;\;ew \cdot \left(-\cos t\right)\\
\mathbf{elif}\;t \leq 0.009:\\
\;\;\;\;\left|ew\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t\\
\end{array}
\end{array}
if t < -1.94999999999999996e-4Initial program 99.6%
Applied egg-rr48.8%
neg-sub048.8%
associate-*r/48.8%
*-commutative48.8%
associate-/l*48.8%
associate-*r/48.8%
*-commutative48.8%
Simplified48.8%
Taylor expanded in eh around 0 29.4%
neg-mul-129.4%
distribute-lft-neg-in29.4%
Simplified29.4%
if -1.94999999999999996e-4 < t < 0.00899999999999999932Initial program 100.0%
fabs-sub100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
Simplified100.0%
associate-*r/100.0%
add-sqr-sqrt0.0%
sqrt-unprod98.5%
sqr-neg98.5%
sqrt-unprod98.5%
add-sqr-sqrt98.5%
log1p-expm1-u98.5%
associate-*r/98.5%
cos-atan98.5%
associate-*l/98.5%
Applied egg-rr98.5%
Taylor expanded in t around 0 68.9%
if 0.00899999999999999932 < t Initial program 99.7%
Applied egg-rr55.4%
Taylor expanded in ew around -inf 34.6%
associate-*r*34.6%
neg-mul-134.6%
rem-cube-cbrt34.6%
neg-mul-134.6%
Simplified34.6%
Final simplification49.6%
(FPCore (eh ew t) :precision binary64 (fabs ew))
double code(double eh, double ew, double t) {
return fabs(ew);
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs(ew)
end function
public static double code(double eh, double ew, double t) {
return Math.abs(ew);
}
def code(eh, ew, t): return math.fabs(ew)
function code(eh, ew, t) return abs(ew) end
function tmp = code(eh, ew, t) tmp = abs(ew); end
code[eh_, ew_, t_] := N[Abs[ew], $MachinePrecision]
\begin{array}{l}
\\
\left|ew\right|
\end{array}
Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
associate-*r/99.8%
add-sqr-sqrt25.2%
sqrt-unprod99.1%
sqr-neg99.1%
sqrt-unprod73.7%
add-sqr-sqrt99.1%
log1p-expm1-u99.0%
associate-*r/99.0%
cos-atan99.0%
associate-*l/99.0%
Applied egg-rr99.0%
Taylor expanded in t around 0 39.8%
(FPCore (eh ew t) :precision binary64 (if (<= ew -4e-310) (- ew) ew))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= -4e-310) {
tmp = -ew;
} else {
tmp = 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 <= (-4d-310)) then
tmp = -ew
else
tmp = ew
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (ew <= -4e-310) {
tmp = -ew;
} else {
tmp = ew;
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if ew <= -4e-310: tmp = -ew else: tmp = ew return tmp
function code(eh, ew, t) tmp = 0.0 if (ew <= -4e-310) tmp = Float64(-ew); else tmp = ew; end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (ew <= -4e-310) tmp = -ew; else tmp = ew; end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[ew, -4e-310], (-ew), ew]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -4 \cdot 10^{-310}:\\
\;\;\;\;-ew\\
\mathbf{else}:\\
\;\;\;\;ew\\
\end{array}
\end{array}
if ew < -3.999999999999988e-310Initial program 99.8%
Applied egg-rr74.6%
neg-sub074.6%
associate-*r/74.6%
*-commutative74.6%
associate-/l*74.6%
associate-*r/74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in t around 0 40.9%
neg-mul-140.9%
Simplified40.9%
if -3.999999999999988e-310 < ew Initial program 99.8%
Applied egg-rr26.1%
neg-sub026.1%
associate-*r/26.1%
*-commutative26.1%
associate-/l*26.1%
associate-*r/26.1%
*-commutative26.1%
Simplified26.1%
Taylor expanded in t around 0 1.5%
neg-mul-11.5%
Simplified1.5%
add-sqr-sqrt0.0%
sqrt-unprod25.0%
sqr-neg25.0%
sqrt-unprod38.6%
add-sqr-sqrt38.8%
*-un-lft-identity38.8%
Applied egg-rr38.8%
Final simplification39.8%
(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%
Applied egg-rr49.8%
neg-sub049.8%
associate-*r/49.8%
*-commutative49.8%
associate-/l*49.8%
associate-*r/49.8%
*-commutative49.8%
Simplified49.8%
Taylor expanded in t around 0 20.7%
neg-mul-120.7%
Simplified20.7%
herbie shell --seed 2024146
(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)))))))