
(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)) (- 0.0 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)) / (0.0 - 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)) / (0.0d0 - 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)) / (0.0 - 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)) / (0.0 - 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(eh * tan(t)) / Float64(0.0 - 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)) / (0.0 - 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] / N[(0.0 - ew), $MachinePrecision]), $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{eh \cdot \tan t}{0 - 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}
Initial program 99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (- (* (* ew (cos t)) (cos (atan (/ (* eh (tan t)) (- 0.0 ew))))) (* (* eh (sin t)) (sin (atan (/ (* t (- 0.0 eh)) ew)))))))
double code(double eh, double ew, double t) {
return fabs((((ew * cos(t)) * cos(atan(((eh * tan(t)) / (0.0 - ew))))) - ((eh * sin(t)) * sin(atan(((t * (0.0 - eh)) / ew))))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((((ew * cos(t)) * cos(atan(((eh * tan(t)) / (0.0d0 - ew))))) - ((eh * sin(t)) * sin(atan(((t * (0.0d0 - eh)) / ew))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((((ew * Math.cos(t)) * Math.cos(Math.atan(((eh * Math.tan(t)) / (0.0 - ew))))) - ((eh * Math.sin(t)) * Math.sin(Math.atan(((t * (0.0 - eh)) / ew))))));
}
def code(eh, ew, t): return math.fabs((((ew * math.cos(t)) * math.cos(math.atan(((eh * math.tan(t)) / (0.0 - ew))))) - ((eh * math.sin(t)) * math.sin(math.atan(((t * (0.0 - eh)) / ew))))))
function code(eh, ew, t) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(eh * tan(t)) / Float64(0.0 - ew))))) - Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(t * Float64(0.0 - eh)) / ew)))))) end
function tmp = code(eh, ew, t) tmp = abs((((ew * cos(t)) * cos(atan(((eh * tan(t)) / (0.0 - ew))))) - ((eh * sin(t)) * sin(atan(((t * (0.0 - eh)) / ew)))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / N[(0.0 - ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(t * N[(0.0 - eh), $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot \tan t}{0 - ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(0 - eh\right)}{ew}\right)\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
Simplified99.5%
Final simplification99.5%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (tan t))))
(fabs
(-
(/ (* ew (cos t)) (hypot 1.0 (/ t_1 ew)))
(* (* eh (sin t)) (sin (atan (/ t_1 (- 0.0 ew)))))))))
double code(double eh, double ew, double t) {
double t_1 = eh * tan(t);
return fabs((((ew * cos(t)) / hypot(1.0, (t_1 / ew))) - ((eh * sin(t)) * sin(atan((t_1 / (0.0 - ew)))))));
}
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.tan(t);
return Math.abs((((ew * Math.cos(t)) / Math.hypot(1.0, (t_1 / ew))) - ((eh * Math.sin(t)) * Math.sin(Math.atan((t_1 / (0.0 - ew)))))));
}
def code(eh, ew, t): t_1 = eh * math.tan(t) return math.fabs((((ew * math.cos(t)) / math.hypot(1.0, (t_1 / ew))) - ((eh * math.sin(t)) * math.sin(math.atan((t_1 / (0.0 - ew)))))))
function code(eh, ew, t) t_1 = Float64(eh * tan(t)) return abs(Float64(Float64(Float64(ew * cos(t)) / hypot(1.0, Float64(t_1 / ew))) - Float64(Float64(eh * sin(t)) * sin(atan(Float64(t_1 / Float64(0.0 - ew))))))) end
function tmp = code(eh, ew, t) t_1 = eh * tan(t); tmp = abs((((ew * cos(t)) / hypot(1.0, (t_1 / ew))) - ((eh * sin(t)) * sin(atan((t_1 / (0.0 - ew))))))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(t$95$1 / ew), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(t$95$1 / N[(0.0 - ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \tan t\\
\left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \frac{t\_1}{ew}\right)} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t\_1}{0 - ew}\right)\right|
\end{array}
\end{array}
Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
associate-*r*N/A
unpow-1N/A
un-div-invN/A
unpow-1N/A
times-fracN/A
*-rgt-identityN/A
pow-prod-upN/A
metadata-evalN/A
pow2N/A
metadata-evalN/A
pow1/2N/A
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (tan t))))
(fabs
(-
(/ ew (/ (hypot 1.0 (/ t_1 ew)) (cos t)))
(* (* eh (sin t)) (sin (atan (/ t_1 (- 0.0 ew)))))))))
double code(double eh, double ew, double t) {
double t_1 = eh * tan(t);
return fabs(((ew / (hypot(1.0, (t_1 / ew)) / cos(t))) - ((eh * sin(t)) * sin(atan((t_1 / (0.0 - ew)))))));
}
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.tan(t);
return Math.abs(((ew / (Math.hypot(1.0, (t_1 / ew)) / Math.cos(t))) - ((eh * Math.sin(t)) * Math.sin(Math.atan((t_1 / (0.0 - ew)))))));
}
def code(eh, ew, t): t_1 = eh * math.tan(t) return math.fabs(((ew / (math.hypot(1.0, (t_1 / ew)) / math.cos(t))) - ((eh * math.sin(t)) * math.sin(math.atan((t_1 / (0.0 - ew)))))))
function code(eh, ew, t) t_1 = Float64(eh * tan(t)) return abs(Float64(Float64(ew / Float64(hypot(1.0, Float64(t_1 / ew)) / cos(t))) - Float64(Float64(eh * sin(t)) * sin(atan(Float64(t_1 / Float64(0.0 - ew))))))) end
function tmp = code(eh, ew, t) t_1 = eh * tan(t); tmp = abs(((ew / (hypot(1.0, (t_1 / ew)) / cos(t))) - ((eh * sin(t)) * sin(atan((t_1 / (0.0 - ew))))))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision]}, N[Abs[N[(N[(ew / N[(N[Sqrt[1.0 ^ 2 + N[(t$95$1 / ew), $MachinePrecision] ^ 2], $MachinePrecision] / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(t$95$1 / N[(0.0 - ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \tan t\\
\left|\frac{ew}{\frac{\mathsf{hypot}\left(1, \frac{t\_1}{ew}\right)}{\cos t}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{t\_1}{0 - ew}\right)\right|
\end{array}
\end{array}
Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
associate-*r*N/A
unpow-1N/A
un-div-invN/A
unpow-1N/A
times-fracN/A
*-rgt-identityN/A
pow-prod-upN/A
metadata-evalN/A
pow2N/A
metadata-evalN/A
pow1/2N/A
Applied egg-rr99.8%
clear-numN/A
inv-powN/A
associate-/r*N/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
Applied egg-rr99.7%
unpow-1N/A
remove-double-divN/A
associate-*l/N/A
clear-numN/A
associate-/r/N/A
frac-timesN/A
clear-numN/A
un-div-invN/A
remove-double-divN/A
/-lowering-/.f64N/A
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sin (atan (/ (* eh (tan t)) (- 0.0 ew)))))
(t_2 (* (* eh (sin t)) t_1)))
(if (<= ew -1.75e-195)
(fabs (* ew (- (cos t) (* (sin t) (/ (* eh t_1) ew)))))
(if (<= ew 7.6e-199) (fabs t_2) (fabs (* ew (- (cos t) (/ t_2 ew))))))))
double code(double eh, double ew, double t) {
double t_1 = sin(atan(((eh * tan(t)) / (0.0 - ew))));
double t_2 = (eh * sin(t)) * t_1;
double tmp;
if (ew <= -1.75e-195) {
tmp = fabs((ew * (cos(t) - (sin(t) * ((eh * t_1) / ew)))));
} else if (ew <= 7.6e-199) {
tmp = fabs(t_2);
} else {
tmp = fabs((ew * (cos(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) :: tmp
t_1 = sin(atan(((eh * tan(t)) / (0.0d0 - ew))))
t_2 = (eh * sin(t)) * t_1
if (ew <= (-1.75d-195)) then
tmp = abs((ew * (cos(t) - (sin(t) * ((eh * t_1) / ew)))))
else if (ew <= 7.6d-199) then
tmp = abs(t_2)
else
tmp = abs((ew * (cos(t) - (t_2 / 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)) / (0.0 - ew))));
double t_2 = (eh * Math.sin(t)) * t_1;
double tmp;
if (ew <= -1.75e-195) {
tmp = Math.abs((ew * (Math.cos(t) - (Math.sin(t) * ((eh * t_1) / ew)))));
} else if (ew <= 7.6e-199) {
tmp = Math.abs(t_2);
} else {
tmp = Math.abs((ew * (Math.cos(t) - (t_2 / ew))));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.sin(math.atan(((eh * math.tan(t)) / (0.0 - ew)))) t_2 = (eh * math.sin(t)) * t_1 tmp = 0 if ew <= -1.75e-195: tmp = math.fabs((ew * (math.cos(t) - (math.sin(t) * ((eh * t_1) / ew))))) elif ew <= 7.6e-199: tmp = math.fabs(t_2) else: tmp = math.fabs((ew * (math.cos(t) - (t_2 / ew)))) return tmp
function code(eh, ew, t) t_1 = sin(atan(Float64(Float64(eh * tan(t)) / Float64(0.0 - ew)))) t_2 = Float64(Float64(eh * sin(t)) * t_1) tmp = 0.0 if (ew <= -1.75e-195) tmp = abs(Float64(ew * Float64(cos(t) - Float64(sin(t) * Float64(Float64(eh * t_1) / ew))))); elseif (ew <= 7.6e-199) tmp = abs(t_2); else tmp = abs(Float64(ew * Float64(cos(t) - Float64(t_2 / ew)))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = sin(atan(((eh * tan(t)) / (0.0 - ew)))); t_2 = (eh * sin(t)) * t_1; tmp = 0.0; if (ew <= -1.75e-195) tmp = abs((ew * (cos(t) - (sin(t) * ((eh * t_1) / ew))))); elseif (ew <= 7.6e-199) tmp = abs(t_2); else tmp = abs((ew * (cos(t) - (t_2 / ew)))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / N[(0.0 - ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[ew, -1.75e-195], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[(N[(eh * t$95$1), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 7.6e-199], N[Abs[t$95$2], $MachinePrecision], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] - N[(t$95$2 / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{0 - ew}\right)\\
t_2 := \left(eh \cdot \sin t\right) \cdot t\_1\\
\mathbf{if}\;ew \leq -1.75 \cdot 10^{-195}:\\
\;\;\;\;\left|ew \cdot \left(\cos t - \sin t \cdot \frac{eh \cdot t\_1}{ew}\right)\right|\\
\mathbf{elif}\;ew \leq 7.6 \cdot 10^{-199}:\\
\;\;\;\;\left|t\_2\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \left(\cos t - \frac{t\_2}{ew}\right)\right|\\
\end{array}
\end{array}
if ew < -1.75000000000000007e-195Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.9%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
Simplified95.9%
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr95.9%
if -1.75000000000000007e-195 < ew < 7.5999999999999996e-199Initial program 99.9%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.9%
Taylor expanded in ew around 0
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
mul-1-negN/A
neg-lowering-neg.f6484.2%
Simplified84.2%
if 7.5999999999999996e-199 < ew Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
Simplified97.4%
Final simplification93.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (* eh (sin t)) (sin (atan (/ (* eh (tan t)) (- 0.0 ew))))))
(t_2 (fabs (* ew (- (cos t) (/ t_1 ew))))))
(if (<= ew -5.6e-196) t_2 (if (<= ew 2.9e-200) (fabs t_1) t_2))))
double code(double eh, double ew, double t) {
double t_1 = (eh * sin(t)) * sin(atan(((eh * tan(t)) / (0.0 - ew))));
double t_2 = fabs((ew * (cos(t) - (t_1 / ew))));
double tmp;
if (ew <= -5.6e-196) {
tmp = t_2;
} else if (ew <= 2.9e-200) {
tmp = fabs(t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (eh * sin(t)) * sin(atan(((eh * tan(t)) / (0.0d0 - ew))))
t_2 = abs((ew * (cos(t) - (t_1 / ew))))
if (ew <= (-5.6d-196)) then
tmp = t_2
else if (ew <= 2.9d-200) then
tmp = abs(t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = (eh * Math.sin(t)) * Math.sin(Math.atan(((eh * Math.tan(t)) / (0.0 - ew))));
double t_2 = Math.abs((ew * (Math.cos(t) - (t_1 / ew))));
double tmp;
if (ew <= -5.6e-196) {
tmp = t_2;
} else if (ew <= 2.9e-200) {
tmp = Math.abs(t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = (eh * math.sin(t)) * math.sin(math.atan(((eh * math.tan(t)) / (0.0 - ew)))) t_2 = math.fabs((ew * (math.cos(t) - (t_1 / ew)))) tmp = 0 if ew <= -5.6e-196: tmp = t_2 elif ew <= 2.9e-200: tmp = math.fabs(t_1) else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * tan(t)) / Float64(0.0 - ew))))) t_2 = abs(Float64(ew * Float64(cos(t) - Float64(t_1 / ew)))) tmp = 0.0 if (ew <= -5.6e-196) tmp = t_2; elseif (ew <= 2.9e-200) tmp = abs(t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = (eh * sin(t)) * sin(atan(((eh * tan(t)) / (0.0 - ew)))); t_2 = abs((ew * (cos(t) - (t_1 / ew)))); tmp = 0.0; if (ew <= -5.6e-196) tmp = t_2; elseif (ew <= 2.9e-200) tmp = abs(t_1); else tmp = t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / N[(0.0 - ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] - N[(t$95$1 / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -5.6e-196], t$95$2, If[LessEqual[ew, 2.9e-200], N[Abs[t$95$1], $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{0 - ew}\right)\\
t_2 := \left|ew \cdot \left(\cos t - \frac{t\_1}{ew}\right)\right|\\
\mathbf{if}\;ew \leq -5.6 \cdot 10^{-196}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;ew \leq 2.9 \cdot 10^{-200}:\\
\;\;\;\;\left|t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if ew < -5.5999999999999997e-196 or 2.9e-200 < ew Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
Simplified96.6%
if -5.5999999999999997e-196 < ew < 2.9e-200Initial program 99.9%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.9%
Taylor expanded in ew around 0
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
mul-1-negN/A
neg-lowering-neg.f6484.2%
Simplified84.2%
Final simplification93.7%
(FPCore (eh ew t) :precision binary64 (fabs (- (/ 1.0 (/ (/ 1.0 ew) (cos t))) (* (* eh (sin t)) (sin (atan (/ (* eh (tan t)) (- 0.0 ew))))))))
double code(double eh, double ew, double t) {
return fabs(((1.0 / ((1.0 / ew) / cos(t))) - ((eh * sin(t)) * sin(atan(((eh * tan(t)) / (0.0 - 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(((1.0d0 / ((1.0d0 / ew) / cos(t))) - ((eh * sin(t)) * sin(atan(((eh * tan(t)) / (0.0d0 - ew)))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((1.0 / ((1.0 / ew) / Math.cos(t))) - ((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * Math.tan(t)) / (0.0 - ew)))))));
}
def code(eh, ew, t): return math.fabs(((1.0 / ((1.0 / ew) / math.cos(t))) - ((eh * math.sin(t)) * math.sin(math.atan(((eh * math.tan(t)) / (0.0 - ew)))))))
function code(eh, ew, t) return abs(Float64(Float64(1.0 / Float64(Float64(1.0 / ew) / cos(t))) - Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * tan(t)) / Float64(0.0 - ew))))))) end
function tmp = code(eh, ew, t) tmp = abs(((1.0 / ((1.0 / ew) / cos(t))) - ((eh * sin(t)) * sin(atan(((eh * tan(t)) / (0.0 - ew))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(1.0 / N[(N[(1.0 / ew), $MachinePrecision] / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / N[(0.0 - ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{1}{\frac{\frac{1}{ew}}{\cos t}} - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{0 - ew}\right)\right|
\end{array}
Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
associate-*r*N/A
unpow-1N/A
un-div-invN/A
unpow-1N/A
times-fracN/A
*-rgt-identityN/A
pow-prod-upN/A
metadata-evalN/A
pow2N/A
metadata-evalN/A
pow1/2N/A
Applied egg-rr99.7%
Taylor expanded in eh around 0
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f6498.7%
Simplified98.7%
Final simplification98.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sin (atan (/ (* t (- 0.0 eh)) ew)))) (t_2 (* eh (sin t))))
(if (<= ew -1.4e-194)
(fabs (* ew (- (cos t) (* (sin t) (/ (* eh t_1) ew)))))
(if (<= ew 2.55e-200)
(fabs (* t_2 (sin (atan (/ (* eh (tan t)) (- 0.0 ew))))))
(fabs (* ew (- (cos t) (/ (* t_2 t_1) ew))))))))
double code(double eh, double ew, double t) {
double t_1 = sin(atan(((t * (0.0 - eh)) / ew)));
double t_2 = eh * sin(t);
double tmp;
if (ew <= -1.4e-194) {
tmp = fabs((ew * (cos(t) - (sin(t) * ((eh * t_1) / ew)))));
} else if (ew <= 2.55e-200) {
tmp = fabs((t_2 * sin(atan(((eh * tan(t)) / (0.0 - ew))))));
} else {
tmp = fabs((ew * (cos(t) - ((t_2 * 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) :: t_2
real(8) :: tmp
t_1 = sin(atan(((t * (0.0d0 - eh)) / ew)))
t_2 = eh * sin(t)
if (ew <= (-1.4d-194)) then
tmp = abs((ew * (cos(t) - (sin(t) * ((eh * t_1) / ew)))))
else if (ew <= 2.55d-200) then
tmp = abs((t_2 * sin(atan(((eh * tan(t)) / (0.0d0 - ew))))))
else
tmp = abs((ew * (cos(t) - ((t_2 * 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(((t * (0.0 - eh)) / ew)));
double t_2 = eh * Math.sin(t);
double tmp;
if (ew <= -1.4e-194) {
tmp = Math.abs((ew * (Math.cos(t) - (Math.sin(t) * ((eh * t_1) / ew)))));
} else if (ew <= 2.55e-200) {
tmp = Math.abs((t_2 * Math.sin(Math.atan(((eh * Math.tan(t)) / (0.0 - ew))))));
} else {
tmp = Math.abs((ew * (Math.cos(t) - ((t_2 * t_1) / ew))));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.sin(math.atan(((t * (0.0 - eh)) / ew))) t_2 = eh * math.sin(t) tmp = 0 if ew <= -1.4e-194: tmp = math.fabs((ew * (math.cos(t) - (math.sin(t) * ((eh * t_1) / ew))))) elif ew <= 2.55e-200: tmp = math.fabs((t_2 * math.sin(math.atan(((eh * math.tan(t)) / (0.0 - ew)))))) else: tmp = math.fabs((ew * (math.cos(t) - ((t_2 * t_1) / ew)))) return tmp
function code(eh, ew, t) t_1 = sin(atan(Float64(Float64(t * Float64(0.0 - eh)) / ew))) t_2 = Float64(eh * sin(t)) tmp = 0.0 if (ew <= -1.4e-194) tmp = abs(Float64(ew * Float64(cos(t) - Float64(sin(t) * Float64(Float64(eh * t_1) / ew))))); elseif (ew <= 2.55e-200) tmp = abs(Float64(t_2 * sin(atan(Float64(Float64(eh * tan(t)) / Float64(0.0 - ew)))))); else tmp = abs(Float64(ew * Float64(cos(t) - Float64(Float64(t_2 * t_1) / ew)))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = sin(atan(((t * (0.0 - eh)) / ew))); t_2 = eh * sin(t); tmp = 0.0; if (ew <= -1.4e-194) tmp = abs((ew * (cos(t) - (sin(t) * ((eh * t_1) / ew))))); elseif (ew <= 2.55e-200) tmp = abs((t_2 * sin(atan(((eh * tan(t)) / (0.0 - ew)))))); else tmp = abs((ew * (cos(t) - ((t_2 * t_1) / ew)))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Sin[N[ArcTan[N[(N[(t * N[(0.0 - eh), $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -1.4e-194], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[(N[(eh * t$95$1), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 2.55e-200], N[Abs[N[(t$95$2 * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / N[(0.0 - ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] - N[(N[(t$95$2 * t$95$1), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin \tan^{-1} \left(\frac{t \cdot \left(0 - eh\right)}{ew}\right)\\
t_2 := eh \cdot \sin t\\
\mathbf{if}\;ew \leq -1.4 \cdot 10^{-194}:\\
\;\;\;\;\left|ew \cdot \left(\cos t - \sin t \cdot \frac{eh \cdot t\_1}{ew}\right)\right|\\
\mathbf{elif}\;ew \leq 2.55 \cdot 10^{-200}:\\
\;\;\;\;\left|t\_2 \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{0 - ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \left(\cos t - \frac{t\_2 \cdot t\_1}{ew}\right)\right|\\
\end{array}
\end{array}
if ew < -1.40000000000000006e-194Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.9%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
Simplified95.9%
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr95.9%
Taylor expanded in t around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6495.6%
Simplified95.6%
if -1.40000000000000006e-194 < ew < 2.5499999999999999e-200Initial program 99.9%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.9%
Taylor expanded in ew around 0
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
mul-1-negN/A
neg-lowering-neg.f6484.2%
Simplified84.2%
if 2.5499999999999999e-200 < ew Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
Simplified97.4%
Taylor expanded in t around 0
*-commutativeN/A
*-lowering-*.f6497.0%
Simplified97.0%
Final simplification93.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t)))
(t_2
(fabs
(*
ew
(- (cos t) (/ (* t_1 (sin (atan (/ (* t (- 0.0 eh)) ew)))) ew))))))
(if (<= ew -1.4e-195)
t_2
(if (<= ew 1.9e-198)
(fabs (* t_1 (sin (atan (/ (* eh (tan t)) (- 0.0 ew))))))
t_2))))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double t_2 = fabs((ew * (cos(t) - ((t_1 * sin(atan(((t * (0.0 - eh)) / ew)))) / ew))));
double tmp;
if (ew <= -1.4e-195) {
tmp = t_2;
} else if (ew <= 1.9e-198) {
tmp = fabs((t_1 * sin(atan(((eh * tan(t)) / (0.0 - ew))))));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = eh * sin(t)
t_2 = abs((ew * (cos(t) - ((t_1 * sin(atan(((t * (0.0d0 - eh)) / ew)))) / ew))))
if (ew <= (-1.4d-195)) then
tmp = t_2
else if (ew <= 1.9d-198) then
tmp = abs((t_1 * sin(atan(((eh * tan(t)) / (0.0d0 - ew))))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.sin(t);
double t_2 = Math.abs((ew * (Math.cos(t) - ((t_1 * Math.sin(Math.atan(((t * (0.0 - eh)) / ew)))) / ew))));
double tmp;
if (ew <= -1.4e-195) {
tmp = t_2;
} else if (ew <= 1.9e-198) {
tmp = Math.abs((t_1 * Math.sin(Math.atan(((eh * Math.tan(t)) / (0.0 - ew))))));
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.sin(t) t_2 = math.fabs((ew * (math.cos(t) - ((t_1 * math.sin(math.atan(((t * (0.0 - eh)) / ew)))) / ew)))) tmp = 0 if ew <= -1.4e-195: tmp = t_2 elif ew <= 1.9e-198: tmp = math.fabs((t_1 * math.sin(math.atan(((eh * math.tan(t)) / (0.0 - ew)))))) else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) t_2 = abs(Float64(ew * Float64(cos(t) - Float64(Float64(t_1 * sin(atan(Float64(Float64(t * Float64(0.0 - eh)) / ew)))) / ew)))) tmp = 0.0 if (ew <= -1.4e-195) tmp = t_2; elseif (ew <= 1.9e-198) tmp = abs(Float64(t_1 * sin(atan(Float64(Float64(eh * tan(t)) / Float64(0.0 - ew)))))); else tmp = t_2; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * sin(t); t_2 = abs((ew * (cos(t) - ((t_1 * sin(atan(((t * (0.0 - eh)) / ew)))) / ew)))); tmp = 0.0; if (ew <= -1.4e-195) tmp = t_2; elseif (ew <= 1.9e-198) tmp = abs((t_1 * sin(atan(((eh * tan(t)) / (0.0 - ew)))))); else tmp = t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] - N[(N[(t$95$1 * N[Sin[N[ArcTan[N[(N[(t * N[(0.0 - eh), $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -1.4e-195], t$95$2, If[LessEqual[ew, 1.9e-198], N[Abs[N[(t$95$1 * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / N[(0.0 - ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
t_2 := \left|ew \cdot \left(\cos t - \frac{t\_1 \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(0 - eh\right)}{ew}\right)}{ew}\right)\right|\\
\mathbf{if}\;ew \leq -1.4 \cdot 10^{-195}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;ew \leq 1.9 \cdot 10^{-198}:\\
\;\;\;\;\left|t\_1 \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{0 - ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if ew < -1.40000000000000002e-195 or 1.9000000000000001e-198 < ew Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
Simplified96.6%
Taylor expanded in t around 0
*-commutativeN/A
*-lowering-*.f6496.2%
Simplified96.2%
if -1.40000000000000002e-195 < ew < 1.9000000000000001e-198Initial program 99.9%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.9%
Taylor expanded in ew around 0
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
mul-1-negN/A
neg-lowering-neg.f6484.2%
Simplified84.2%
Final simplification93.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (* ew (cos t)))))
(if (<= ew -54000.0)
t_1
(if (<= ew 2.7e-102)
(fabs (* (* eh (sin t)) (sin (atan (/ (* eh (tan t)) (- 0.0 ew))))))
t_1))))
double code(double eh, double ew, double t) {
double t_1 = fabs((ew * cos(t)));
double tmp;
if (ew <= -54000.0) {
tmp = t_1;
} else if (ew <= 2.7e-102) {
tmp = fabs(((eh * sin(t)) * sin(atan(((eh * tan(t)) / (0.0 - ew))))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = abs((ew * cos(t)))
if (ew <= (-54000.0d0)) then
tmp = t_1
else if (ew <= 2.7d-102) then
tmp = abs(((eh * sin(t)) * sin(atan(((eh * tan(t)) / (0.0d0 - ew))))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs((ew * Math.cos(t)));
double tmp;
if (ew <= -54000.0) {
tmp = t_1;
} else if (ew <= 2.7e-102) {
tmp = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * Math.tan(t)) / (0.0 - ew))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs((ew * math.cos(t))) tmp = 0 if ew <= -54000.0: tmp = t_1 elif ew <= 2.7e-102: tmp = math.fabs(((eh * math.sin(t)) * math.sin(math.atan(((eh * math.tan(t)) / (0.0 - ew)))))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(ew * cos(t))) tmp = 0.0 if (ew <= -54000.0) tmp = t_1; elseif (ew <= 2.7e-102) tmp = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * tan(t)) / Float64(0.0 - ew)))))); 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 (ew <= -54000.0) tmp = t_1; elseif (ew <= 2.7e-102) tmp = abs(((eh * sin(t)) * sin(atan(((eh * tan(t)) / (0.0 - ew)))))); 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[ew, -54000.0], t$95$1, If[LessEqual[ew, 2.7e-102], N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / N[(0.0 - ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|ew \cdot \cos t\right|\\
\mathbf{if}\;ew \leq -54000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq 2.7 \cdot 10^{-102}:\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{0 - ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if ew < -54000 or 2.7e-102 < ew Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f6488.3%
Simplified88.3%
if -54000 < ew < 2.7e-102Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around 0
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
mul-1-negN/A
neg-lowering-neg.f6471.4%
Simplified71.4%
Final simplification80.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (* ew (cos t)))))
(if (<= t -0.0078)
t_1
(if (<= t 0.0085)
(fabs
(+
ew
(*
t
(-
(* t (* ew -0.5))
(* eh (sin (atan (/ (* eh (tan t)) (- 0.0 ew)))))))))
t_1))))
double code(double eh, double ew, double t) {
double t_1 = fabs((ew * cos(t)));
double tmp;
if (t <= -0.0078) {
tmp = t_1;
} else if (t <= 0.0085) {
tmp = fabs((ew + (t * ((t * (ew * -0.5)) - (eh * sin(atan(((eh * tan(t)) / (0.0 - ew)))))))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = abs((ew * cos(t)))
if (t <= (-0.0078d0)) then
tmp = t_1
else if (t <= 0.0085d0) then
tmp = abs((ew + (t * ((t * (ew * (-0.5d0))) - (eh * sin(atan(((eh * tan(t)) / (0.0d0 - ew)))))))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs((ew * Math.cos(t)));
double tmp;
if (t <= -0.0078) {
tmp = t_1;
} else if (t <= 0.0085) {
tmp = Math.abs((ew + (t * ((t * (ew * -0.5)) - (eh * Math.sin(Math.atan(((eh * Math.tan(t)) / (0.0 - ew)))))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs((ew * math.cos(t))) tmp = 0 if t <= -0.0078: tmp = t_1 elif t <= 0.0085: tmp = math.fabs((ew + (t * ((t * (ew * -0.5)) - (eh * math.sin(math.atan(((eh * math.tan(t)) / (0.0 - ew))))))))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(ew * cos(t))) tmp = 0.0 if (t <= -0.0078) tmp = t_1; elseif (t <= 0.0085) tmp = abs(Float64(ew + Float64(t * Float64(Float64(t * Float64(ew * -0.5)) - Float64(eh * sin(atan(Float64(Float64(eh * tan(t)) / Float64(0.0 - ew))))))))); 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 <= -0.0078) tmp = t_1; elseif (t <= 0.0085) tmp = abs((ew + (t * ((t * (ew * -0.5)) - (eh * sin(atan(((eh * tan(t)) / (0.0 - ew))))))))); 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, -0.0078], t$95$1, If[LessEqual[t, 0.0085], N[Abs[N[(ew + N[(t * N[(N[(t * N[(ew * -0.5), $MachinePrecision]), $MachinePrecision] - N[(eh * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / N[(0.0 - ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $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 -0.0078:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.0085:\\
\;\;\;\;\left|ew + t \cdot \left(t \cdot \left(ew \cdot -0.5\right) - eh \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{0 - ew}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.0077999999999999996 or 0.0085000000000000006 < t Initial program 99.7%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.7%
Taylor expanded in ew around inf
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f6451.6%
Simplified51.6%
if -0.0077999999999999996 < t < 0.0085000000000000006Initial program 100.0%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr100.0%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
Simplified95.8%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
Simplified97.5%
Final simplification74.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (* ew (cos t)))))
(if (<= t -0.005)
t_1
(if (<= t 0.000118)
(fabs (- ew (* (* t eh) (sin (atan (/ (* t (- 0.0 eh)) ew))))))
t_1))))
double code(double eh, double ew, double t) {
double t_1 = fabs((ew * cos(t)));
double tmp;
if (t <= -0.005) {
tmp = t_1;
} else if (t <= 0.000118) {
tmp = fabs((ew - ((t * eh) * sin(atan(((t * (0.0 - eh)) / ew))))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = abs((ew * cos(t)))
if (t <= (-0.005d0)) then
tmp = t_1
else if (t <= 0.000118d0) then
tmp = abs((ew - ((t * eh) * sin(atan(((t * (0.0d0 - eh)) / ew))))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs((ew * Math.cos(t)));
double tmp;
if (t <= -0.005) {
tmp = t_1;
} else if (t <= 0.000118) {
tmp = Math.abs((ew - ((t * eh) * Math.sin(Math.atan(((t * (0.0 - eh)) / ew))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs((ew * math.cos(t))) tmp = 0 if t <= -0.005: tmp = t_1 elif t <= 0.000118: tmp = math.fabs((ew - ((t * eh) * math.sin(math.atan(((t * (0.0 - eh)) / ew)))))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(ew * cos(t))) tmp = 0.0 if (t <= -0.005) tmp = t_1; elseif (t <= 0.000118) tmp = abs(Float64(ew - Float64(Float64(t * eh) * sin(atan(Float64(Float64(t * Float64(0.0 - eh)) / ew)))))); 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 <= -0.005) tmp = t_1; elseif (t <= 0.000118) tmp = abs((ew - ((t * eh) * sin(atan(((t * (0.0 - eh)) / ew)))))); 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, -0.005], t$95$1, If[LessEqual[t, 0.000118], N[Abs[N[(ew - N[(N[(t * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(t * N[(0.0 - eh), $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $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 -0.005:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.000118:\\
\;\;\;\;\left|ew - \left(t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{t \cdot \left(0 - eh\right)}{ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.0050000000000000001 or 1.18e-4 < t Initial program 99.7%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.7%
Taylor expanded in ew around inf
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f6451.6%
Simplified51.6%
if -0.0050000000000000001 < t < 1.18e-4Initial program 100.0%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr100.0%
Taylor expanded in t around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
mul-1-negN/A
neg-lowering-neg.f6497.3%
Simplified97.3%
Taylor expanded in t around 0
*-commutativeN/A
*-lowering-*.f6497.3%
Simplified97.3%
Final simplification74.3%
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (fabs (* ew (cos t))))) (if (<= t -0.0009) t_1 (if (<= t 0.0022) (fabs (- (* t eh) ew)) t_1))))
double code(double eh, double ew, double t) {
double t_1 = fabs((ew * cos(t)));
double tmp;
if (t <= -0.0009) {
tmp = t_1;
} else if (t <= 0.0022) {
tmp = fabs(((t * eh) - ew));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = abs((ew * cos(t)))
if (t <= (-0.0009d0)) then
tmp = t_1
else if (t <= 0.0022d0) then
tmp = abs(((t * eh) - ew))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs((ew * Math.cos(t)));
double tmp;
if (t <= -0.0009) {
tmp = t_1;
} else if (t <= 0.0022) {
tmp = Math.abs(((t * eh) - ew));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs((ew * math.cos(t))) tmp = 0 if t <= -0.0009: tmp = t_1 elif t <= 0.0022: tmp = math.fabs(((t * eh) - ew)) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(ew * cos(t))) tmp = 0.0 if (t <= -0.0009) tmp = t_1; elseif (t <= 0.0022) tmp = abs(Float64(Float64(t * eh) - ew)); 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 <= -0.0009) tmp = t_1; elseif (t <= 0.0022) tmp = abs(((t * eh) - ew)); 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, -0.0009], t$95$1, If[LessEqual[t, 0.0022], N[Abs[N[(N[(t * eh), $MachinePrecision] - ew), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|ew \cdot \cos t\right|\\
\mathbf{if}\;t \leq -0.0009:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.0022:\\
\;\;\;\;\left|t \cdot eh - ew\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.9999999999999998e-4 or 0.00220000000000000013 < t Initial program 99.7%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.7%
Taylor expanded in ew around inf
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f6451.6%
Simplified51.6%
if -8.9999999999999998e-4 < t < 0.00220000000000000013Initial program 100.0%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr100.0%
Taylor expanded in t around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
mul-1-negN/A
neg-lowering-neg.f6497.3%
Simplified97.3%
frac-2negN/A
distribute-lft-neg-outN/A
remove-double-negN/A
sin-atanN/A
associate-/l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-commutativeN/A
Applied egg-rr95.1%
Taylor expanded in eh around -inf
*-commutativeN/A
*-lowering-*.f6496.6%
Simplified96.6%
Final simplification73.9%
(FPCore (eh ew t) :precision binary64 (if (<= ew -5.2e-195) (fabs ew) (if (<= ew 1.5e-262) (fabs (* t eh)) (fabs ew))))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= -5.2e-195) {
tmp = fabs(ew);
} else if (ew <= 1.5e-262) {
tmp = fabs((t * eh));
} 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 (ew <= (-5.2d-195)) then
tmp = abs(ew)
else if (ew <= 1.5d-262) then
tmp = abs((t * eh))
else
tmp = abs(ew)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (ew <= -5.2e-195) {
tmp = Math.abs(ew);
} else if (ew <= 1.5e-262) {
tmp = Math.abs((t * eh));
} else {
tmp = Math.abs(ew);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if ew <= -5.2e-195: tmp = math.fabs(ew) elif ew <= 1.5e-262: tmp = math.fabs((t * eh)) else: tmp = math.fabs(ew) return tmp
function code(eh, ew, t) tmp = 0.0 if (ew <= -5.2e-195) tmp = abs(ew); elseif (ew <= 1.5e-262) tmp = abs(Float64(t * eh)); else tmp = abs(ew); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (ew <= -5.2e-195) tmp = abs(ew); elseif (ew <= 1.5e-262) tmp = abs((t * eh)); else tmp = abs(ew); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[ew, -5.2e-195], N[Abs[ew], $MachinePrecision], If[LessEqual[ew, 1.5e-262], N[Abs[N[(t * eh), $MachinePrecision]], $MachinePrecision], N[Abs[ew], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -5.2 \cdot 10^{-195}:\\
\;\;\;\;\left|ew\right|\\
\mathbf{elif}\;ew \leq 1.5 \cdot 10^{-262}:\\
\;\;\;\;\left|t \cdot eh\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew\right|\\
\end{array}
\end{array}
if ew < -5.2000000000000003e-195 or 1.50000000000000009e-262 < ew Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
Taylor expanded in t around 0
Simplified50.2%
if -5.2000000000000003e-195 < ew < 1.50000000000000009e-262Initial program 99.9%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.9%
Taylor expanded in t around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
mul-1-negN/A
neg-lowering-neg.f6438.0%
Simplified38.0%
frac-2negN/A
distribute-lft-neg-outN/A
remove-double-negN/A
sin-atanN/A
associate-/l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-commutativeN/A
Applied egg-rr32.4%
Taylor expanded in ew around 0
*-commutativeN/A
*-lowering-*.f6432.7%
Simplified32.7%
(FPCore (eh ew t) :precision binary64 (fabs (- (* t eh) ew)))
double code(double eh, double ew, double t) {
return fabs(((t * eh) - ew));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs(((t * eh) - ew))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((t * eh) - ew));
}
def code(eh, ew, t): return math.fabs(((t * eh) - ew))
function code(eh, ew, t) return abs(Float64(Float64(t * eh) - ew)) end
function tmp = code(eh, ew, t) tmp = abs(((t * eh) - ew)); end
code[eh_, ew_, t_] := N[Abs[N[(N[(t * eh), $MachinePrecision] - ew), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|t \cdot eh - ew\right|
\end{array}
Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
Taylor expanded in t around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
mul-1-negN/A
neg-lowering-neg.f6454.0%
Simplified54.0%
frac-2negN/A
distribute-lft-neg-outN/A
remove-double-negN/A
sin-atanN/A
associate-/l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-commutativeN/A
Applied egg-rr52.4%
Taylor expanded in eh around -inf
*-commutativeN/A
*-lowering-*.f6453.0%
Simplified53.0%
Final simplification53.0%
(FPCore (eh ew t) :precision binary64 (fabs (+ ew (* t eh))))
double code(double eh, double ew, double t) {
return fabs((ew + (t * eh)));
}
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 + (t * eh)))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew + (t * eh)));
}
def code(eh, ew, t): return math.fabs((ew + (t * eh)))
function code(eh, ew, t) return abs(Float64(ew + Float64(t * eh))) end
function tmp = code(eh, ew, t) tmp = abs((ew + (t * eh))); end
code[eh_, ew_, t_] := N[Abs[N[(ew + N[(t * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew + t \cdot eh\right|
\end{array}
Initial program 99.8%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
Taylor expanded in t around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
mul-1-negN/A
neg-lowering-neg.f6454.0%
Simplified54.0%
frac-2negN/A
distribute-lft-neg-outN/A
remove-double-negN/A
sin-atanN/A
associate-/l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-commutativeN/A
Applied egg-rr52.4%
Taylor expanded in ew around 0
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6453.0%
Simplified53.0%
(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%
cos-atanN/A
inv-powN/A
pow1/2N/A
sqr-powN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
Taylor expanded in t around 0
Simplified43.6%
herbie shell --seed 2024155
(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)))))))