
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (/ eh ew) (tan t))))) (fabs (+ (* (* ew (sin t)) (cos t_1)) (* (* eh (cos t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh / ew) / tan(t)));
return fabs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(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 / ew) / tan(t)))
code = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((eh / ew) / Math.tan(t)));
return Math.abs((((ew * Math.sin(t)) * Math.cos(t_1)) + ((eh * Math.cos(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((eh / ew) / math.tan(t))) return math.fabs((((ew * math.sin(t)) * math.cos(t_1)) + ((eh * math.cos(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh / ew) / tan(t))) return abs(Float64(Float64(Float64(ew * sin(t)) * cos(t_1)) + Float64(Float64(eh * cos(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((eh / ew) / tan(t))); tmp = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\left|\left(ew \cdot \sin t\right) \cdot \cos t\_1 + \left(eh \cdot \cos t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (/ eh ew) (tan t))))) (fabs (+ (* (* ew (sin t)) (cos t_1)) (* (* eh (cos t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh / ew) / tan(t)));
return fabs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(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 / ew) / tan(t)))
code = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((eh / ew) / Math.tan(t)));
return Math.abs((((ew * Math.sin(t)) * Math.cos(t_1)) + ((eh * Math.cos(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((eh / ew) / math.tan(t))) return math.fabs((((ew * math.sin(t)) * math.cos(t_1)) + ((eh * math.cos(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh / ew) / tan(t))) return abs(Float64(Float64(Float64(ew * sin(t)) * cos(t_1)) + Float64(Float64(eh * cos(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((eh / ew) / tan(t))); tmp = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\left|\left(ew \cdot \sin t\right) \cdot \cos t\_1 + \left(eh \cdot \cos t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ eh (* ew (tan t)))))
(fabs
(fma (/ ew (hypot 1.0 t_1)) (sin t) (* eh (* (cos t) (sin (atan t_1))))))))
double code(double eh, double ew, double t) {
double t_1 = eh / (ew * tan(t));
return fabs(fma((ew / hypot(1.0, t_1)), sin(t), (eh * (cos(t) * sin(atan(t_1))))));
}
function code(eh, ew, t) t_1 = Float64(eh / Float64(ew * tan(t))) return abs(fma(Float64(ew / hypot(1.0, t_1)), sin(t), Float64(eh * Float64(cos(t) * sin(atan(t_1)))))) end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[Abs[N[(N[(ew / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] * N[Sin[t], $MachinePrecision] + N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{eh}{ew \cdot \tan t}\\
\left|\mathsf{fma}\left(\frac{ew}{\mathsf{hypot}\left(1, t\_1\right)}, \sin t, eh \cdot \left(\cos t \cdot \sin \tan^{-1} t\_1\right)\right)\right|
\end{array}
\end{array}
Initial program 99.8%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.8%
(FPCore (eh ew t) :precision binary64 (fabs (+ (* ew (/ (sin t) (hypot 1.0 (/ eh (* ew (tan t)))))) (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t))))))))
double code(double eh, double ew, double t) {
return fabs(((ew * (sin(t) / hypot(1.0, (eh / (ew * tan(t)))))) + ((eh * cos(t)) * sin(atan(((eh / ew) / tan(t)))))));
}
public static double code(double eh, double ew, double t) {
return Math.abs(((ew * (Math.sin(t) / Math.hypot(1.0, (eh / (ew * Math.tan(t)))))) + ((eh * Math.cos(t)) * Math.sin(Math.atan(((eh / ew) / Math.tan(t)))))));
}
def code(eh, ew, t): return math.fabs(((ew * (math.sin(t) / math.hypot(1.0, (eh / (ew * math.tan(t)))))) + ((eh * math.cos(t)) * math.sin(math.atan(((eh / ew) / math.tan(t)))))))
function code(eh, ew, t) return abs(Float64(Float64(ew * Float64(sin(t) / hypot(1.0, Float64(eh / Float64(ew * tan(t)))))) + Float64(Float64(eh * cos(t)) * sin(atan(Float64(Float64(eh / ew) / tan(t))))))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * (sin(t) / hypot(1.0, (eh / (ew * tan(t)))))) + ((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Sin[t], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \frac{\sin t}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right|
\end{array}
Initial program 99.8%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-atanN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
hypot-1-defN/A
hypot-lowering-hypot.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
tan-lowering-tan.f6499.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (fma ew (sin t) (/ eh (/ 1.0 (* (cos t) (sin (atan (/ eh (* ew (tan t)))))))))))
double code(double eh, double ew, double t) {
return fabs(fma(ew, sin(t), (eh / (1.0 / (cos(t) * sin(atan((eh / (ew * tan(t))))))))));
}
function code(eh, ew, t) return abs(fma(ew, sin(t), Float64(eh / Float64(1.0 / Float64(cos(t) * sin(atan(Float64(eh / Float64(ew * tan(t)))))))))) end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[Sin[t], $MachinePrecision] + N[(eh / N[(1.0 / N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\mathsf{fma}\left(ew, \sin t, \frac{eh}{\frac{1}{\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)}}\right)\right|
\end{array}
Initial program 99.8%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.8%
associate-*r*N/A
*-commutativeN/A
sin-atanN/A
metadata-evalN/A
associate-/r*N/A
div-invN/A
associate-*r/N/A
div-invN/A
associate-*l*N/A
Applied egg-rr77.5%
associate-*l/N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
associate-*l/N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
Simplified97.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (cos t)))
(t_2 (/ eh (* ew (tan t))))
(t_3 (hypot 1.0 t_2))
(t_4 (fabs (/ (+ (* ew (sin t)) (* t_2 t_1)) t_3))))
(if (<= t -2.7e-15)
t_4
(if (<= t 1.35e-50)
(fabs
(+ (* eh (sin (atan (/ eh (* ew t))))) (* (* ew t) (cos (atan t_2)))))
(if (<= t 1.15e+146)
(fabs (fma (/ ew t_3) (sin t) (* eh (* t_1 (/ (/ ew eh) ew)))))
t_4)))))
double code(double eh, double ew, double t) {
double t_1 = eh * cos(t);
double t_2 = eh / (ew * tan(t));
double t_3 = hypot(1.0, t_2);
double t_4 = fabs((((ew * sin(t)) + (t_2 * t_1)) / t_3));
double tmp;
if (t <= -2.7e-15) {
tmp = t_4;
} else if (t <= 1.35e-50) {
tmp = fabs(((eh * sin(atan((eh / (ew * t))))) + ((ew * t) * cos(atan(t_2)))));
} else if (t <= 1.15e+146) {
tmp = fabs(fma((ew / t_3), sin(t), (eh * (t_1 * ((ew / eh) / ew)))));
} else {
tmp = t_4;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(eh * cos(t)) t_2 = Float64(eh / Float64(ew * tan(t))) t_3 = hypot(1.0, t_2) t_4 = abs(Float64(Float64(Float64(ew * sin(t)) + Float64(t_2 * t_1)) / t_3)) tmp = 0.0 if (t <= -2.7e-15) tmp = t_4; elseif (t <= 1.35e-50) tmp = abs(Float64(Float64(eh * sin(atan(Float64(eh / Float64(ew * t))))) + Float64(Float64(ew * t) * cos(atan(t_2))))); elseif (t <= 1.15e+146) tmp = abs(fma(Float64(ew / t_3), sin(t), Float64(eh * Float64(t_1 * Float64(Float64(ew / eh) / ew))))); else tmp = t_4; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[1.0 ^ 2 + t$95$2 ^ 2], $MachinePrecision]}, Block[{t$95$4 = N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.7e-15], t$95$4, If[LessEqual[t, 1.35e-50], N[Abs[N[(N[(eh * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * t), $MachinePrecision] * N[Cos[N[ArcTan[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.15e+146], N[Abs[N[(N[(ew / t$95$3), $MachinePrecision] * N[Sin[t], $MachinePrecision] + N[(eh * N[(t$95$1 * N[(N[(ew / eh), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$4]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \cos t\\
t_2 := \frac{eh}{ew \cdot \tan t}\\
t_3 := \mathsf{hypot}\left(1, t\_2\right)\\
t_4 := \left|\frac{ew \cdot \sin t + t\_2 \cdot t\_1}{t\_3}\right|\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{-15}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-50}:\\
\;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} t\_2\right|\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+146}:\\
\;\;\;\;\left|\mathsf{fma}\left(\frac{ew}{t\_3}, \sin t, eh \cdot \left(t\_1 \cdot \frac{\frac{ew}{eh}}{ew}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if t < -2.70000000000000009e-15 or 1.15e146 < t Initial program 99.8%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-atanN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
hypot-1-defN/A
hypot-lowering-hypot.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
tan-lowering-tan.f6499.8%
Applied egg-rr99.8%
Applied egg-rr85.9%
fabs-divN/A
clear-numN/A
div-fabsN/A
fabs-lowering-fabs.f64N/A
/-lowering-/.f64N/A
Applied egg-rr86.3%
if -2.70000000000000009e-15 < t < 1.35e-50Initial program 100.0%
Taylor expanded in t around 0
*-commutativeN/A
associate-*r*N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if 1.35e-50 < t < 1.15e146Initial program 99.4%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.4%
associate-*r*N/A
*-commutativeN/A
sin-atanN/A
metadata-evalN/A
associate-/r*N/A
div-invN/A
associate-*r/N/A
div-invN/A
associate-*l*N/A
Applied egg-rr94.8%
Taylor expanded in t around 0
/-lowering-/.f6488.3%
Simplified88.3%
Final simplification93.0%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ eh (* ew (tan t))))
(t_2
(fabs (/ (+ (* ew (sin t)) (* t_1 (* eh (cos t)))) (hypot 1.0 t_1)))))
(if (<= t -2.7e-15)
t_2
(if (<= t 1.6e-6)
(fabs
(+ (* eh (sin (atan (/ eh (* ew t))))) (* (* ew t) (cos (atan t_1)))))
t_2))))
double code(double eh, double ew, double t) {
double t_1 = eh / (ew * tan(t));
double t_2 = fabs((((ew * sin(t)) + (t_1 * (eh * cos(t)))) / hypot(1.0, t_1)));
double tmp;
if (t <= -2.7e-15) {
tmp = t_2;
} else if (t <= 1.6e-6) {
tmp = fabs(((eh * sin(atan((eh / (ew * t))))) + ((ew * t) * cos(atan(t_1)))));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = eh / (ew * Math.tan(t));
double t_2 = Math.abs((((ew * Math.sin(t)) + (t_1 * (eh * Math.cos(t)))) / Math.hypot(1.0, t_1)));
double tmp;
if (t <= -2.7e-15) {
tmp = t_2;
} else if (t <= 1.6e-6) {
tmp = Math.abs(((eh * Math.sin(Math.atan((eh / (ew * t))))) + ((ew * t) * Math.cos(Math.atan(t_1)))));
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh / (ew * math.tan(t)) t_2 = math.fabs((((ew * math.sin(t)) + (t_1 * (eh * math.cos(t)))) / math.hypot(1.0, t_1))) tmp = 0 if t <= -2.7e-15: tmp = t_2 elif t <= 1.6e-6: tmp = math.fabs(((eh * math.sin(math.atan((eh / (ew * t))))) + ((ew * t) * math.cos(math.atan(t_1))))) else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = Float64(eh / Float64(ew * tan(t))) t_2 = abs(Float64(Float64(Float64(ew * sin(t)) + Float64(t_1 * Float64(eh * cos(t)))) / hypot(1.0, t_1))) tmp = 0.0 if (t <= -2.7e-15) tmp = t_2; elseif (t <= 1.6e-6) tmp = abs(Float64(Float64(eh * sin(atan(Float64(eh / Float64(ew * t))))) + Float64(Float64(ew * t) * cos(atan(t_1))))); else tmp = t_2; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh / (ew * tan(t)); t_2 = abs((((ew * sin(t)) + (t_1 * (eh * cos(t)))) / hypot(1.0, t_1))); tmp = 0.0; if (t <= -2.7e-15) tmp = t_2; elseif (t <= 1.6e-6) tmp = abs(((eh * sin(atan((eh / (ew * t))))) + ((ew * t) * cos(atan(t_1))))); else tmp = t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.7e-15], t$95$2, If[LessEqual[t, 1.6e-6], N[Abs[N[(N[(eh * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * t), $MachinePrecision] * N[Cos[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{eh}{ew \cdot \tan t}\\
t_2 := \left|\frac{ew \cdot \sin t + t\_1 \cdot \left(eh \cdot \cos t\right)}{\mathsf{hypot}\left(1, t\_1\right)}\right|\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{-15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-6}:\\
\;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.70000000000000009e-15 or 1.5999999999999999e-6 < t Initial program 99.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-atanN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
hypot-1-defN/A
hypot-lowering-hypot.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
Applied egg-rr82.5%
fabs-divN/A
clear-numN/A
div-fabsN/A
fabs-lowering-fabs.f64N/A
/-lowering-/.f64N/A
Applied egg-rr82.8%
if -2.70000000000000009e-15 < t < 1.5999999999999999e-6Initial program 100.0%
Taylor expanded in t around 0
*-commutativeN/A
associate-*r*N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification91.2%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ eh (* ew (tan t))))
(t_2 (fabs (/ (+ (* ew (sin t)) (* eh t_1)) (hypot 1.0 t_1)))))
(if (<= ew -6.5e+35)
t_2
(if (<= ew 1e+136)
(fabs
(+ (* eh (cos t)) (* (* ew (/ 0.5 eh)) (* ew (* (tan t) (sin t))))))
t_2))))
double code(double eh, double ew, double t) {
double t_1 = eh / (ew * tan(t));
double t_2 = fabs((((ew * sin(t)) + (eh * t_1)) / hypot(1.0, t_1)));
double tmp;
if (ew <= -6.5e+35) {
tmp = t_2;
} else if (ew <= 1e+136) {
tmp = fabs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t))))));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = eh / (ew * Math.tan(t));
double t_2 = Math.abs((((ew * Math.sin(t)) + (eh * t_1)) / Math.hypot(1.0, t_1)));
double tmp;
if (ew <= -6.5e+35) {
tmp = t_2;
} else if (ew <= 1e+136) {
tmp = Math.abs(((eh * Math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (Math.tan(t) * Math.sin(t))))));
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh / (ew * math.tan(t)) t_2 = math.fabs((((ew * math.sin(t)) + (eh * t_1)) / math.hypot(1.0, t_1))) tmp = 0 if ew <= -6.5e+35: tmp = t_2 elif ew <= 1e+136: tmp = math.fabs(((eh * math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (math.tan(t) * math.sin(t)))))) else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = Float64(eh / Float64(ew * tan(t))) t_2 = abs(Float64(Float64(Float64(ew * sin(t)) + Float64(eh * t_1)) / hypot(1.0, t_1))) tmp = 0.0 if (ew <= -6.5e+35) tmp = t_2; elseif (ew <= 1e+136) tmp = abs(Float64(Float64(eh * cos(t)) + Float64(Float64(ew * Float64(0.5 / eh)) * Float64(ew * Float64(tan(t) * sin(t)))))); else tmp = t_2; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh / (ew * tan(t)); t_2 = abs((((ew * sin(t)) + (eh * t_1)) / hypot(1.0, t_1))); tmp = 0.0; if (ew <= -6.5e+35) tmp = t_2; elseif (ew <= 1e+136) tmp = abs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t)))))); else tmp = t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] + N[(eh * t$95$1), $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -6.5e+35], t$95$2, If[LessEqual[ew, 1e+136], N[Abs[N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[(0.5 / eh), $MachinePrecision]), $MachinePrecision] * N[(ew * N[(N[Tan[t], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{eh}{ew \cdot \tan t}\\
t_2 := \left|\frac{ew \cdot \sin t + eh \cdot t\_1}{\mathsf{hypot}\left(1, t\_1\right)}\right|\\
\mathbf{if}\;ew \leq -6.5 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;ew \leq 10^{+136}:\\
\;\;\;\;\left|eh \cdot \cos t + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if ew < -6.5000000000000003e35 or 1.00000000000000006e136 < ew Initial program 99.8%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.8%
Applied egg-rr85.5%
Taylor expanded in t around 0
Simplified79.2%
fabs-divN/A
metadata-evalN/A
remove-double-divN/A
fabs-lowering-fabs.f64N/A
*-commutativeN/A
un-div-invN/A
Applied egg-rr79.5%
if -6.5000000000000003e35 < ew < 1.00000000000000006e136Initial program 99.8%
+-commutativeN/A
sin-atanN/A
div-invN/A
associate-/l*N/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr53.5%
Taylor expanded in ew around 0
distribute-lft1-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6480.6%
Simplified80.6%
associate-*l*N/A
*-commutativeN/A
times-fracN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f6480.8%
Applied egg-rr80.8%
Final simplification80.3%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1
(/
1.0
(fabs
(/
1.0
(*
(/ 1.0 (hypot 1.0 (/ eh (* ew t))))
(+ (* ew (sin t)) (/ eh (/ (tan t) (/ eh ew))))))))))
(if (<= ew -5.6e+37)
t_1
(if (<= ew 1e+136)
(fabs
(+ (* eh (cos t)) (* (* ew (/ 0.5 eh)) (* ew (* (tan t) (sin t))))))
t_1))))
double code(double eh, double ew, double t) {
double t_1 = 1.0 / fabs((1.0 / ((1.0 / hypot(1.0, (eh / (ew * t)))) * ((ew * sin(t)) + (eh / (tan(t) / (eh / ew)))))));
double tmp;
if (ew <= -5.6e+37) {
tmp = t_1;
} else if (ew <= 1e+136) {
tmp = fabs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t))))));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = 1.0 / Math.abs((1.0 / ((1.0 / Math.hypot(1.0, (eh / (ew * t)))) * ((ew * Math.sin(t)) + (eh / (Math.tan(t) / (eh / ew)))))));
double tmp;
if (ew <= -5.6e+37) {
tmp = t_1;
} else if (ew <= 1e+136) {
tmp = Math.abs(((eh * Math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (Math.tan(t) * Math.sin(t))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = 1.0 / math.fabs((1.0 / ((1.0 / math.hypot(1.0, (eh / (ew * t)))) * ((ew * math.sin(t)) + (eh / (math.tan(t) / (eh / ew))))))) tmp = 0 if ew <= -5.6e+37: tmp = t_1 elif ew <= 1e+136: tmp = math.fabs(((eh * math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (math.tan(t) * math.sin(t)))))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = Float64(1.0 / abs(Float64(1.0 / Float64(Float64(1.0 / hypot(1.0, Float64(eh / Float64(ew * t)))) * Float64(Float64(ew * sin(t)) + Float64(eh / Float64(tan(t) / Float64(eh / ew)))))))) tmp = 0.0 if (ew <= -5.6e+37) tmp = t_1; elseif (ew <= 1e+136) tmp = abs(Float64(Float64(eh * cos(t)) + Float64(Float64(ew * Float64(0.5 / eh)) * Float64(ew * Float64(tan(t) * sin(t)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = 1.0 / abs((1.0 / ((1.0 / hypot(1.0, (eh / (ew * t)))) * ((ew * sin(t)) + (eh / (tan(t) / (eh / ew))))))); tmp = 0.0; if (ew <= -5.6e+37) tmp = t_1; elseif (ew <= 1e+136) tmp = abs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t)))))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(1.0 / N[Abs[N[(1.0 / N[(N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] + N[(eh / N[(N[Tan[t], $MachinePrecision] / N[(eh / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -5.6e+37], t$95$1, If[LessEqual[ew, 1e+136], N[Abs[N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[(0.5 / eh), $MachinePrecision]), $MachinePrecision] * N[(ew * N[(N[Tan[t], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{\left|\frac{1}{\frac{1}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot t}\right)} \cdot \left(ew \cdot \sin t + \frac{eh}{\frac{\tan t}{\frac{eh}{ew}}}\right)}\right|}\\
\mathbf{if}\;ew \leq -5.6 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq 10^{+136}:\\
\;\;\;\;\left|eh \cdot \cos t + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if ew < -5.5999999999999996e37 or 1.00000000000000006e136 < ew Initial program 99.8%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.8%
Applied egg-rr85.5%
Taylor expanded in t around 0
Simplified79.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6478.6%
Simplified78.6%
if -5.5999999999999996e37 < ew < 1.00000000000000006e136Initial program 99.8%
+-commutativeN/A
sin-atanN/A
div-invN/A
associate-/l*N/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr53.5%
Taylor expanded in ew around 0
distribute-lft1-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6480.6%
Simplified80.6%
associate-*l*N/A
*-commutativeN/A
times-fracN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f6480.8%
Applied egg-rr80.8%
Final simplification80.0%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (sin t))))
(if (<= ew -2.6e+196)
(fabs t_1)
(if (<= ew 1.1e+136)
(fabs
(+ (* eh (cos t)) (* (* ew (/ 0.5 eh)) (* ew (* (tan t) (sin t))))))
(/
1.0
(fabs
(/
(hypot 1.0 (/ eh (* ew (tan t))))
(+ t_1 (/ (/ (* eh eh) ew) t)))))))))
double code(double eh, double ew, double t) {
double t_1 = ew * sin(t);
double tmp;
if (ew <= -2.6e+196) {
tmp = fabs(t_1);
} else if (ew <= 1.1e+136) {
tmp = fabs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t))))));
} else {
tmp = 1.0 / fabs((hypot(1.0, (eh / (ew * tan(t)))) / (t_1 + (((eh * eh) / ew) / t))));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = ew * Math.sin(t);
double tmp;
if (ew <= -2.6e+196) {
tmp = Math.abs(t_1);
} else if (ew <= 1.1e+136) {
tmp = Math.abs(((eh * Math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (Math.tan(t) * Math.sin(t))))));
} else {
tmp = 1.0 / Math.abs((Math.hypot(1.0, (eh / (ew * Math.tan(t)))) / (t_1 + (((eh * eh) / ew) / t))));
}
return tmp;
}
def code(eh, ew, t): t_1 = ew * math.sin(t) tmp = 0 if ew <= -2.6e+196: tmp = math.fabs(t_1) elif ew <= 1.1e+136: tmp = math.fabs(((eh * math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (math.tan(t) * math.sin(t)))))) else: tmp = 1.0 / math.fabs((math.hypot(1.0, (eh / (ew * math.tan(t)))) / (t_1 + (((eh * eh) / ew) / t)))) return tmp
function code(eh, ew, t) t_1 = Float64(ew * sin(t)) tmp = 0.0 if (ew <= -2.6e+196) tmp = abs(t_1); elseif (ew <= 1.1e+136) tmp = abs(Float64(Float64(eh * cos(t)) + Float64(Float64(ew * Float64(0.5 / eh)) * Float64(ew * Float64(tan(t) * sin(t)))))); else tmp = Float64(1.0 / abs(Float64(hypot(1.0, Float64(eh / Float64(ew * tan(t)))) / Float64(t_1 + Float64(Float64(Float64(eh * eh) / ew) / t))))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = ew * sin(t); tmp = 0.0; if (ew <= -2.6e+196) tmp = abs(t_1); elseif (ew <= 1.1e+136) tmp = abs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t)))))); else tmp = 1.0 / abs((hypot(1.0, (eh / (ew * tan(t)))) / (t_1 + (((eh * eh) / ew) / t)))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -2.6e+196], N[Abs[t$95$1], $MachinePrecision], If[LessEqual[ew, 1.1e+136], N[Abs[N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[(0.5 / eh), $MachinePrecision]), $MachinePrecision] * N[(ew * N[(N[Tan[t], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(1.0 / N[Abs[N[(N[Sqrt[1.0 ^ 2 + N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] / N[(t$95$1 + N[(N[(N[(eh * eh), $MachinePrecision] / ew), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \sin t\\
\mathbf{if}\;ew \leq -2.6 \cdot 10^{+196}:\\
\;\;\;\;\left|t\_1\right|\\
\mathbf{elif}\;ew \leq 1.1 \cdot 10^{+136}:\\
\;\;\;\;\left|eh \cdot \cos t + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left|\frac{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot \tan t}\right)}{t\_1 + \frac{\frac{eh \cdot eh}{ew}}{t}}\right|}\\
\end{array}
\end{array}
if ew < -2.60000000000000012e196Initial program 99.8%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
sin-lowering-sin.f6482.6%
Simplified82.6%
if -2.60000000000000012e196 < ew < 1.1e136Initial program 99.9%
+-commutativeN/A
sin-atanN/A
div-invN/A
associate-/l*N/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr57.7%
Taylor expanded in ew around 0
distribute-lft1-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6475.0%
Simplified75.0%
associate-*l*N/A
*-commutativeN/A
times-fracN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f6477.8%
Applied egg-rr77.8%
if 1.1e136 < ew Initial program 99.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-atanN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
hypot-1-defN/A
hypot-lowering-hypot.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
Applied egg-rr86.0%
Taylor expanded in t around 0
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6476.5%
Simplified76.5%
Final simplification78.1%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (cos t))) (t_2 (* ew (sin t))))
(if (<= ew -6.2e+190)
(fabs t_2)
(if (<= ew 1.08e+136)
(fabs (+ t_1 (* (* ew (/ 0.5 eh)) (* ew (* (tan t) (sin t))))))
(/ 1.0 (fabs (/ 1.0 (+ t_2 (/ t_1 (/ (tan t) (/ eh ew)))))))))))
double code(double eh, double ew, double t) {
double t_1 = eh * cos(t);
double t_2 = ew * sin(t);
double tmp;
if (ew <= -6.2e+190) {
tmp = fabs(t_2);
} else if (ew <= 1.08e+136) {
tmp = fabs((t_1 + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t))))));
} else {
tmp = 1.0 / fabs((1.0 / (t_2 + (t_1 / (tan(t) / (eh / 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 = eh * cos(t)
t_2 = ew * sin(t)
if (ew <= (-6.2d+190)) then
tmp = abs(t_2)
else if (ew <= 1.08d+136) then
tmp = abs((t_1 + ((ew * (0.5d0 / eh)) * (ew * (tan(t) * sin(t))))))
else
tmp = 1.0d0 / abs((1.0d0 / (t_2 + (t_1 / (tan(t) / (eh / ew))))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.cos(t);
double t_2 = ew * Math.sin(t);
double tmp;
if (ew <= -6.2e+190) {
tmp = Math.abs(t_2);
} else if (ew <= 1.08e+136) {
tmp = Math.abs((t_1 + ((ew * (0.5 / eh)) * (ew * (Math.tan(t) * Math.sin(t))))));
} else {
tmp = 1.0 / Math.abs((1.0 / (t_2 + (t_1 / (Math.tan(t) / (eh / ew))))));
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.cos(t) t_2 = ew * math.sin(t) tmp = 0 if ew <= -6.2e+190: tmp = math.fabs(t_2) elif ew <= 1.08e+136: tmp = math.fabs((t_1 + ((ew * (0.5 / eh)) * (ew * (math.tan(t) * math.sin(t)))))) else: tmp = 1.0 / math.fabs((1.0 / (t_2 + (t_1 / (math.tan(t) / (eh / ew)))))) return tmp
function code(eh, ew, t) t_1 = Float64(eh * cos(t)) t_2 = Float64(ew * sin(t)) tmp = 0.0 if (ew <= -6.2e+190) tmp = abs(t_2); elseif (ew <= 1.08e+136) tmp = abs(Float64(t_1 + Float64(Float64(ew * Float64(0.5 / eh)) * Float64(ew * Float64(tan(t) * sin(t)))))); else tmp = Float64(1.0 / abs(Float64(1.0 / Float64(t_2 + Float64(t_1 / Float64(tan(t) / Float64(eh / ew))))))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * cos(t); t_2 = ew * sin(t); tmp = 0.0; if (ew <= -6.2e+190) tmp = abs(t_2); elseif (ew <= 1.08e+136) tmp = abs((t_1 + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t)))))); else tmp = 1.0 / abs((1.0 / (t_2 + (t_1 / (tan(t) / (eh / ew)))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -6.2e+190], N[Abs[t$95$2], $MachinePrecision], If[LessEqual[ew, 1.08e+136], N[Abs[N[(t$95$1 + N[(N[(ew * N[(0.5 / eh), $MachinePrecision]), $MachinePrecision] * N[(ew * N[(N[Tan[t], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(1.0 / N[Abs[N[(1.0 / N[(t$95$2 + N[(t$95$1 / N[(N[Tan[t], $MachinePrecision] / N[(eh / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \cos t\\
t_2 := ew \cdot \sin t\\
\mathbf{if}\;ew \leq -6.2 \cdot 10^{+190}:\\
\;\;\;\;\left|t\_2\right|\\
\mathbf{elif}\;ew \leq 1.08 \cdot 10^{+136}:\\
\;\;\;\;\left|t\_1 + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left|\frac{1}{t\_2 + \frac{t\_1}{\frac{\tan t}{\frac{eh}{ew}}}}\right|}\\
\end{array}
\end{array}
if ew < -6.2000000000000003e190Initial program 99.8%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
sin-lowering-sin.f6482.6%
Simplified82.6%
if -6.2000000000000003e190 < ew < 1.07999999999999994e136Initial program 99.9%
+-commutativeN/A
sin-atanN/A
div-invN/A
associate-/l*N/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr57.7%
Taylor expanded in ew around 0
distribute-lft1-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6475.0%
Simplified75.0%
associate-*l*N/A
*-commutativeN/A
times-fracN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f6477.8%
Applied egg-rr77.8%
if 1.07999999999999994e136 < ew Initial program 99.7%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.7%
Applied egg-rr90.6%
Taylor expanded in eh around 0
Simplified74.9%
Final simplification77.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (cos t))) (t_2 (* ew (sin t))))
(if (<= ew -1.25e+191)
(fabs t_2)
(if (<= ew 1.35e+136)
(fabs (+ t_1 (* (* ew (/ 0.5 eh)) (* ew (* (tan t) (sin t))))))
(/ 1.0 (fabs (/ 1.0 (+ t_2 (/ t_1 (/ ew (/ eh (tan t))))))))))))
double code(double eh, double ew, double t) {
double t_1 = eh * cos(t);
double t_2 = ew * sin(t);
double tmp;
if (ew <= -1.25e+191) {
tmp = fabs(t_2);
} else if (ew <= 1.35e+136) {
tmp = fabs((t_1 + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t))))));
} else {
tmp = 1.0 / fabs((1.0 / (t_2 + (t_1 / (ew / (eh / tan(t)))))));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = eh * cos(t)
t_2 = ew * sin(t)
if (ew <= (-1.25d+191)) then
tmp = abs(t_2)
else if (ew <= 1.35d+136) then
tmp = abs((t_1 + ((ew * (0.5d0 / eh)) * (ew * (tan(t) * sin(t))))))
else
tmp = 1.0d0 / abs((1.0d0 / (t_2 + (t_1 / (ew / (eh / tan(t)))))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.cos(t);
double t_2 = ew * Math.sin(t);
double tmp;
if (ew <= -1.25e+191) {
tmp = Math.abs(t_2);
} else if (ew <= 1.35e+136) {
tmp = Math.abs((t_1 + ((ew * (0.5 / eh)) * (ew * (Math.tan(t) * Math.sin(t))))));
} else {
tmp = 1.0 / Math.abs((1.0 / (t_2 + (t_1 / (ew / (eh / Math.tan(t)))))));
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.cos(t) t_2 = ew * math.sin(t) tmp = 0 if ew <= -1.25e+191: tmp = math.fabs(t_2) elif ew <= 1.35e+136: tmp = math.fabs((t_1 + ((ew * (0.5 / eh)) * (ew * (math.tan(t) * math.sin(t)))))) else: tmp = 1.0 / math.fabs((1.0 / (t_2 + (t_1 / (ew / (eh / math.tan(t))))))) return tmp
function code(eh, ew, t) t_1 = Float64(eh * cos(t)) t_2 = Float64(ew * sin(t)) tmp = 0.0 if (ew <= -1.25e+191) tmp = abs(t_2); elseif (ew <= 1.35e+136) tmp = abs(Float64(t_1 + Float64(Float64(ew * Float64(0.5 / eh)) * Float64(ew * Float64(tan(t) * sin(t)))))); else tmp = Float64(1.0 / abs(Float64(1.0 / Float64(t_2 + Float64(t_1 / Float64(ew / Float64(eh / tan(t)))))))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * cos(t); t_2 = ew * sin(t); tmp = 0.0; if (ew <= -1.25e+191) tmp = abs(t_2); elseif (ew <= 1.35e+136) tmp = abs((t_1 + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t)))))); else tmp = 1.0 / abs((1.0 / (t_2 + (t_1 / (ew / (eh / tan(t))))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -1.25e+191], N[Abs[t$95$2], $MachinePrecision], If[LessEqual[ew, 1.35e+136], N[Abs[N[(t$95$1 + N[(N[(ew * N[(0.5 / eh), $MachinePrecision]), $MachinePrecision] * N[(ew * N[(N[Tan[t], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(1.0 / N[Abs[N[(1.0 / N[(t$95$2 + N[(t$95$1 / N[(ew / N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \cos t\\
t_2 := ew \cdot \sin t\\
\mathbf{if}\;ew \leq -1.25 \cdot 10^{+191}:\\
\;\;\;\;\left|t\_2\right|\\
\mathbf{elif}\;ew \leq 1.35 \cdot 10^{+136}:\\
\;\;\;\;\left|t\_1 + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left|\frac{1}{t\_2 + \frac{t\_1}{\frac{ew}{\frac{eh}{\tan t}}}}\right|}\\
\end{array}
\end{array}
if ew < -1.25000000000000005e191Initial program 99.8%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
sin-lowering-sin.f6482.6%
Simplified82.6%
if -1.25000000000000005e191 < ew < 1.3500000000000001e136Initial program 99.9%
+-commutativeN/A
sin-atanN/A
div-invN/A
associate-/l*N/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr57.7%
Taylor expanded in ew around 0
distribute-lft1-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6475.0%
Simplified75.0%
associate-*l*N/A
*-commutativeN/A
times-fracN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f6477.8%
Applied egg-rr77.8%
if 1.3500000000000001e136 < ew Initial program 99.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-atanN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
hypot-1-defN/A
hypot-lowering-hypot.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
Applied egg-rr86.0%
Taylor expanded in eh around 0
Simplified74.8%
Final simplification77.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (fabs (* ew (sin t)))))
(if (<= ew -6.2e+190)
t_1
(if (<= ew 1.85e+136)
(fabs
(+ (* eh (cos t)) (* (* ew (/ 0.5 eh)) (* ew (* (tan t) (sin t))))))
t_1))))
double code(double eh, double ew, double t) {
double t_1 = fabs((ew * sin(t)));
double tmp;
if (ew <= -6.2e+190) {
tmp = t_1;
} else if (ew <= 1.85e+136) {
tmp = fabs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(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 * sin(t)))
if (ew <= (-6.2d+190)) then
tmp = t_1
else if (ew <= 1.85d+136) then
tmp = abs(((eh * cos(t)) + ((ew * (0.5d0 / eh)) * (ew * (tan(t) * sin(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.sin(t)));
double tmp;
if (ew <= -6.2e+190) {
tmp = t_1;
} else if (ew <= 1.85e+136) {
tmp = Math.abs(((eh * Math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (Math.tan(t) * Math.sin(t))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs((ew * math.sin(t))) tmp = 0 if ew <= -6.2e+190: tmp = t_1 elif ew <= 1.85e+136: tmp = math.fabs(((eh * math.cos(t)) + ((ew * (0.5 / eh)) * (ew * (math.tan(t) * math.sin(t)))))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(ew * sin(t))) tmp = 0.0 if (ew <= -6.2e+190) tmp = t_1; elseif (ew <= 1.85e+136) tmp = abs(Float64(Float64(eh * cos(t)) + Float64(Float64(ew * Float64(0.5 / eh)) * Float64(ew * Float64(tan(t) * sin(t)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = abs((ew * sin(t))); tmp = 0.0; if (ew <= -6.2e+190) tmp = t_1; elseif (ew <= 1.85e+136) tmp = abs(((eh * cos(t)) + ((ew * (0.5 / eh)) * (ew * (tan(t) * sin(t)))))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -6.2e+190], t$95$1, If[LessEqual[ew, 1.85e+136], N[Abs[N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[(0.5 / eh), $MachinePrecision]), $MachinePrecision] * N[(ew * N[(N[Tan[t], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|ew \cdot \sin t\right|\\
\mathbf{if}\;ew \leq -6.2 \cdot 10^{+190}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq 1.85 \cdot 10^{+136}:\\
\;\;\;\;\left|eh \cdot \cos t + \left(ew \cdot \frac{0.5}{eh}\right) \cdot \left(ew \cdot \left(\tan t \cdot \sin t\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if ew < -6.2000000000000003e190 or 1.85000000000000005e136 < ew Initial program 99.7%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
sin-lowering-sin.f6477.8%
Simplified77.8%
if -6.2000000000000003e190 < ew < 1.85000000000000005e136Initial program 99.9%
+-commutativeN/A
sin-atanN/A
div-invN/A
associate-/l*N/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr57.7%
Taylor expanded in ew around 0
distribute-lft1-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6475.0%
Simplified75.0%
associate-*l*N/A
*-commutativeN/A
times-fracN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f6477.8%
Applied egg-rr77.8%
Final simplification77.8%
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (fabs (* ew (sin t))))) (if (<= ew -6.2e+190) t_1 (if (<= ew 6.2e+136) (fabs (* eh (cos t))) t_1))))
double code(double eh, double ew, double t) {
double t_1 = fabs((ew * sin(t)));
double tmp;
if (ew <= -6.2e+190) {
tmp = t_1;
} else if (ew <= 6.2e+136) {
tmp = fabs((eh * cos(t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = abs((ew * sin(t)))
if (ew <= (-6.2d+190)) then
tmp = t_1
else if (ew <= 6.2d+136) then
tmp = abs((eh * cos(t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs((ew * Math.sin(t)));
double tmp;
if (ew <= -6.2e+190) {
tmp = t_1;
} else if (ew <= 6.2e+136) {
tmp = Math.abs((eh * Math.cos(t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs((ew * math.sin(t))) tmp = 0 if ew <= -6.2e+190: tmp = t_1 elif ew <= 6.2e+136: tmp = math.fabs((eh * math.cos(t))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(ew * sin(t))) tmp = 0.0 if (ew <= -6.2e+190) tmp = t_1; elseif (ew <= 6.2e+136) tmp = abs(Float64(eh * cos(t))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = abs((ew * sin(t))); tmp = 0.0; if (ew <= -6.2e+190) tmp = t_1; elseif (ew <= 6.2e+136) tmp = abs((eh * cos(t))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -6.2e+190], t$95$1, If[LessEqual[ew, 6.2e+136], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|ew \cdot \sin t\right|\\
\mathbf{if}\;ew \leq -6.2 \cdot 10^{+190}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq 6.2 \cdot 10^{+136}:\\
\;\;\;\;\left|eh \cdot \cos t\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if ew < -6.2000000000000003e190 or 6.19999999999999967e136 < ew Initial program 99.7%
*-commutativeN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
sin-lowering-sin.f6477.8%
Simplified77.8%
if -6.2000000000000003e190 < ew < 6.19999999999999967e136Initial program 99.9%
+-commutativeN/A
sin-atanN/A
div-invN/A
associate-/l*N/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr57.7%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
cos-lowering-cos.f6477.1%
Simplified77.1%
(FPCore (eh ew t) :precision binary64 (fabs (* eh (cos t))))
double code(double eh, double ew, double t) {
return fabs((eh * cos(t)));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((eh * cos(t)))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((eh * Math.cos(t)));
}
def code(eh, ew, t): return math.fabs((eh * math.cos(t)))
function code(eh, ew, t) return abs(Float64(eh * cos(t))) end
function tmp = code(eh, ew, t) tmp = abs((eh * cos(t))); end
code[eh_, ew_, t_] := N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|eh \cdot \cos t\right|
\end{array}
Initial program 99.8%
+-commutativeN/A
sin-atanN/A
div-invN/A
associate-/l*N/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr67.5%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
cos-lowering-cos.f6463.5%
Simplified63.5%
(FPCore (eh ew t) :precision binary64 (fabs eh))
double code(double eh, double ew, double t) {
return fabs(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(eh)
end function
public static double code(double eh, double ew, double t) {
return Math.abs(eh);
}
def code(eh, ew, t): return math.fabs(eh)
function code(eh, ew, t) return abs(eh) end
function tmp = code(eh, ew, t) tmp = abs(eh); end
code[eh_, ew_, t_] := N[Abs[eh], $MachinePrecision]
\begin{array}{l}
\\
\left|eh\right|
\end{array}
Initial program 99.8%
+-commutativeN/A
sin-atanN/A
div-invN/A
associate-/l*N/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr67.5%
Taylor expanded in t around 0
Simplified45.6%
herbie shell --seed 2024159
(FPCore (eh ew t)
:name "Example from Robby"
:precision binary64
(fabs (+ (* (* ew (sin t)) (cos (atan (/ (/ eh ew) (tan t))))) (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t))))))))