
(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 16 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) (- (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(fma(ew, (cos(t) * -cos(t_1)), (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) * Float64(-cos(t_1))), 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], $MachinePrecision] * (-N[Cos[t$95$1], $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 \cdot \left(-\cos t\_1\right), eh \cdot \left(\sin t \cdot \sin t\_1\right)\right)\right|
\end{array}
\end{array}
Initial program 99.7%
fabs-sub99.7%
sub-neg99.7%
+-commutative99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
fma-define99.8%
Simplified99.8%
Final simplification99.8%
(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(eh * Float64(tan(t) / Float64(-ew)))) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(eh * Float64(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[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $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|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - eh \cdot \left(\sin t \cdot \sin t\_1\right)\right|
\end{array}
\end{array}
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%
Final simplification99.8%
(FPCore (eh ew t)
:precision binary64
(pow
(sqrt
(fabs
(-
(* ew (cos t))
(* (* eh (sin t)) (sin (- (atan (* (tan t) (/ eh ew)))))))))
2.0))
double code(double eh, double ew, double t) {
return pow(sqrt(fabs(((ew * cos(t)) - ((eh * sin(t)) * sin(-atan((tan(t) * (eh / ew)))))))), 2.0);
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = sqrt(abs(((ew * cos(t)) - ((eh * sin(t)) * sin(-atan((tan(t) * (eh / ew)))))))) ** 2.0d0
end function
public static double code(double eh, double ew, double t) {
return Math.pow(Math.sqrt(Math.abs(((ew * Math.cos(t)) - ((eh * Math.sin(t)) * Math.sin(-Math.atan((Math.tan(t) * (eh / ew)))))))), 2.0);
}
def code(eh, ew, t): return math.pow(math.sqrt(math.fabs(((ew * math.cos(t)) - ((eh * math.sin(t)) * math.sin(-math.atan((math.tan(t) * (eh / ew)))))))), 2.0)
function code(eh, ew, t) return sqrt(abs(Float64(Float64(ew * cos(t)) - Float64(Float64(eh * sin(t)) * sin(Float64(-atan(Float64(tan(t) * Float64(eh / ew))))))))) ^ 2.0 end
function tmp = code(eh, ew, t) tmp = sqrt(abs(((ew * cos(t)) - ((eh * sin(t)) * sin(-atan((tan(t) * (eh / ew)))))))) ^ 2.0; end
code[eh_, ew_, t_] := N[Power[N[Sqrt[N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[(-N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]
\begin{array}{l}
\\
{\left(\sqrt{\left|ew \cdot \cos t - \left(eh \cdot \sin t\right) \cdot \sin \left(-\tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right)\right)\right|}\right)}^{2}
\end{array}
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%
add-cube-cbrt98.5%
pow398.5%
Applied egg-rr98.5%
add-sqr-sqrt98.2%
pow298.2%
Applied egg-rr99.2%
Taylor expanded in ew around inf 98.5%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (* eh (/ (tan t) (- ew))))))
(if (or (<= eh -5.2e+36) (not (<= eh 1.3e+149)))
(fabs (* eh (+ (sin t) (/ (* (* ew (cos t)) (cos t_1)) eh))))
(fabs (* ew (+ (cos t) (* eh (/ (* (sin t) (sin t_1)) ew))))))))
double code(double eh, double ew, double t) {
double t_1 = atan((eh * (tan(t) / -ew)));
double tmp;
if ((eh <= -5.2e+36) || !(eh <= 1.3e+149)) {
tmp = fabs((eh * (sin(t) + (((ew * cos(t)) * cos(t_1)) / eh))));
} else {
tmp = fabs((ew * (cos(t) + (eh * ((sin(t) * sin(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 = atan((eh * (tan(t) / -ew)))
if ((eh <= (-5.2d+36)) .or. (.not. (eh <= 1.3d+149))) then
tmp = abs((eh * (sin(t) + (((ew * cos(t)) * cos(t_1)) / eh))))
else
tmp = abs((ew * (cos(t) + (eh * ((sin(t) * sin(t_1)) / ew)))))
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 tmp;
if ((eh <= -5.2e+36) || !(eh <= 1.3e+149)) {
tmp = Math.abs((eh * (Math.sin(t) + (((ew * Math.cos(t)) * Math.cos(t_1)) / eh))));
} else {
tmp = Math.abs((ew * (Math.cos(t) + (eh * ((Math.sin(t) * Math.sin(t_1)) / ew)))));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.atan((eh * (math.tan(t) / -ew))) tmp = 0 if (eh <= -5.2e+36) or not (eh <= 1.3e+149): tmp = math.fabs((eh * (math.sin(t) + (((ew * math.cos(t)) * math.cos(t_1)) / eh)))) else: tmp = math.fabs((ew * (math.cos(t) + (eh * ((math.sin(t) * math.sin(t_1)) / ew))))) return tmp
function code(eh, ew, t) t_1 = atan(Float64(eh * Float64(tan(t) / Float64(-ew)))) tmp = 0.0 if ((eh <= -5.2e+36) || !(eh <= 1.3e+149)) tmp = abs(Float64(eh * Float64(sin(t) + Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) / eh)))); else tmp = abs(Float64(ew * Float64(cos(t) + Float64(eh * Float64(Float64(sin(t) * sin(t_1)) / ew))))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = atan((eh * (tan(t) / -ew))); tmp = 0.0; if ((eh <= -5.2e+36) || ~((eh <= 1.3e+149))) tmp = abs((eh * (sin(t) + (((ew * cos(t)) * cos(t_1)) / eh)))); else tmp = abs((ew * (cos(t) + (eh * ((sin(t) * sin(t_1)) / ew))))); 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]}, If[Or[LessEqual[eh, -5.2e+36], N[Not[LessEqual[eh, 1.3e+149]], $MachinePrecision]], N[Abs[N[(eh * N[(N[Sin[t], $MachinePrecision] + N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] / eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] + N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\mathbf{if}\;eh \leq -5.2 \cdot 10^{+36} \lor \neg \left(eh \leq 1.3 \cdot 10^{+149}\right):\\
\;\;\;\;\left|eh \cdot \left(\sin t + \frac{\left(ew \cdot \cos t\right) \cdot \cos t\_1}{eh}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \left(\cos t + eh \cdot \frac{\sin t \cdot \sin t\_1}{ew}\right)\right|\\
\end{array}
\end{array}
if eh < -5.2000000000000003e36 or 1.29999999999999989e149 < 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%
associate-*r*99.7%
sin-atan50.3%
associate-*r/45.3%
add-sqr-sqrt30.2%
sqrt-unprod18.5%
sqr-neg18.5%
sqrt-unprod15.1%
add-sqr-sqrt45.3%
clear-num45.2%
un-div-inv45.2%
hypot-1-def54.1%
add-sqr-sqrt35.1%
Applied egg-rr54.2%
Taylor expanded in eh around -inf 99.3%
associate-*r*99.3%
neg-mul-199.3%
mul-1-neg99.3%
associate-*r*99.3%
mul-1-neg99.3%
distribute-frac-neg299.3%
associate-*r/99.3%
Simplified99.3%
if -5.2000000000000003e36 < eh < 1.29999999999999989e149Initial 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%
*-commutative99.8%
add-sqr-sqrt19.9%
sqrt-unprod99.5%
sqr-neg99.5%
sqrt-unprod79.4%
add-sqr-sqrt99.4%
log1p-expm1-u99.4%
cos-atan99.4%
un-div-inv99.4%
hypot-1-def99.4%
add-sqr-sqrt50.1%
Applied egg-rr99.4%
Taylor expanded in ew around inf 99.2%
associate-/l*99.1%
mul-1-neg99.1%
distribute-frac-neg299.1%
associate-*r/99.1%
Simplified99.1%
Final simplification99.2%
(FPCore (eh ew t)
:precision binary64
(if (or (<= eh -8.8e+192) (not (<= eh 4.8e+182)))
(fabs (* eh (sin t)))
(fabs
(*
ew
(+
(cos t)
(* eh (/ (* (sin t) (sin (atan (* eh (/ (tan t) (- ew)))))) ew)))))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -8.8e+192) || !(eh <= 4.8e+182)) {
tmp = fabs((eh * sin(t)));
} else {
tmp = fabs((ew * (cos(t) + (eh * ((sin(t) * sin(atan((eh * (tan(t) / -ew))))) / 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 <= (-8.8d+192)) .or. (.not. (eh <= 4.8d+182))) then
tmp = abs((eh * sin(t)))
else
tmp = abs((ew * (cos(t) + (eh * ((sin(t) * sin(atan((eh * (tan(t) / -ew))))) / ew)))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -8.8e+192) || !(eh <= 4.8e+182)) {
tmp = Math.abs((eh * Math.sin(t)));
} else {
tmp = Math.abs((ew * (Math.cos(t) + (eh * ((Math.sin(t) * Math.sin(Math.atan((eh * (Math.tan(t) / -ew))))) / ew)))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -8.8e+192) or not (eh <= 4.8e+182): tmp = math.fabs((eh * math.sin(t))) else: tmp = math.fabs((ew * (math.cos(t) + (eh * ((math.sin(t) * math.sin(math.atan((eh * (math.tan(t) / -ew))))) / ew))))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -8.8e+192) || !(eh <= 4.8e+182)) tmp = abs(Float64(eh * sin(t))); else tmp = abs(Float64(ew * Float64(cos(t) + Float64(eh * Float64(Float64(sin(t) * sin(atan(Float64(eh * Float64(tan(t) / Float64(-ew)))))) / ew))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -8.8e+192) || ~((eh <= 4.8e+182))) tmp = abs((eh * sin(t))); else tmp = abs((ew * (cos(t) + (eh * ((sin(t) * sin(atan((eh * (tan(t) / -ew))))) / ew))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -8.8e+192], N[Not[LessEqual[eh, 4.8e+182]], $MachinePrecision]], N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[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]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -8.8 \cdot 10^{+192} \lor \neg \left(eh \leq 4.8 \cdot 10^{+182}\right):\\
\;\;\;\;\left|eh \cdot \sin t\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \left(\cos t + eh \cdot \frac{\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)}{ew}\right)\right|\\
\end{array}
\end{array}
if eh < -8.8000000000000003e192 or 4.80000000000000019e182 < 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%
associate-*r*99.7%
sin-atan37.5%
associate-*r/29.6%
add-sqr-sqrt13.9%
sqrt-unprod1.3%
sqr-neg1.3%
sqrt-unprod15.7%
add-sqr-sqrt29.6%
clear-num29.5%
un-div-inv29.5%
hypot-1-def38.3%
add-sqr-sqrt16.3%
Applied egg-rr38.4%
Taylor expanded in t around 0 37.1%
Taylor expanded in eh around -inf 85.3%
if -8.8000000000000003e192 < eh < 4.80000000000000019e182Initial 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%
*-commutative99.8%
add-sqr-sqrt21.9%
sqrt-unprod99.6%
sqr-neg99.6%
sqrt-unprod77.5%
add-sqr-sqrt99.5%
log1p-expm1-u99.5%
cos-atan99.5%
un-div-inv99.5%
hypot-1-def99.5%
add-sqr-sqrt54.2%
Applied egg-rr99.5%
Taylor expanded in ew around inf 98.2%
associate-/l*98.1%
mul-1-neg98.1%
distribute-frac-neg298.1%
associate-*r/98.1%
Simplified98.1%
Final simplification95.5%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (cos t)))
(t_2 (fabs (* t_1 (cos (atan (* eh (/ (tan t) (- ew)))))))))
(if (<= ew -2e-79)
t_2
(if (<= ew 7.4e-283)
(fabs (* eh (expm1 (log1p (sin t)))))
(if (<= ew 4.2e+138)
(+ t_1 (* (* eh (sin t)) (sin (atan (* (tan t) (/ eh ew))))))
t_2)))))
double code(double eh, double ew, double t) {
double t_1 = ew * cos(t);
double t_2 = fabs((t_1 * cos(atan((eh * (tan(t) / -ew))))));
double tmp;
if (ew <= -2e-79) {
tmp = t_2;
} else if (ew <= 7.4e-283) {
tmp = fabs((eh * expm1(log1p(sin(t)))));
} else if (ew <= 4.2e+138) {
tmp = t_1 + ((eh * sin(t)) * sin(atan((tan(t) * (eh / ew)))));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = ew * Math.cos(t);
double t_2 = Math.abs((t_1 * Math.cos(Math.atan((eh * (Math.tan(t) / -ew))))));
double tmp;
if (ew <= -2e-79) {
tmp = t_2;
} else if (ew <= 7.4e-283) {
tmp = Math.abs((eh * Math.expm1(Math.log1p(Math.sin(t)))));
} else if (ew <= 4.2e+138) {
tmp = t_1 + ((eh * Math.sin(t)) * Math.sin(Math.atan((Math.tan(t) * (eh / ew)))));
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = ew * math.cos(t) t_2 = math.fabs((t_1 * math.cos(math.atan((eh * (math.tan(t) / -ew)))))) tmp = 0 if ew <= -2e-79: tmp = t_2 elif ew <= 7.4e-283: tmp = math.fabs((eh * math.expm1(math.log1p(math.sin(t))))) elif ew <= 4.2e+138: tmp = t_1 + ((eh * math.sin(t)) * math.sin(math.atan((math.tan(t) * (eh / ew))))) else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = Float64(ew * cos(t)) t_2 = abs(Float64(t_1 * cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))))) tmp = 0.0 if (ew <= -2e-79) tmp = t_2; elseif (ew <= 7.4e-283) tmp = abs(Float64(eh * expm1(log1p(sin(t))))); elseif (ew <= 4.2e+138) tmp = Float64(t_1 + Float64(Float64(eh * sin(t)) * sin(atan(Float64(tan(t) * Float64(eh / ew)))))); else tmp = t_2; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(t$95$1 * N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -2e-79], t$95$2, If[LessEqual[ew, 7.4e-283], N[Abs[N[(eh * N[(Exp[N[Log[1 + N[Sin[t], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 4.2e+138], N[(t$95$1 + N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \cos t\\
t_2 := \left|t\_1 \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right|\\
\mathbf{if}\;ew \leq -2 \cdot 10^{-79}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;ew \leq 7.4 \cdot 10^{-283}:\\
\;\;\;\;\left|eh \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)\right|\\
\mathbf{elif}\;ew \leq 4.2 \cdot 10^{+138}:\\
\;\;\;\;t\_1 + \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if ew < -2e-79 or 4.20000000000000014e138 < 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 86.6%
associate-*r*86.6%
*-commutative86.6%
mul-1-neg86.6%
distribute-frac-neg286.6%
associate-/l*86.6%
Simplified86.6%
if -2e-79 < ew < 7.4000000000000001e-283Initial 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%
associate-*r*99.7%
sin-atan60.9%
associate-*r/60.8%
add-sqr-sqrt20.6%
sqrt-unprod58.4%
sqr-neg58.4%
sqrt-unprod39.6%
add-sqr-sqrt60.5%
clear-num60.4%
un-div-inv60.2%
hypot-1-def83.1%
add-sqr-sqrt37.5%
Applied egg-rr83.5%
Taylor expanded in t around 0 75.8%
Taylor expanded in eh around -inf 77.0%
expm1-log1p-u77.0%
expm1-undefine45.3%
Applied egg-rr45.3%
expm1-define77.0%
Simplified77.0%
if 7.4000000000000001e-283 < ew < 4.20000000000000014e138Initial 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-rr79.1%
associate-*r/79.1%
*-commutative79.1%
associate-/l*79.1%
associate-/r/79.1%
*-commutative79.1%
fma-undefine79.1%
Simplified79.1%
Taylor expanded in ew around inf 78.8%
Final simplification81.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (cos t))) (t_2 (atan (* eh (/ (tan t) (- ew))))))
(if (<= t -4.9e+235)
(fabs (* eh (expm1 (log1p (sin t)))))
(if (<= t -0.0015)
(fabs (* t_1 (cos t_2)))
(if (<= t 0.0136)
(fabs (+ ew (* eh (* t (sin t_2)))))
(+ t_1 (* eh (sin t))))))))
double code(double eh, double ew, double t) {
double t_1 = ew * cos(t);
double t_2 = atan((eh * (tan(t) / -ew)));
double tmp;
if (t <= -4.9e+235) {
tmp = fabs((eh * expm1(log1p(sin(t)))));
} else if (t <= -0.0015) {
tmp = fabs((t_1 * cos(t_2)));
} else if (t <= 0.0136) {
tmp = fabs((ew + (eh * (t * sin(t_2)))));
} else {
tmp = t_1 + (eh * sin(t));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = ew * Math.cos(t);
double t_2 = Math.atan((eh * (Math.tan(t) / -ew)));
double tmp;
if (t <= -4.9e+235) {
tmp = Math.abs((eh * Math.expm1(Math.log1p(Math.sin(t)))));
} else if (t <= -0.0015) {
tmp = Math.abs((t_1 * Math.cos(t_2)));
} else if (t <= 0.0136) {
tmp = Math.abs((ew + (eh * (t * Math.sin(t_2)))));
} else {
tmp = t_1 + (eh * Math.sin(t));
}
return tmp;
}
def code(eh, ew, t): t_1 = ew * math.cos(t) t_2 = math.atan((eh * (math.tan(t) / -ew))) tmp = 0 if t <= -4.9e+235: tmp = math.fabs((eh * math.expm1(math.log1p(math.sin(t))))) elif t <= -0.0015: tmp = math.fabs((t_1 * math.cos(t_2))) elif t <= 0.0136: tmp = math.fabs((ew + (eh * (t * math.sin(t_2))))) else: tmp = t_1 + (eh * math.sin(t)) return tmp
function code(eh, ew, t) t_1 = Float64(ew * cos(t)) t_2 = atan(Float64(eh * Float64(tan(t) / Float64(-ew)))) tmp = 0.0 if (t <= -4.9e+235) tmp = abs(Float64(eh * expm1(log1p(sin(t))))); elseif (t <= -0.0015) tmp = abs(Float64(t_1 * cos(t_2))); elseif (t <= 0.0136) tmp = abs(Float64(ew + Float64(eh * Float64(t * sin(t_2))))); else tmp = Float64(t_1 + Float64(eh * sin(t))); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.9e+235], N[Abs[N[(eh * N[(Exp[N[Log[1 + N[Sin[t], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, -0.0015], N[Abs[N[(t$95$1 * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 0.0136], N[Abs[N[(ew + N[(eh * N[(t * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$1 + N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \cos t\\
t_2 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\mathbf{if}\;t \leq -4.9 \cdot 10^{+235}:\\
\;\;\;\;\left|eh \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin t\right)\right)\right|\\
\mathbf{elif}\;t \leq -0.0015:\\
\;\;\;\;\left|t\_1 \cdot \cos t\_2\right|\\
\mathbf{elif}\;t \leq 0.0136:\\
\;\;\;\;\left|ew + eh \cdot \left(t \cdot \sin t\_2\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1 + eh \cdot \sin t\\
\end{array}
\end{array}
if t < -4.8999999999999998e235Initial program 99.5%
sub-neg99.5%
associate-*l*99.5%
distribute-rgt-neg-in99.5%
cancel-sign-sub99.5%
associate-/l*99.5%
Simplified99.5%
associate-*r*99.5%
sin-atan50.3%
associate-*r/49.7%
add-sqr-sqrt25.0%
sqrt-unprod49.7%
sqr-neg49.7%
sqrt-unprod24.7%
add-sqr-sqrt49.7%
clear-num49.6%
un-div-inv49.4%
hypot-1-def50.4%
add-sqr-sqrt25.9%
Applied egg-rr50.8%
Taylor expanded in t around 0 37.3%
Taylor expanded in eh around -inf 83.5%
expm1-log1p-u83.6%
expm1-undefine83.7%
Applied egg-rr83.7%
expm1-define83.6%
Simplified83.6%
if -4.8999999999999998e235 < t < -0.0015Initial 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 69.4%
associate-*r*69.4%
*-commutative69.4%
mul-1-neg69.4%
distribute-frac-neg269.4%
associate-/l*69.4%
Simplified69.4%
if -0.0015 < t < 0.0135999999999999992Initial 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%
*-commutative100.0%
add-sqr-sqrt0.0%
sqrt-unprod100.0%
sqr-neg100.0%
sqrt-unprod100.0%
add-sqr-sqrt100.0%
log1p-expm1-u100.0%
cos-atan100.0%
un-div-inv100.0%
hypot-1-def100.0%
add-sqr-sqrt52.8%
Applied egg-rr100.0%
Taylor expanded in t around 0 98.4%
mul-1-neg98.4%
distribute-frac-neg298.4%
associate-*r/98.4%
Simplified98.4%
if 0.0135999999999999992 < t Initial program 99.4%
sub-neg99.4%
associate-*l*99.4%
distribute-rgt-neg-in99.4%
cancel-sign-sub99.4%
associate-/l*99.4%
Simplified99.4%
Applied egg-rr55.6%
associate-*r/55.7%
*-commutative55.7%
associate-/l*55.7%
associate-/r/55.7%
*-commutative55.7%
fma-undefine55.7%
Simplified55.7%
Taylor expanded in ew around inf 55.3%
sin-atan38.3%
metadata-eval38.3%
hypot-undefine48.6%
Applied egg-rr48.6%
associate-/l*48.5%
associate-*r/48.4%
*-commutative48.4%
associate-/l*48.3%
Simplified48.3%
Taylor expanded in eh around inf 59.9%
mul-1-neg59.9%
*-commutative59.9%
distribute-rgt-neg-in59.9%
Simplified59.9%
Final simplification81.2%
(FPCore (eh ew t) :precision binary64 (if (or (<= t -0.00145) (not (<= t 0.0135))) (+ (* ew (cos t)) (* eh (sin t))) (fabs (+ ew (* eh (* t (sin (atan (* eh (/ (tan t) (- ew)))))))))))
double code(double eh, double ew, double t) {
double tmp;
if ((t <= -0.00145) || !(t <= 0.0135)) {
tmp = (ew * cos(t)) + (eh * sin(t));
} else {
tmp = fabs((ew + (eh * (t * sin(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 ((t <= (-0.00145d0)) .or. (.not. (t <= 0.0135d0))) then
tmp = (ew * cos(t)) + (eh * sin(t))
else
tmp = abs((ew + (eh * (t * sin(atan((eh * (tan(t) / -ew))))))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((t <= -0.00145) || !(t <= 0.0135)) {
tmp = (ew * Math.cos(t)) + (eh * Math.sin(t));
} else {
tmp = Math.abs((ew + (eh * (t * Math.sin(Math.atan((eh * (Math.tan(t) / -ew))))))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (t <= -0.00145) or not (t <= 0.0135): tmp = (ew * math.cos(t)) + (eh * math.sin(t)) else: tmp = math.fabs((ew + (eh * (t * math.sin(math.atan((eh * (math.tan(t) / -ew)))))))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((t <= -0.00145) || !(t <= 0.0135)) tmp = Float64(Float64(ew * cos(t)) + Float64(eh * sin(t))); else tmp = abs(Float64(ew + Float64(eh * Float64(t * sin(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((t <= -0.00145) || ~((t <= 0.0135))) tmp = (ew * cos(t)) + (eh * sin(t)); else tmp = abs((ew + (eh * (t * sin(atan((eh * (tan(t) / -ew)))))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -0.00145], N[Not[LessEqual[t, 0.0135]], $MachinePrecision]], N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] + N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(ew + N[(eh * N[(t * N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.00145 \lor \neg \left(t \leq 0.0135\right):\\
\;\;\;\;ew \cdot \cos t + eh \cdot \sin t\\
\mathbf{else}:\\
\;\;\;\;\left|ew + eh \cdot \left(t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right)\right|\\
\end{array}
\end{array}
if t < -0.00145 or 0.0134999999999999998 < t Initial program 99.5%
sub-neg99.5%
associate-*l*99.5%
distribute-rgt-neg-in99.5%
cancel-sign-sub99.5%
associate-/l*99.5%
Simplified99.5%
Applied egg-rr55.9%
associate-*r/55.9%
*-commutative55.9%
associate-/l*55.9%
associate-/r/55.9%
*-commutative55.9%
fma-undefine55.9%
Simplified55.9%
Taylor expanded in ew around inf 55.3%
sin-atan41.5%
metadata-eval41.5%
hypot-undefine50.1%
Applied egg-rr50.1%
associate-/l*50.0%
associate-*r/50.0%
*-commutative50.0%
associate-/l*49.9%
Simplified49.9%
Taylor expanded in eh around inf 58.1%
mul-1-neg58.1%
*-commutative58.1%
distribute-rgt-neg-in58.1%
Simplified58.1%
if -0.00145 < t < 0.0134999999999999998Initial 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%
*-commutative100.0%
add-sqr-sqrt0.0%
sqrt-unprod100.0%
sqr-neg100.0%
sqrt-unprod100.0%
add-sqr-sqrt100.0%
log1p-expm1-u100.0%
cos-atan100.0%
un-div-inv100.0%
hypot-1-def100.0%
add-sqr-sqrt52.8%
Applied egg-rr100.0%
Taylor expanded in t around 0 98.4%
mul-1-neg98.4%
distribute-frac-neg298.4%
associate-*r/98.4%
Simplified98.4%
Final simplification77.5%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t))))
(if (<= ew -6.5e-73)
(fabs (* ew (cos (atan (* eh (/ (tan t) (- ew)))))))
(if (<= ew 6e-113) (fabs t_1) (+ (* ew (cos t)) t_1)))))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double tmp;
if (ew <= -6.5e-73) {
tmp = fabs((ew * cos(atan((eh * (tan(t) / -ew))))));
} else if (ew <= 6e-113) {
tmp = fabs(t_1);
} else {
tmp = (ew * cos(t)) + 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 = eh * sin(t)
if (ew <= (-6.5d-73)) then
tmp = abs((ew * cos(atan((eh * (tan(t) / -ew))))))
else if (ew <= 6d-113) then
tmp = abs(t_1)
else
tmp = (ew * cos(t)) + t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.sin(t);
double tmp;
if (ew <= -6.5e-73) {
tmp = Math.abs((ew * Math.cos(Math.atan((eh * (Math.tan(t) / -ew))))));
} else if (ew <= 6e-113) {
tmp = Math.abs(t_1);
} else {
tmp = (ew * Math.cos(t)) + t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.sin(t) tmp = 0 if ew <= -6.5e-73: tmp = math.fabs((ew * math.cos(math.atan((eh * (math.tan(t) / -ew)))))) elif ew <= 6e-113: tmp = math.fabs(t_1) else: tmp = (ew * math.cos(t)) + t_1 return tmp
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) tmp = 0.0 if (ew <= -6.5e-73) tmp = abs(Float64(ew * cos(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))))); elseif (ew <= 6e-113) tmp = abs(t_1); else tmp = Float64(Float64(ew * cos(t)) + t_1); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * sin(t); tmp = 0.0; if (ew <= -6.5e-73) tmp = abs((ew * cos(atan((eh * (tan(t) / -ew)))))); elseif (ew <= 6e-113) tmp = abs(t_1); else tmp = (ew * cos(t)) + t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -6.5e-73], N[Abs[N[(ew * N[Cos[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 6e-113], N[Abs[t$95$1], $MachinePrecision], N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -6.5 \cdot 10^{-73}:\\
\;\;\;\;\left|ew \cdot \cos \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\right|\\
\mathbf{elif}\;ew \leq 6 \cdot 10^{-113}:\\
\;\;\;\;\left|t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t + t\_1\\
\end{array}
\end{array}
if ew < -6.4999999999999999e-73Initial 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 t around 0 58.1%
mul-1-neg58.1%
distribute-frac-neg258.1%
associate-/l*58.1%
Simplified58.1%
if -6.4999999999999999e-73 < ew < 6.0000000000000002e-113Initial 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%
associate-*r*99.8%
sin-atan56.6%
associate-*r/56.4%
add-sqr-sqrt24.0%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-unprod32.0%
add-sqr-sqrt56.2%
clear-num56.1%
un-div-inv56.0%
hypot-1-def76.8%
add-sqr-sqrt34.7%
Applied egg-rr77.1%
Taylor expanded in t around 0 69.4%
Taylor expanded in eh around -inf 74.6%
if 6.0000000000000002e-113 < ew 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-rr77.0%
associate-*r/77.0%
*-commutative77.0%
associate-/l*77.0%
associate-/r/77.0%
*-commutative77.0%
fma-undefine77.0%
Simplified77.0%
Taylor expanded in ew around inf 76.1%
sin-atan67.5%
metadata-eval67.5%
hypot-undefine72.8%
Applied egg-rr72.8%
associate-/l*72.7%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in eh around inf 75.0%
mul-1-neg75.0%
*-commutative75.0%
distribute-rgt-neg-in75.0%
Simplified75.0%
Final simplification70.3%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t))))
(if (<= ew -4.6e-73)
(fabs (* ew (/ 1.0 (hypot 1.0 (* eh (/ (tan t) (- ew)))))))
(if (<= ew 6.8e-113) (fabs t_1) (+ (* ew (cos t)) t_1)))))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double tmp;
if (ew <= -4.6e-73) {
tmp = fabs((ew * (1.0 / hypot(1.0, (eh * (tan(t) / -ew))))));
} else if (ew <= 6.8e-113) {
tmp = fabs(t_1);
} else {
tmp = (ew * cos(t)) + t_1;
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.sin(t);
double tmp;
if (ew <= -4.6e-73) {
tmp = Math.abs((ew * (1.0 / Math.hypot(1.0, (eh * (Math.tan(t) / -ew))))));
} else if (ew <= 6.8e-113) {
tmp = Math.abs(t_1);
} else {
tmp = (ew * Math.cos(t)) + t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.sin(t) tmp = 0 if ew <= -4.6e-73: tmp = math.fabs((ew * (1.0 / math.hypot(1.0, (eh * (math.tan(t) / -ew)))))) elif ew <= 6.8e-113: tmp = math.fabs(t_1) else: tmp = (ew * math.cos(t)) + t_1 return tmp
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) tmp = 0.0 if (ew <= -4.6e-73) tmp = abs(Float64(ew * Float64(1.0 / hypot(1.0, Float64(eh * Float64(tan(t) / Float64(-ew))))))); elseif (ew <= 6.8e-113) tmp = abs(t_1); else tmp = Float64(Float64(ew * cos(t)) + t_1); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * sin(t); tmp = 0.0; if (ew <= -4.6e-73) tmp = abs((ew * (1.0 / hypot(1.0, (eh * (tan(t) / -ew)))))); elseif (ew <= 6.8e-113) tmp = abs(t_1); else tmp = (ew * cos(t)) + t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -4.6e-73], 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], If[LessEqual[ew, 6.8e-113], N[Abs[t$95$1], $MachinePrecision], N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -4.6 \cdot 10^{-73}:\\
\;\;\;\;\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{-ew}\right)}\right|\\
\mathbf{elif}\;ew \leq 6.8 \cdot 10^{-113}:\\
\;\;\;\;\left|t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t + t\_1\\
\end{array}
\end{array}
if ew < -4.59999999999999977e-73Initial 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 t around 0 58.1%
mul-1-neg58.1%
distribute-frac-neg258.1%
associate-/l*58.1%
Simplified58.1%
cos-atan57.9%
hypot-1-def58.0%
Applied egg-rr58.0%
if -4.59999999999999977e-73 < ew < 6.8000000000000005e-113Initial 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%
associate-*r*99.8%
sin-atan56.6%
associate-*r/56.4%
add-sqr-sqrt24.0%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-unprod32.0%
add-sqr-sqrt56.2%
clear-num56.1%
un-div-inv56.0%
hypot-1-def76.8%
add-sqr-sqrt34.7%
Applied egg-rr77.1%
Taylor expanded in t around 0 69.4%
Taylor expanded in eh around -inf 74.6%
if 6.8000000000000005e-113 < ew 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-rr77.0%
associate-*r/77.0%
*-commutative77.0%
associate-/l*77.0%
associate-/r/77.0%
*-commutative77.0%
fma-undefine77.0%
Simplified77.0%
Taylor expanded in ew around inf 76.1%
sin-atan67.5%
metadata-eval67.5%
hypot-undefine72.8%
Applied egg-rr72.8%
associate-/l*72.7%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in eh around inf 75.0%
mul-1-neg75.0%
*-commutative75.0%
distribute-rgt-neg-in75.0%
Simplified75.0%
Final simplification70.3%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t))))
(if (<= ew -4.6e-73)
(fabs (* ew (cos (atan (/ (* eh (- t)) ew)))))
(if (<= ew 6e-113) (fabs t_1) (+ (* ew (cos t)) t_1)))))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double tmp;
if (ew <= -4.6e-73) {
tmp = fabs((ew * cos(atan(((eh * -t) / ew)))));
} else if (ew <= 6e-113) {
tmp = fabs(t_1);
} else {
tmp = (ew * cos(t)) + 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 = eh * sin(t)
if (ew <= (-4.6d-73)) then
tmp = abs((ew * cos(atan(((eh * -t) / ew)))))
else if (ew <= 6d-113) then
tmp = abs(t_1)
else
tmp = (ew * cos(t)) + t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.sin(t);
double tmp;
if (ew <= -4.6e-73) {
tmp = Math.abs((ew * Math.cos(Math.atan(((eh * -t) / ew)))));
} else if (ew <= 6e-113) {
tmp = Math.abs(t_1);
} else {
tmp = (ew * Math.cos(t)) + t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.sin(t) tmp = 0 if ew <= -4.6e-73: tmp = math.fabs((ew * math.cos(math.atan(((eh * -t) / ew))))) elif ew <= 6e-113: tmp = math.fabs(t_1) else: tmp = (ew * math.cos(t)) + t_1 return tmp
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) tmp = 0.0 if (ew <= -4.6e-73) tmp = abs(Float64(ew * cos(atan(Float64(Float64(eh * Float64(-t)) / ew))))); elseif (ew <= 6e-113) tmp = abs(t_1); else tmp = Float64(Float64(ew * cos(t)) + t_1); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * sin(t); tmp = 0.0; if (ew <= -4.6e-73) tmp = abs((ew * cos(atan(((eh * -t) / ew))))); elseif (ew <= 6e-113) tmp = abs(t_1); else tmp = (ew * cos(t)) + t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -4.6e-73], N[Abs[N[(ew * N[Cos[N[ArcTan[N[(N[(eh * (-t)), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 6e-113], N[Abs[t$95$1], $MachinePrecision], N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -4.6 \cdot 10^{-73}:\\
\;\;\;\;\left|ew \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right)\right|\\
\mathbf{elif}\;ew \leq 6 \cdot 10^{-113}:\\
\;\;\;\;\left|t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t + t\_1\\
\end{array}
\end{array}
if ew < -4.59999999999999977e-73Initial 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 t around 0 58.1%
mul-1-neg58.1%
distribute-frac-neg258.1%
associate-/l*58.1%
Simplified58.1%
Taylor expanded in t around 0 57.1%
associate-*r/57.1%
associate-*r*57.1%
neg-mul-157.1%
Simplified57.1%
if -4.59999999999999977e-73 < ew < 6.0000000000000002e-113Initial 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%
associate-*r*99.8%
sin-atan56.6%
associate-*r/56.4%
add-sqr-sqrt24.0%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-unprod32.0%
add-sqr-sqrt56.2%
clear-num56.1%
un-div-inv56.0%
hypot-1-def76.8%
add-sqr-sqrt34.7%
Applied egg-rr77.1%
Taylor expanded in t around 0 69.4%
Taylor expanded in eh around -inf 74.6%
if 6.0000000000000002e-113 < ew 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-rr77.0%
associate-*r/77.0%
*-commutative77.0%
associate-/l*77.0%
associate-/r/77.0%
*-commutative77.0%
fma-undefine77.0%
Simplified77.0%
Taylor expanded in ew around inf 76.1%
sin-atan67.5%
metadata-eval67.5%
hypot-undefine72.8%
Applied egg-rr72.8%
associate-/l*72.7%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in eh around inf 75.0%
mul-1-neg75.0%
*-commutative75.0%
distribute-rgt-neg-in75.0%
Simplified75.0%
Final simplification70.1%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t))))
(if (or (<= ew -2.2e+148) (not (<= ew 4.4e-90)))
(- (* ew (cos t)) t_1)
(fabs t_1))))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double tmp;
if ((ew <= -2.2e+148) || !(ew <= 4.4e-90)) {
tmp = (ew * cos(t)) - t_1;
} else {
tmp = fabs(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 = eh * sin(t)
if ((ew <= (-2.2d+148)) .or. (.not. (ew <= 4.4d-90))) then
tmp = (ew * cos(t)) - t_1
else
tmp = abs(t_1)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.sin(t);
double tmp;
if ((ew <= -2.2e+148) || !(ew <= 4.4e-90)) {
tmp = (ew * Math.cos(t)) - t_1;
} else {
tmp = Math.abs(t_1);
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.sin(t) tmp = 0 if (ew <= -2.2e+148) or not (ew <= 4.4e-90): tmp = (ew * math.cos(t)) - t_1 else: tmp = math.fabs(t_1) return tmp
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) tmp = 0.0 if ((ew <= -2.2e+148) || !(ew <= 4.4e-90)) tmp = Float64(Float64(ew * cos(t)) - t_1); else tmp = abs(t_1); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * sin(t); tmp = 0.0; if ((ew <= -2.2e+148) || ~((ew <= 4.4e-90))) tmp = (ew * cos(t)) - t_1; else tmp = abs(t_1); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[ew, -2.2e+148], N[Not[LessEqual[ew, 4.4e-90]], $MachinePrecision]], N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[Abs[t$95$1], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -2.2 \cdot 10^{+148} \lor \neg \left(ew \leq 4.4 \cdot 10^{-90}\right):\\
\;\;\;\;ew \cdot \cos t - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left|t\_1\right|\\
\end{array}
\end{array}
if ew < -2.1999999999999999e148 or 4.39999999999999972e-90 < 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%
Applied egg-rr62.8%
associate-*r/62.8%
*-commutative62.8%
associate-/l*62.8%
associate-/r/62.8%
*-commutative62.8%
fma-undefine62.8%
Simplified62.8%
Taylor expanded in ew around inf 62.1%
sin-atan57.2%
metadata-eval57.2%
hypot-undefine61.3%
Applied egg-rr61.3%
associate-/l*61.2%
associate-*r/61.2%
*-commutative61.2%
associate-/l*61.2%
Simplified61.2%
Taylor expanded in eh around -inf 55.8%
if -2.1999999999999999e148 < ew < 4.39999999999999972e-90Initial 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%
associate-*r*99.7%
sin-atan63.8%
associate-*r/62.8%
add-sqr-sqrt32.8%
sqrt-unprod59.1%
sqr-neg59.1%
sqrt-unprod29.7%
add-sqr-sqrt62.7%
clear-num62.6%
un-div-inv62.5%
hypot-1-def77.4%
add-sqr-sqrt40.5%
Applied egg-rr77.6%
Taylor expanded in t around 0 66.7%
Taylor expanded in eh around -inf 64.8%
Final simplification60.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t))))
(if (<= ew -9.8e-74)
(fabs (* ew (/ 1.0 (hypot 1.0 (* eh (/ t (- ew)))))))
(if (<= ew 7e-113) (fabs t_1) (+ (* ew (cos t)) t_1)))))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double tmp;
if (ew <= -9.8e-74) {
tmp = fabs((ew * (1.0 / hypot(1.0, (eh * (t / -ew))))));
} else if (ew <= 7e-113) {
tmp = fabs(t_1);
} else {
tmp = (ew * cos(t)) + t_1;
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.sin(t);
double tmp;
if (ew <= -9.8e-74) {
tmp = Math.abs((ew * (1.0 / Math.hypot(1.0, (eh * (t / -ew))))));
} else if (ew <= 7e-113) {
tmp = Math.abs(t_1);
} else {
tmp = (ew * Math.cos(t)) + t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.sin(t) tmp = 0 if ew <= -9.8e-74: tmp = math.fabs((ew * (1.0 / math.hypot(1.0, (eh * (t / -ew)))))) elif ew <= 7e-113: tmp = math.fabs(t_1) else: tmp = (ew * math.cos(t)) + t_1 return tmp
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) tmp = 0.0 if (ew <= -9.8e-74) tmp = abs(Float64(ew * Float64(1.0 / hypot(1.0, Float64(eh * Float64(t / Float64(-ew))))))); elseif (ew <= 7e-113) tmp = abs(t_1); else tmp = Float64(Float64(ew * cos(t)) + t_1); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * sin(t); tmp = 0.0; if (ew <= -9.8e-74) tmp = abs((ew * (1.0 / hypot(1.0, (eh * (t / -ew)))))); elseif (ew <= 7e-113) tmp = abs(t_1); else tmp = (ew * cos(t)) + t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -9.8e-74], N[Abs[N[(ew * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(eh * N[(t / (-ew)), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 7e-113], N[Abs[t$95$1], $MachinePrecision], N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -9.8 \cdot 10^{-74}:\\
\;\;\;\;\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{-ew}\right)}\right|\\
\mathbf{elif}\;ew \leq 7 \cdot 10^{-113}:\\
\;\;\;\;\left|t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \cos t + t\_1\\
\end{array}
\end{array}
if ew < -9.8000000000000006e-74Initial 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 t around 0 58.1%
mul-1-neg58.1%
distribute-frac-neg258.1%
associate-/l*58.1%
Simplified58.1%
Taylor expanded in t around 0 57.1%
associate-*r/57.1%
associate-*r*57.1%
neg-mul-157.1%
Simplified57.1%
cos-atan56.3%
hypot-1-def56.4%
associate-/l*56.4%
Applied egg-rr56.4%
if -9.8000000000000006e-74 < ew < 7.00000000000000057e-113Initial 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%
associate-*r*99.8%
sin-atan56.6%
associate-*r/56.4%
add-sqr-sqrt24.0%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-unprod32.0%
add-sqr-sqrt56.2%
clear-num56.1%
un-div-inv56.0%
hypot-1-def76.8%
add-sqr-sqrt34.7%
Applied egg-rr77.1%
Taylor expanded in t around 0 69.4%
Taylor expanded in eh around -inf 74.6%
if 7.00000000000000057e-113 < ew 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-rr77.0%
associate-*r/77.0%
*-commutative77.0%
associate-/l*77.0%
associate-/r/77.0%
*-commutative77.0%
fma-undefine77.0%
Simplified77.0%
Taylor expanded in ew around inf 76.1%
sin-atan67.5%
metadata-eval67.5%
hypot-undefine72.8%
Applied egg-rr72.8%
associate-/l*72.7%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in eh around inf 75.0%
mul-1-neg75.0%
*-commutative75.0%
distribute-rgt-neg-in75.0%
Simplified75.0%
Final simplification69.9%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (cos t))) (t_2 (* eh (sin t))))
(if (<= ew -2.5e+144)
(- t_1 t_2)
(if (<= ew 6e-113) (fabs t_2) (+ t_1 t_2)))))
double code(double eh, double ew, double t) {
double t_1 = ew * cos(t);
double t_2 = eh * sin(t);
double tmp;
if (ew <= -2.5e+144) {
tmp = t_1 - t_2;
} else if (ew <= 6e-113) {
tmp = fabs(t_2);
} else {
tmp = t_1 + 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 = ew * cos(t)
t_2 = eh * sin(t)
if (ew <= (-2.5d+144)) then
tmp = t_1 - t_2
else if (ew <= 6d-113) then
tmp = abs(t_2)
else
tmp = t_1 + t_2
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = ew * Math.cos(t);
double t_2 = eh * Math.sin(t);
double tmp;
if (ew <= -2.5e+144) {
tmp = t_1 - t_2;
} else if (ew <= 6e-113) {
tmp = Math.abs(t_2);
} else {
tmp = t_1 + t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = ew * math.cos(t) t_2 = eh * math.sin(t) tmp = 0 if ew <= -2.5e+144: tmp = t_1 - t_2 elif ew <= 6e-113: tmp = math.fabs(t_2) else: tmp = t_1 + t_2 return tmp
function code(eh, ew, t) t_1 = Float64(ew * cos(t)) t_2 = Float64(eh * sin(t)) tmp = 0.0 if (ew <= -2.5e+144) tmp = Float64(t_1 - t_2); elseif (ew <= 6e-113) tmp = abs(t_2); else tmp = Float64(t_1 + t_2); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = ew * cos(t); t_2 = eh * sin(t); tmp = 0.0; if (ew <= -2.5e+144) tmp = t_1 - t_2; elseif (ew <= 6e-113) tmp = abs(t_2); else tmp = t_1 + t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -2.5e+144], N[(t$95$1 - t$95$2), $MachinePrecision], If[LessEqual[ew, 6e-113], N[Abs[t$95$2], $MachinePrecision], N[(t$95$1 + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \cos t\\
t_2 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -2.5 \cdot 10^{+144}:\\
\;\;\;\;t\_1 - t\_2\\
\mathbf{elif}\;ew \leq 6 \cdot 10^{-113}:\\
\;\;\;\;\left|t\_2\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1 + t\_2\\
\end{array}
\end{array}
if ew < -2.5e144Initial 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-rr21.4%
associate-*r/21.4%
*-commutative21.4%
associate-/l*21.4%
associate-/r/21.4%
*-commutative21.4%
fma-undefine21.4%
Simplified21.4%
Taylor expanded in ew around inf 21.4%
sin-atan21.4%
metadata-eval21.4%
hypot-undefine21.4%
Applied egg-rr21.4%
associate-/l*21.4%
associate-*r/21.4%
*-commutative21.4%
associate-/l*21.4%
Simplified21.4%
Taylor expanded in eh around -inf 21.4%
if -2.5e144 < ew < 6.0000000000000002e-113Initial 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%
associate-*r*99.7%
sin-atan64.4%
associate-*r/63.4%
add-sqr-sqrt32.1%
sqrt-unprod60.3%
sqr-neg60.3%
sqrt-unprod31.1%
add-sqr-sqrt63.3%
clear-num63.2%
un-div-inv63.1%
hypot-1-def78.6%
add-sqr-sqrt40.1%
Applied egg-rr78.9%
Taylor expanded in t around 0 67.4%
Taylor expanded in eh around -inf 63.3%
if 6.0000000000000002e-113 < ew 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-rr77.0%
associate-*r/77.0%
*-commutative77.0%
associate-/l*77.0%
associate-/r/77.0%
*-commutative77.0%
fma-undefine77.0%
Simplified77.0%
Taylor expanded in ew around inf 76.1%
sin-atan67.5%
metadata-eval67.5%
hypot-undefine72.8%
Applied egg-rr72.8%
associate-/l*72.7%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in eh around inf 75.0%
mul-1-neg75.0%
*-commutative75.0%
distribute-rgt-neg-in75.0%
Simplified75.0%
Final simplification62.0%
(FPCore (eh ew t) :precision binary64 (fabs (* eh (sin t))))
double code(double eh, double ew, double t) {
return fabs((eh * sin(t)));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((eh * sin(t)))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((eh * Math.sin(t)));
}
def code(eh, ew, t): return math.fabs((eh * math.sin(t)))
function code(eh, ew, t) return abs(Float64(eh * sin(t))) end
function tmp = code(eh, ew, t) tmp = abs((eh * sin(t))); end
code[eh_, ew_, t_] := N[Abs[N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|eh \cdot \sin t\right|
\end{array}
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%
associate-*r*99.7%
sin-atan77.7%
associate-*r/76.0%
add-sqr-sqrt40.8%
sqrt-unprod66.4%
sqr-neg66.4%
sqrt-unprod35.0%
add-sqr-sqrt75.8%
clear-num75.8%
un-div-inv75.7%
hypot-1-def83.9%
add-sqr-sqrt45.0%
Applied egg-rr84.1%
Taylor expanded in t around 0 63.3%
Taylor expanded in eh around -inf 45.0%
(FPCore (eh ew t) :precision binary64 (fabs (* eh t)))
double code(double eh, double ew, double t) {
return fabs((eh * t));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((eh * t))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((eh * t));
}
def code(eh, ew, t): return math.fabs((eh * t))
function code(eh, ew, t) return abs(Float64(eh * t)) end
function tmp = code(eh, ew, t) tmp = abs((eh * t)); end
code[eh_, ew_, t_] := N[Abs[N[(eh * t), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|eh \cdot t\right|
\end{array}
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%
associate-*r*99.7%
sin-atan77.7%
associate-*r/76.0%
add-sqr-sqrt40.8%
sqrt-unprod66.4%
sqr-neg66.4%
sqrt-unprod35.0%
add-sqr-sqrt75.8%
clear-num75.8%
un-div-inv75.7%
hypot-1-def83.9%
add-sqr-sqrt45.0%
Applied egg-rr84.1%
Taylor expanded in t around 0 63.3%
Taylor expanded in eh around -inf 45.0%
Taylor expanded in t around 0 21.7%
*-commutative21.7%
Simplified21.7%
Final simplification21.7%
herbie shell --seed 2024137
(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)))))))