
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew)))) (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((-eh * tan(t)) / ew));
return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((-eh * tan(t)) / ew))
code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((-eh * math.tan(t)) / ew)) return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((-eh * tan(t)) / ew)); tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew)))) (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((-eh * tan(t)) / ew));
return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((-eh * tan(t)) / ew))
code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((-eh * math.tan(t)) / ew)) return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((-eh * tan(t)) / ew)); tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (* eh (/ (tan t) (- ew)))))) (fabs (fma ew (* (cos t_1) (- (cos t))) (* eh (* (sin t) (sin t_1)))))))
double code(double eh, double ew, double t) {
double t_1 = atan((eh * (tan(t) / -ew)));
return fabs(fma(ew, (cos(t_1) * -cos(t)), (eh * (sin(t) * sin(t_1)))));
}
function code(eh, ew, t) t_1 = atan(Float64(eh * Float64(tan(t) / Float64(-ew)))) return abs(fma(ew, Float64(cos(t_1) * Float64(-cos(t))), Float64(eh * Float64(sin(t) * sin(t_1))))) end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(ew * N[(N[Cos[t$95$1], $MachinePrecision] * (-N[Cos[t], $MachinePrecision])), $MachinePrecision] + N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\left|\mathsf{fma}\left(ew, \cos t\_1 \cdot \left(-\cos t\right), eh \cdot \left(\sin t \cdot \sin t\_1\right)\right)\right|
\end{array}
\end{array}
Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (* eh (/ (tan t) (- ew)))))) (fabs (- (* (cos t_1) (* ew (cos t))) (* eh (* (sin t) (sin t_1)))))))
double code(double eh, double ew, double t) {
double t_1 = atan((eh * (tan(t) / -ew)));
return fabs(((cos(t_1) * (ew * cos(t))) - (eh * (sin(t) * sin(t_1)))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan((eh * (tan(t) / -ew)))
code = abs(((cos(t_1) * (ew * cos(t))) - (eh * (sin(t) * sin(t_1)))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan((eh * (Math.tan(t) / -ew)));
return Math.abs(((Math.cos(t_1) * (ew * Math.cos(t))) - (eh * (Math.sin(t) * Math.sin(t_1)))));
}
def code(eh, ew, t): t_1 = math.atan((eh * (math.tan(t) / -ew))) return math.fabs(((math.cos(t_1) * (ew * math.cos(t))) - (eh * (math.sin(t) * math.sin(t_1)))))
function code(eh, ew, t) t_1 = atan(Float64(eh * Float64(tan(t) / Float64(-ew)))) return abs(Float64(Float64(cos(t_1) * Float64(ew * cos(t))) - Float64(eh * Float64(sin(t) * sin(t_1))))) end
function tmp = code(eh, ew, t) t_1 = atan((eh * (tan(t) / -ew))); tmp = abs(((cos(t_1) * (ew * cos(t))) - (eh * (sin(t) * sin(t_1))))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[Cos[t$95$1], $MachinePrecision] * N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right)\\
\left|\cos t\_1 \cdot \left(ew \cdot \cos t\right) - eh \cdot \left(\sin t \cdot \sin t\_1\right)\right|
\end{array}
\end{array}
Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (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(Float64(-eh) * Float64(tan(t) / 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(\left(-eh\right) \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%
*-commutative99.8%
add-sqr-sqrt29.5%
sqrt-unprod99.1%
sqr-neg99.1%
sqrt-unprod69.4%
add-sqr-sqrt98.9%
log1p-expm1-u98.9%
cos-atan98.9%
un-div-inv98.9%
hypot-1-def98.9%
add-sqr-sqrt49.7%
Applied egg-rr98.9%
Taylor expanded in eh around 0 98.1%
Final simplification98.1%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sin (atan (* (- eh) (/ (tan t) ew))))))
(if (<= eh -2.1e+138)
(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((-eh * (tan(t) / ew))));
double tmp;
if (eh <= -2.1e+138) {
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((-eh * (tan(t) / ew))))
if (eh <= (-2.1d+138)) 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((-eh * (Math.tan(t) / ew))));
double tmp;
if (eh <= -2.1e+138) {
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((-eh * (math.tan(t) / ew)))) tmp = 0 if eh <= -2.1e+138: 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(Float64(-eh) * Float64(tan(t) / ew)))) tmp = 0.0 if (eh <= -2.1e+138) 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((-eh * (tan(t) / ew)))); tmp = 0.0; if (eh <= -2.1e+138) 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[((-eh) * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -2.1e+138], 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(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)\\
\mathbf{if}\;eh \leq -2.1 \cdot 10^{+138}:\\
\;\;\;\;\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 < -2.10000000000000007e138Initial program 99.9%
fabs-sub99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in ew around 0 90.9%
*-commutative90.9%
associate-*l*90.9%
*-commutative90.9%
mul-1-neg90.9%
distribute-frac-neg290.9%
associate-/l*90.9%
Simplified90.9%
if -2.10000000000000007e138 < 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%
*-commutative99.8%
add-sqr-sqrt28.8%
sqrt-unprod98.9%
sqr-neg98.9%
sqrt-unprod70.0%
add-sqr-sqrt98.7%
log1p-expm1-u98.6%
cos-atan98.6%
un-div-inv98.6%
hypot-1-def98.6%
add-sqr-sqrt39.8%
Applied egg-rr98.6%
log1p-expm1-u98.7%
add-cube-cbrt98.3%
*-un-lft-identity98.3%
times-frac98.3%
cbrt-unprod98.4%
pow298.4%
Applied egg-rr98.4%
/-rgt-identity98.4%
associate-*r/98.4%
Simplified98.4%
Taylor expanded in ew around inf 91.7%
associate-/l*91.7%
mul-1-neg91.7%
associate-*r/91.7%
distribute-rgt-neg-in91.7%
distribute-neg-frac291.7%
Simplified91.7%
Final simplification91.6%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (tan t) ew))
(t_2 (sin (atan (* eh t_1))))
(t_3 (* ew (cos t))))
(if (<= ew -2.8e+34)
(fabs t_3)
(if (<= ew -1.45e-200)
(- (* eh (* (sin t) (- t_2))) t_3)
(if (<= ew 2.7e-73)
(fabs (* (sin t) (* eh (sin (atan (* (- eh) t_1))))))
(* ew (+ (cos t) (* eh (/ (* (sin t) t_2) ew)))))))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) / ew;
double t_2 = sin(atan((eh * t_1)));
double t_3 = ew * cos(t);
double tmp;
if (ew <= -2.8e+34) {
tmp = fabs(t_3);
} else if (ew <= -1.45e-200) {
tmp = (eh * (sin(t) * -t_2)) - t_3;
} else if (ew <= 2.7e-73) {
tmp = fabs((sin(t) * (eh * sin(atan((-eh * t_1))))));
} else {
tmp = ew * (cos(t) + (eh * ((sin(t) * t_2) / 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = tan(t) / ew
t_2 = sin(atan((eh * t_1)))
t_3 = ew * cos(t)
if (ew <= (-2.8d+34)) then
tmp = abs(t_3)
else if (ew <= (-1.45d-200)) then
tmp = (eh * (sin(t) * -t_2)) - t_3
else if (ew <= 2.7d-73) then
tmp = abs((sin(t) * (eh * sin(atan((-eh * t_1))))))
else
tmp = ew * (cos(t) + (eh * ((sin(t) * t_2) / ew)))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.tan(t) / ew;
double t_2 = Math.sin(Math.atan((eh * t_1)));
double t_3 = ew * Math.cos(t);
double tmp;
if (ew <= -2.8e+34) {
tmp = Math.abs(t_3);
} else if (ew <= -1.45e-200) {
tmp = (eh * (Math.sin(t) * -t_2)) - t_3;
} else if (ew <= 2.7e-73) {
tmp = Math.abs((Math.sin(t) * (eh * Math.sin(Math.atan((-eh * t_1))))));
} else {
tmp = ew * (Math.cos(t) + (eh * ((Math.sin(t) * t_2) / ew)));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.tan(t) / ew t_2 = math.sin(math.atan((eh * t_1))) t_3 = ew * math.cos(t) tmp = 0 if ew <= -2.8e+34: tmp = math.fabs(t_3) elif ew <= -1.45e-200: tmp = (eh * (math.sin(t) * -t_2)) - t_3 elif ew <= 2.7e-73: tmp = math.fabs((math.sin(t) * (eh * math.sin(math.atan((-eh * t_1)))))) else: tmp = ew * (math.cos(t) + (eh * ((math.sin(t) * t_2) / ew))) return tmp
function code(eh, ew, t) t_1 = Float64(tan(t) / ew) t_2 = sin(atan(Float64(eh * t_1))) t_3 = Float64(ew * cos(t)) tmp = 0.0 if (ew <= -2.8e+34) tmp = abs(t_3); elseif (ew <= -1.45e-200) tmp = Float64(Float64(eh * Float64(sin(t) * Float64(-t_2))) - t_3); elseif (ew <= 2.7e-73) tmp = abs(Float64(sin(t) * Float64(eh * sin(atan(Float64(Float64(-eh) * t_1)))))); else tmp = Float64(ew * Float64(cos(t) + Float64(eh * Float64(Float64(sin(t) * t_2) / ew)))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = tan(t) / ew; t_2 = sin(atan((eh * t_1))); t_3 = ew * cos(t); tmp = 0.0; if (ew <= -2.8e+34) tmp = abs(t_3); elseif (ew <= -1.45e-200) tmp = (eh * (sin(t) * -t_2)) - t_3; elseif (ew <= 2.7e-73) tmp = abs((sin(t) * (eh * sin(atan((-eh * t_1)))))); else tmp = ew * (cos(t) + (eh * ((sin(t) * t_2) / ew))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[ArcTan[N[(eh * t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -2.8e+34], N[Abs[t$95$3], $MachinePrecision], If[LessEqual[ew, -1.45e-200], N[(N[(eh * N[(N[Sin[t], $MachinePrecision] * (-t$95$2)), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[ew, 2.7e-73], N[Abs[N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[N[ArcTan[N[((-eh) * t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(ew * N[(N[Cos[t], $MachinePrecision] + N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * t$95$2), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew}\\
t_2 := \sin \tan^{-1} \left(eh \cdot t\_1\right)\\
t_3 := ew \cdot \cos t\\
\mathbf{if}\;ew \leq -2.8 \cdot 10^{+34}:\\
\;\;\;\;\left|t\_3\right|\\
\mathbf{elif}\;ew \leq -1.45 \cdot 10^{-200}:\\
\;\;\;\;eh \cdot \left(\sin t \cdot \left(-t\_2\right)\right) - t\_3\\
\mathbf{elif}\;ew \leq 2.7 \cdot 10^{-73}:\\
\;\;\;\;\left|\sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\left(-eh\right) \cdot t\_1\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \left(\cos t + eh \cdot \frac{\sin t \cdot t\_2}{ew}\right)\\
\end{array}
\end{array}
if ew < -2.80000000000000008e34Initial 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-sqrt40.4%
sqrt-unprod99.8%
sqr-neg99.8%
sqrt-unprod59.1%
add-sqr-sqrt99.8%
log1p-expm1-u99.6%
cos-atan99.6%
un-div-inv99.6%
hypot-1-def99.6%
add-sqr-sqrt43.9%
Applied egg-rr99.6%
Taylor expanded in ew around inf 84.0%
if -2.80000000000000008e34 < ew < -1.45e-200Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Applied egg-rr77.2%
neg-sub077.2%
associate-*r/77.2%
Simplified77.2%
Taylor expanded in eh around 0 77.2%
mul-1-neg77.2%
associate-/l*77.2%
Simplified77.2%
if -1.45e-200 < ew < 2.69999999999999994e-73Initial 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 79.4%
*-commutative79.4%
associate-*l*79.4%
*-commutative79.4%
mul-1-neg79.4%
distribute-frac-neg279.4%
associate-/l*79.4%
Simplified79.4%
if 2.69999999999999994e-73 < 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-rr82.1%
Taylor expanded in ew around inf 78.6%
associate-/l*78.6%
associate-*r/78.6%
Simplified78.6%
Final simplification79.8%
(FPCore (eh ew t)
:precision binary64
(if (<= eh -3.4e+14)
(fabs (* (sin (atan (* eh (/ (tan t) (- ew))))) (* eh (sin t))))
(if (<= eh 2.6e+98)
(fabs (* ew (cos t)))
(fma
(- (sin t))
eh
(* ew (/ (cos t) (hypot 1.0 (* eh (/ (tan t) ew)))))))))
double code(double eh, double ew, double t) {
double tmp;
if (eh <= -3.4e+14) {
tmp = fabs((sin(atan((eh * (tan(t) / -ew)))) * (eh * sin(t))));
} else if (eh <= 2.6e+98) {
tmp = fabs((ew * cos(t)));
} else {
tmp = fma(-sin(t), eh, (ew * (cos(t) / hypot(1.0, (eh * (tan(t) / ew))))));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if (eh <= -3.4e+14) tmp = abs(Float64(sin(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) * Float64(eh * sin(t)))); elseif (eh <= 2.6e+98) tmp = abs(Float64(ew * cos(t))); else tmp = fma(Float64(-sin(t)), eh, Float64(ew * Float64(cos(t) / hypot(1.0, Float64(eh * Float64(tan(t) / ew)))))); end return tmp end
code[eh_, ew_, t_] := If[LessEqual[eh, -3.4e+14], N[Abs[N[(N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 2.6e+98], N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[((-N[Sin[t], $MachinePrecision]) * eh + N[(ew * N[(N[Cos[t], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -3.4 \cdot 10^{+14}:\\
\;\;\;\;\left|\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(eh \cdot \sin t\right)\right|\\
\mathbf{elif}\;eh \leq 2.6 \cdot 10^{+98}:\\
\;\;\;\;\left|ew \cdot \cos t\right|\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-\sin t, eh, ew \cdot \frac{\cos t}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right)\\
\end{array}
\end{array}
if eh < -3.4e14Initial 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 80.0%
associate-*r*80.1%
associate-*r/80.1%
neg-mul-180.1%
distribute-lft-neg-in80.1%
Simplified80.1%
if -3.4e14 < eh < 2.6e98Initial 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-sqrt31.1%
sqrt-unprod99.2%
sqr-neg99.2%
sqrt-unprod67.9%
add-sqr-sqrt99.0%
log1p-expm1-u98.9%
cos-atan98.9%
un-div-inv98.9%
hypot-1-def98.9%
add-sqr-sqrt43.5%
Applied egg-rr98.9%
Taylor expanded in ew around inf 80.1%
if 2.6e98 < eh Initial program 99.9%
sub-neg99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
cancel-sign-sub99.9%
associate-/l*99.9%
Simplified99.9%
Applied egg-rr42.2%
sin-atan23.8%
*-commutative23.8%
hypot-1-def32.8%
*-un-lft-identity32.8%
times-frac33.3%
Applied egg-rr33.3%
Taylor expanded in eh around -inf 67.1%
mul-1-neg67.1%
Simplified67.1%
Final simplification77.9%
(FPCore (eh ew t) :precision binary64 (if (or (<= eh -3.2e+14) (not (<= eh 4e+98))) (fabs (* (sin (atan (* eh (/ (tan t) (- ew))))) (* eh (sin t)))) (fabs (* ew (cos t)))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -3.2e+14) || !(eh <= 4e+98)) {
tmp = fabs((sin(atan((eh * (tan(t) / -ew)))) * (eh * sin(t))));
} else {
tmp = fabs((ew * cos(t)));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((eh <= (-3.2d+14)) .or. (.not. (eh <= 4d+98))) then
tmp = abs((sin(atan((eh * (tan(t) / -ew)))) * (eh * sin(t))))
else
tmp = abs((ew * cos(t)))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -3.2e+14) || !(eh <= 4e+98)) {
tmp = Math.abs((Math.sin(Math.atan((eh * (Math.tan(t) / -ew)))) * (eh * Math.sin(t))));
} else {
tmp = Math.abs((ew * Math.cos(t)));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -3.2e+14) or not (eh <= 4e+98): tmp = math.fabs((math.sin(math.atan((eh * (math.tan(t) / -ew)))) * (eh * math.sin(t)))) else: tmp = math.fabs((ew * math.cos(t))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -3.2e+14) || !(eh <= 4e+98)) tmp = abs(Float64(sin(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) * Float64(eh * sin(t)))); else tmp = abs(Float64(ew * cos(t))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -3.2e+14) || ~((eh <= 4e+98))) tmp = abs((sin(atan((eh * (tan(t) / -ew)))) * (eh * sin(t)))); else tmp = abs((ew * cos(t))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3.2e+14], N[Not[LessEqual[eh, 4e+98]], $MachinePrecision]], N[Abs[N[(N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -3.2 \cdot 10^{+14} \lor \neg \left(eh \leq 4 \cdot 10^{+98}\right):\\
\;\;\;\;\left|\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(eh \cdot \sin t\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \cos t\right|\\
\end{array}
\end{array}
if eh < -3.2e14 or 3.99999999999999999e98 < eh Initial program 99.9%
fabs-sub99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in ew around 0 74.4%
associate-*r*74.5%
associate-*r/74.4%
neg-mul-174.4%
distribute-lft-neg-in74.4%
Simplified74.4%
if -3.2e14 < eh < 3.99999999999999999e98Initial 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-sqrt31.1%
sqrt-unprod99.2%
sqr-neg99.2%
sqrt-unprod67.9%
add-sqr-sqrt99.0%
log1p-expm1-u98.9%
cos-atan98.9%
un-div-inv98.9%
hypot-1-def98.9%
add-sqr-sqrt43.5%
Applied egg-rr98.9%
Taylor expanded in ew around inf 80.1%
Final simplification77.7%
(FPCore (eh ew t) :precision binary64 (if (or (<= eh -3.4e+14) (not (<= eh 1.65e+98))) (fabs (* (sin t) (* eh (sin (atan (* (- eh) (/ (tan t) ew))))))) (fabs (* ew (cos t)))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -3.4e+14) || !(eh <= 1.65e+98)) {
tmp = fabs((sin(t) * (eh * sin(atan((-eh * (tan(t) / ew)))))));
} else {
tmp = fabs((ew * cos(t)));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((eh <= (-3.4d+14)) .or. (.not. (eh <= 1.65d+98))) then
tmp = abs((sin(t) * (eh * sin(atan((-eh * (tan(t) / ew)))))))
else
tmp = abs((ew * cos(t)))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -3.4e+14) || !(eh <= 1.65e+98)) {
tmp = Math.abs((Math.sin(t) * (eh * Math.sin(Math.atan((-eh * (Math.tan(t) / ew)))))));
} else {
tmp = Math.abs((ew * Math.cos(t)));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -3.4e+14) or not (eh <= 1.65e+98): tmp = math.fabs((math.sin(t) * (eh * math.sin(math.atan((-eh * (math.tan(t) / ew))))))) else: tmp = math.fabs((ew * math.cos(t))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -3.4e+14) || !(eh <= 1.65e+98)) tmp = abs(Float64(sin(t) * Float64(eh * sin(atan(Float64(Float64(-eh) * Float64(tan(t) / ew))))))); else tmp = abs(Float64(ew * cos(t))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -3.4e+14) || ~((eh <= 1.65e+98))) tmp = abs((sin(t) * (eh * sin(atan((-eh * (tan(t) / ew))))))); else tmp = abs((ew * cos(t))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3.4e+14], N[Not[LessEqual[eh, 1.65e+98]], $MachinePrecision]], N[Abs[N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[N[ArcTan[N[((-eh) * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -3.4 \cdot 10^{+14} \lor \neg \left(eh \leq 1.65 \cdot 10^{+98}\right):\\
\;\;\;\;\left|\sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \cos t\right|\\
\end{array}
\end{array}
if eh < -3.4e14 or 1.65000000000000014e98 < eh Initial program 99.9%
fabs-sub99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in ew around 0 74.4%
*-commutative74.4%
associate-*l*74.5%
*-commutative74.5%
mul-1-neg74.5%
distribute-frac-neg274.5%
associate-/l*74.4%
Simplified74.4%
if -3.4e14 < eh < 1.65000000000000014e98Initial 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-sqrt31.1%
sqrt-unprod99.2%
sqr-neg99.2%
sqrt-unprod67.9%
add-sqr-sqrt99.0%
log1p-expm1-u98.9%
cos-atan98.9%
un-div-inv98.9%
hypot-1-def98.9%
add-sqr-sqrt43.5%
Applied egg-rr98.9%
Taylor expanded in ew around inf 80.1%
Final simplification77.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (* ew (cos t)))))
(if (<= t -1.45e+128)
t_1
(if (<= t -3.3e+19)
(* eh (- (sin t)))
(if (<= t 4400.0)
(fabs (+ ew (* (sin (atan (* eh (/ (tan t) (- ew))))) (* eh t))))
t_1)))))
double code(double eh, double ew, double t) {
double t_1 = fabs((ew * cos(t)));
double tmp;
if (t <= -1.45e+128) {
tmp = t_1;
} else if (t <= -3.3e+19) {
tmp = eh * -sin(t);
} else if (t <= 4400.0) {
tmp = fabs((ew + (sin(atan((eh * (tan(t) / -ew)))) * (eh * t))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = abs((ew * cos(t)))
if (t <= (-1.45d+128)) then
tmp = t_1
else if (t <= (-3.3d+19)) then
tmp = eh * -sin(t)
else if (t <= 4400.0d0) then
tmp = abs((ew + (sin(atan((eh * (tan(t) / -ew)))) * (eh * t))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs((ew * Math.cos(t)));
double tmp;
if (t <= -1.45e+128) {
tmp = t_1;
} else if (t <= -3.3e+19) {
tmp = eh * -Math.sin(t);
} else if (t <= 4400.0) {
tmp = Math.abs((ew + (Math.sin(Math.atan((eh * (Math.tan(t) / -ew)))) * (eh * t))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs((ew * math.cos(t))) tmp = 0 if t <= -1.45e+128: tmp = t_1 elif t <= -3.3e+19: tmp = eh * -math.sin(t) elif t <= 4400.0: tmp = math.fabs((ew + (math.sin(math.atan((eh * (math.tan(t) / -ew)))) * (eh * t)))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(ew * cos(t))) tmp = 0.0 if (t <= -1.45e+128) tmp = t_1; elseif (t <= -3.3e+19) tmp = Float64(eh * Float64(-sin(t))); elseif (t <= 4400.0) tmp = abs(Float64(ew + Float64(sin(atan(Float64(eh * Float64(tan(t) / Float64(-ew))))) * Float64(eh * t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = abs((ew * cos(t))); tmp = 0.0; if (t <= -1.45e+128) tmp = t_1; elseif (t <= -3.3e+19) tmp = eh * -sin(t); elseif (t <= 4400.0) tmp = abs((ew + (sin(atan((eh * (tan(t) / -ew)))) * (eh * t)))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.45e+128], t$95$1, If[LessEqual[t, -3.3e+19], N[(eh * (-N[Sin[t], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 4400.0], N[Abs[N[(ew + N[(N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(eh * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|ew \cdot \cos t\right|\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{+19}:\\
\;\;\;\;eh \cdot \left(-\sin t\right)\\
\mathbf{elif}\;t \leq 4400:\\
\;\;\;\;\left|ew + \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{-ew}\right) \cdot \left(eh \cdot t\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.45e128 or 4400 < 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%
*-commutative99.6%
add-sqr-sqrt58.2%
sqrt-unprod99.3%
sqr-neg99.3%
sqrt-unprod40.9%
add-sqr-sqrt99.0%
log1p-expm1-u98.9%
cos-atan98.9%
un-div-inv98.9%
hypot-1-def98.9%
add-sqr-sqrt54.4%
Applied egg-rr98.9%
Taylor expanded in ew around inf 49.1%
if -1.45e128 < t < -3.3e19Initial 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-rr44.1%
sin-atan39.8%
*-commutative39.8%
hypot-1-def39.6%
*-un-lft-identity39.6%
times-frac40.2%
Applied egg-rr40.2%
Taylor expanded in eh around -inf 57.4%
mul-1-neg57.4%
distribute-rgt-neg-in57.4%
Simplified57.4%
if -3.3e19 < t < 4400Initial program 99.9%
fabs-sub99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
fma-define99.9%
Simplified99.9%
*-commutative99.9%
add-sqr-sqrt0.8%
sqrt-unprod98.6%
sqr-neg98.6%
sqrt-unprod97.8%
add-sqr-sqrt98.6%
log1p-expm1-u98.6%
cos-atan98.6%
un-div-inv98.6%
hypot-1-def98.6%
add-sqr-sqrt45.7%
Applied egg-rr98.6%
Taylor expanded in t around 0 93.6%
associate-*r*93.6%
mul-1-neg93.6%
associate-*r/93.6%
*-commutative93.6%
distribute-rgt-neg-in93.6%
Simplified93.6%
Final simplification71.1%
(FPCore (eh ew t) :precision binary64 (if (<= eh -1.4e+91) (* (sin (atan (* eh (/ (tan t) ew)))) (* eh (sin t))) (if (<= eh 5.8e+99) (fabs (* ew (cos t))) (* eh (- (sin t))))))
double code(double eh, double ew, double t) {
double tmp;
if (eh <= -1.4e+91) {
tmp = sin(atan((eh * (tan(t) / ew)))) * (eh * sin(t));
} else if (eh <= 5.8e+99) {
tmp = fabs((ew * cos(t)));
} else {
tmp = eh * -sin(t);
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if (eh <= (-1.4d+91)) then
tmp = sin(atan((eh * (tan(t) / ew)))) * (eh * sin(t))
else if (eh <= 5.8d+99) then
tmp = abs((ew * cos(t)))
else
tmp = eh * -sin(t)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (eh <= -1.4e+91) {
tmp = Math.sin(Math.atan((eh * (Math.tan(t) / ew)))) * (eh * Math.sin(t));
} else if (eh <= 5.8e+99) {
tmp = Math.abs((ew * Math.cos(t)));
} else {
tmp = eh * -Math.sin(t);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if eh <= -1.4e+91: tmp = math.sin(math.atan((eh * (math.tan(t) / ew)))) * (eh * math.sin(t)) elif eh <= 5.8e+99: tmp = math.fabs((ew * math.cos(t))) else: tmp = eh * -math.sin(t) return tmp
function code(eh, ew, t) tmp = 0.0 if (eh <= -1.4e+91) tmp = Float64(sin(atan(Float64(eh * Float64(tan(t) / ew)))) * Float64(eh * sin(t))); elseif (eh <= 5.8e+99) tmp = abs(Float64(ew * cos(t))); else tmp = Float64(eh * Float64(-sin(t))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (eh <= -1.4e+91) tmp = sin(atan((eh * (tan(t) / ew)))) * (eh * sin(t)); elseif (eh <= 5.8e+99) tmp = abs((ew * cos(t))); else tmp = eh * -sin(t); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[eh, -1.4e+91], N[(N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[eh, 5.8e+99], N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(eh * (-N[Sin[t], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -1.4 \cdot 10^{+91}:\\
\;\;\;\;\sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \left(eh \cdot \sin t\right)\\
\mathbf{elif}\;eh \leq 5.8 \cdot 10^{+99}:\\
\;\;\;\;\left|ew \cdot \cos t\right|\\
\mathbf{else}:\\
\;\;\;\;eh \cdot \left(-\sin t\right)\\
\end{array}
\end{array}
if eh < -1.3999999999999999e91Initial 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-rr53.3%
Taylor expanded in eh around inf 49.0%
associate-*r*49.1%
associate-*r/49.0%
Simplified49.0%
if -1.3999999999999999e91 < eh < 5.8000000000000004e99Initial 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%
*-commutative99.8%
add-sqr-sqrt31.7%
sqrt-unprod98.7%
sqr-neg98.7%
sqrt-unprod66.8%
add-sqr-sqrt98.5%
log1p-expm1-u98.4%
cos-atan98.4%
un-div-inv98.4%
hypot-1-def98.4%
add-sqr-sqrt48.4%
Applied egg-rr98.4%
Taylor expanded in ew around inf 77.0%
if 5.8000000000000004e99 < eh Initial program 99.9%
sub-neg99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
cancel-sign-sub99.9%
associate-/l*99.9%
Simplified99.9%
Applied egg-rr42.2%
sin-atan23.8%
*-commutative23.8%
hypot-1-def32.8%
*-un-lft-identity32.8%
times-frac33.3%
Applied egg-rr33.3%
Taylor expanded in eh around -inf 52.1%
mul-1-neg52.1%
distribute-rgt-neg-in52.1%
Simplified52.1%
Final simplification67.7%
(FPCore (eh ew t) :precision binary64 (if (or (<= eh -3.9e+103) (not (<= eh 2.6e+99))) (* eh (- (sin t))) (fabs (* ew (cos t)))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -3.9e+103) || !(eh <= 2.6e+99)) {
tmp = eh * -sin(t);
} else {
tmp = fabs((ew * cos(t)));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((eh <= (-3.9d+103)) .or. (.not. (eh <= 2.6d+99))) then
tmp = eh * -sin(t)
else
tmp = abs((ew * cos(t)))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -3.9e+103) || !(eh <= 2.6e+99)) {
tmp = eh * -Math.sin(t);
} else {
tmp = Math.abs((ew * Math.cos(t)));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -3.9e+103) or not (eh <= 2.6e+99): tmp = eh * -math.sin(t) else: tmp = math.fabs((ew * math.cos(t))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -3.9e+103) || !(eh <= 2.6e+99)) tmp = Float64(eh * Float64(-sin(t))); else tmp = abs(Float64(ew * cos(t))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -3.9e+103) || ~((eh <= 2.6e+99))) tmp = eh * -sin(t); else tmp = abs((ew * cos(t))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3.9e+103], N[Not[LessEqual[eh, 2.6e+99]], $MachinePrecision]], N[(eh * (-N[Sin[t], $MachinePrecision])), $MachinePrecision], N[Abs[N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -3.9 \cdot 10^{+103} \lor \neg \left(eh \leq 2.6 \cdot 10^{+99}\right):\\
\;\;\;\;eh \cdot \left(-\sin t\right)\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \cos t\right|\\
\end{array}
\end{array}
if eh < -3.8999999999999998e103 or 2.6e99 < eh Initial program 99.9%
sub-neg99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
cancel-sign-sub99.9%
associate-/l*99.9%
Simplified99.9%
Applied egg-rr47.4%
sin-atan22.5%
*-commutative22.5%
hypot-1-def35.8%
*-un-lft-identity35.8%
times-frac36.2%
Applied egg-rr36.2%
Taylor expanded in eh around -inf 50.0%
mul-1-neg50.0%
distribute-rgt-neg-in50.0%
Simplified50.0%
if -3.8999999999999998e103 < eh < 2.6e99Initial 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%
*-commutative99.8%
add-sqr-sqrt31.1%
sqrt-unprod98.6%
sqr-neg98.6%
sqrt-unprod67.3%
add-sqr-sqrt98.4%
log1p-expm1-u98.3%
cos-atan98.3%
un-div-inv98.3%
hypot-1-def98.3%
add-sqr-sqrt49.2%
Applied egg-rr98.3%
Taylor expanded in ew around inf 76.3%
Final simplification67.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (- (sin t)))))
(if (<= t -3.1e-28)
t_1
(if (<= t 0.000112) (fabs ew) (if (<= t 6.2e+193) t_1 (* eh (sin t)))))))
double code(double eh, double ew, double t) {
double t_1 = eh * -sin(t);
double tmp;
if (t <= -3.1e-28) {
tmp = t_1;
} else if (t <= 0.000112) {
tmp = fabs(ew);
} else if (t <= 6.2e+193) {
tmp = t_1;
} else {
tmp = eh * sin(t);
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = eh * -sin(t)
if (t <= (-3.1d-28)) then
tmp = t_1
else if (t <= 0.000112d0) then
tmp = abs(ew)
else if (t <= 6.2d+193) then
tmp = t_1
else
tmp = eh * sin(t)
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 (t <= -3.1e-28) {
tmp = t_1;
} else if (t <= 0.000112) {
tmp = Math.abs(ew);
} else if (t <= 6.2e+193) {
tmp = t_1;
} else {
tmp = eh * Math.sin(t);
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * -math.sin(t) tmp = 0 if t <= -3.1e-28: tmp = t_1 elif t <= 0.000112: tmp = math.fabs(ew) elif t <= 6.2e+193: tmp = t_1 else: tmp = eh * math.sin(t) return tmp
function code(eh, ew, t) t_1 = Float64(eh * Float64(-sin(t))) tmp = 0.0 if (t <= -3.1e-28) tmp = t_1; elseif (t <= 0.000112) tmp = abs(ew); elseif (t <= 6.2e+193) tmp = t_1; else tmp = Float64(eh * sin(t)); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * -sin(t); tmp = 0.0; if (t <= -3.1e-28) tmp = t_1; elseif (t <= 0.000112) tmp = abs(ew); elseif (t <= 6.2e+193) tmp = t_1; else tmp = eh * sin(t); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * (-N[Sin[t], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[t, -3.1e-28], t$95$1, If[LessEqual[t, 0.000112], N[Abs[ew], $MachinePrecision], If[LessEqual[t, 6.2e+193], t$95$1, N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \left(-\sin t\right)\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.000112:\\
\;\;\;\;\left|ew\right|\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+193}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;eh \cdot \sin t\\
\end{array}
\end{array}
if t < -3.09999999999999992e-28 or 1.11999999999999998e-4 < t < 6.19999999999999972e193Initial 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-rr47.9%
sin-atan35.8%
*-commutative35.8%
hypot-1-def40.8%
*-un-lft-identity40.8%
times-frac41.1%
Applied egg-rr41.1%
Taylor expanded in eh around -inf 38.3%
mul-1-neg38.3%
distribute-rgt-neg-in38.3%
Simplified38.3%
if -3.09999999999999992e-28 < t < 1.11999999999999998e-4Initial 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-unprod99.0%
sqr-neg99.0%
sqrt-unprod99.0%
add-sqr-sqrt99.0%
log1p-expm1-u99.0%
cos-atan99.0%
un-div-inv99.0%
hypot-1-def99.0%
add-sqr-sqrt45.4%
Applied egg-rr99.0%
Taylor expanded in t around 0 76.9%
if 6.19999999999999972e193 < 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-rr64.7%
sin-atan45.7%
*-commutative45.7%
hypot-1-def58.2%
*-un-lft-identity58.2%
times-frac58.2%
Applied egg-rr58.2%
Taylor expanded in ew around 0 39.7%
(FPCore (eh ew t) :precision binary64 (if (or (<= t -1.8e+48) (not (<= t 1.2e-5))) (* eh (sin t)) (fabs ew)))
double code(double eh, double ew, double t) {
double tmp;
if ((t <= -1.8e+48) || !(t <= 1.2e-5)) {
tmp = eh * sin(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 <= (-1.8d+48)) .or. (.not. (t <= 1.2d-5))) then
tmp = eh * sin(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 <= -1.8e+48) || !(t <= 1.2e-5)) {
tmp = eh * Math.sin(t);
} else {
tmp = Math.abs(ew);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (t <= -1.8e+48) or not (t <= 1.2e-5): tmp = eh * math.sin(t) else: tmp = math.fabs(ew) return tmp
function code(eh, ew, t) tmp = 0.0 if ((t <= -1.8e+48) || !(t <= 1.2e-5)) tmp = Float64(eh * sin(t)); else tmp = abs(ew); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((t <= -1.8e+48) || ~((t <= 1.2e-5))) tmp = eh * sin(t); else tmp = abs(ew); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -1.8e+48], N[Not[LessEqual[t, 1.2e-5]], $MachinePrecision]], N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision], N[Abs[ew], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+48} \lor \neg \left(t \leq 1.2 \cdot 10^{-5}\right):\\
\;\;\;\;eh \cdot \sin t\\
\mathbf{else}:\\
\;\;\;\;\left|ew\right|\\
\end{array}
\end{array}
if t < -1.79999999999999992e48 or 1.2e-5 < t 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-rr53.0%
sin-atan39.0%
*-commutative39.0%
hypot-1-def46.9%
*-un-lft-identity46.9%
times-frac47.1%
Applied egg-rr47.1%
Taylor expanded in ew around 0 28.0%
if -1.79999999999999992e48 < t < 1.2e-5Initial program 99.9%
fabs-sub99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
fma-define99.9%
Simplified100.0%
*-commutative100.0%
add-sqr-sqrt2.4%
sqrt-unprod98.7%
sqr-neg98.7%
sqrt-unprod96.2%
add-sqr-sqrt98.7%
log1p-expm1-u98.6%
cos-atan98.6%
un-div-inv98.6%
hypot-1-def98.6%
add-sqr-sqrt44.6%
Applied egg-rr98.6%
Taylor expanded in t around 0 71.7%
Final simplification49.0%
(FPCore (eh ew t) :precision binary64 (if (<= t -1.2e+35) (* ew (cos t)) (if (<= t 1.35e-5) (fabs ew) (* eh (sin t)))))
double code(double eh, double ew, double t) {
double tmp;
if (t <= -1.2e+35) {
tmp = ew * cos(t);
} else if (t <= 1.35e-5) {
tmp = fabs(ew);
} else {
tmp = eh * sin(t);
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.2d+35)) then
tmp = ew * cos(t)
else if (t <= 1.35d-5) then
tmp = abs(ew)
else
tmp = eh * sin(t)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (t <= -1.2e+35) {
tmp = ew * Math.cos(t);
} else if (t <= 1.35e-5) {
tmp = Math.abs(ew);
} else {
tmp = eh * Math.sin(t);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if t <= -1.2e+35: tmp = ew * math.cos(t) elif t <= 1.35e-5: tmp = math.fabs(ew) else: tmp = eh * math.sin(t) return tmp
function code(eh, ew, t) tmp = 0.0 if (t <= -1.2e+35) tmp = Float64(ew * cos(t)); elseif (t <= 1.35e-5) tmp = abs(ew); else tmp = Float64(eh * sin(t)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (t <= -1.2e+35) tmp = ew * cos(t); elseif (t <= 1.35e-5) tmp = abs(ew); else tmp = eh * sin(t); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[t, -1.2e+35], N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-5], N[Abs[ew], $MachinePrecision], N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+35}:\\
\;\;\;\;ew \cdot \cos t\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-5}:\\
\;\;\;\;\left|ew\right|\\
\mathbf{else}:\\
\;\;\;\;eh \cdot \sin t\\
\end{array}
\end{array}
if t < -1.20000000000000007e35Initial 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%
*-commutative99.7%
add-sqr-sqrt48.2%
sqrt-unprod99.7%
sqr-neg99.7%
sqrt-unprod51.3%
add-sqr-sqrt99.7%
log1p-expm1-u99.6%
cos-atan99.6%
un-div-inv99.6%
hypot-1-def99.6%
add-sqr-sqrt48.3%
Applied egg-rr99.6%
Taylor expanded in ew around inf 47.8%
add-sqr-sqrt29.0%
fabs-sqr29.0%
add-sqr-sqrt29.9%
*-commutative29.9%
Applied egg-rr29.9%
if -1.20000000000000007e35 < t < 1.3499999999999999e-5Initial program 99.9%
fabs-sub99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l*99.9%
distribute-rgt-neg-in99.9%
fma-define99.9%
Simplified100.0%
*-commutative100.0%
add-sqr-sqrt2.5%
sqrt-unprod98.6%
sqr-neg98.6%
sqrt-unprod96.1%
add-sqr-sqrt98.6%
log1p-expm1-u98.6%
cos-atan98.6%
un-div-inv98.6%
hypot-1-def98.6%
add-sqr-sqrt45.3%
Applied egg-rr98.6%
Taylor expanded in t around 0 72.4%
if 1.3499999999999999e-5 < t 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-rr59.5%
sin-atan40.2%
*-commutative40.2%
hypot-1-def51.0%
*-un-lft-identity51.0%
times-frac51.1%
Applied egg-rr51.1%
Taylor expanded in ew around 0 31.0%
Final simplification50.3%
(FPCore (eh ew t) :precision binary64 (fabs ew))
double code(double eh, double ew, double t) {
return fabs(ew);
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs(ew)
end function
public static double code(double eh, double ew, double t) {
return Math.abs(ew);
}
def code(eh, ew, t): return math.fabs(ew)
function code(eh, ew, t) return abs(ew) end
function tmp = code(eh, ew, t) tmp = abs(ew); end
code[eh_, ew_, t_] := N[Abs[ew], $MachinePrecision]
\begin{array}{l}
\\
\left|ew\right|
\end{array}
Initial program 99.8%
fabs-sub99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Simplified99.8%
*-commutative99.8%
add-sqr-sqrt29.5%
sqrt-unprod99.1%
sqr-neg99.1%
sqrt-unprod69.4%
add-sqr-sqrt98.9%
log1p-expm1-u98.9%
cos-atan98.9%
un-div-inv98.9%
hypot-1-def98.9%
add-sqr-sqrt49.7%
Applied egg-rr98.9%
Taylor expanded in t around 0 40.4%
(FPCore (eh ew t) :precision binary64 (if (<= ew -5e-310) (- ew) ew))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= -5e-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 <= (-5d-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 <= -5e-310) {
tmp = -ew;
} else {
tmp = ew;
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if ew <= -5e-310: tmp = -ew else: tmp = ew return tmp
function code(eh, ew, t) tmp = 0.0 if (ew <= -5e-310) tmp = Float64(-ew); else tmp = ew; end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (ew <= -5e-310) tmp = -ew; else tmp = ew; end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[ew, -5e-310], (-ew), ew]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-ew\\
\mathbf{else}:\\
\;\;\;\;ew\\
\end{array}
\end{array}
if ew < -4.999999999999985e-310Initial 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-rr69.5%
neg-sub069.5%
associate-*r/69.5%
Simplified69.5%
Taylor expanded in t around 0 40.3%
neg-mul-140.3%
Simplified40.3%
if -4.999999999999985e-310 < 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%
*-commutative99.8%
add-sqr-sqrt28.4%
sqrt-unprod98.6%
sqr-neg98.6%
sqrt-unprod70.0%
add-sqr-sqrt98.6%
log1p-expm1-u98.5%
cos-atan98.5%
un-div-inv98.5%
hypot-1-def98.5%
add-sqr-sqrt54.5%
Applied egg-rr98.5%
Taylor expanded in t around 0 40.5%
add-sqr-sqrt40.2%
sqrt-unprod26.5%
sqr-abs26.5%
sqrt-unprod40.2%
add-sqr-sqrt40.5%
*-un-lft-identity40.5%
Applied egg-rr40.5%
Final simplification40.4%
(FPCore (eh ew t) :precision binary64 (- ew))
double code(double eh, double ew, double t) {
return -ew;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = -ew
end function
public static double code(double eh, double ew, double t) {
return -ew;
}
def code(eh, ew, t): return -ew
function code(eh, ew, t) return Float64(-ew) end
function tmp = code(eh, ew, t) tmp = -ew; end
code[eh_, ew_, t_] := (-ew)
\begin{array}{l}
\\
-ew
\end{array}
Initial program 99.8%
sub-neg99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
cancel-sign-sub99.8%
associate-/l*99.8%
Simplified99.8%
Applied egg-rr49.7%
neg-sub049.7%
associate-*r/49.7%
Simplified49.7%
Taylor expanded in t around 0 21.2%
neg-mul-121.2%
Simplified21.2%
herbie shell --seed 2024132
(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)))))))