
(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 15 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 (atan (/ eh (* ew (tan t)))))) (fabs (fma (* eh (cos t)) (sin t_1) (* (* ew (sin t)) (cos t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan((eh / (ew * tan(t))));
return fabs(fma((eh * cos(t)), sin(t_1), ((ew * sin(t)) * cos(t_1))));
}
function code(eh, ew, t) t_1 = atan(Float64(eh / Float64(ew * tan(t)))) return abs(fma(Float64(eh * cos(t)), sin(t_1), Float64(Float64(ew * sin(t)) * cos(t_1)))) end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision] + N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
\left|\mathsf{fma}\left(eh \cdot \cos t, \sin t\_1, \left(ew \cdot \sin t\right) \cdot \cos t\_1\right)\right|
\end{array}
\end{array}
Initial program 99.7%
Taylor expanded in ew around 0
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.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-*r*N/A
*-lowering-*.f64N/A
Simplified99.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (cos t)))
(t_2 (/ 1.0 (* eh (sqrt (fma eh (/ eh (* ew (* ew (* t t)))) 1.0)))))
(t_3 (atan (/ (/ eh ew) (tan t))))
(t_4 (fabs (+ (* t_1 (sin t_3)) (* (* ew (sin t)) (cos t_3)))))
(t_5 (sin (atan (/ eh (* ew (tan t))))))
(t_6 (* (cos t) t_5)))
(if (<= t_4 5e-165)
(fabs (* eh (fma (* (sin t) t_2) ew t_6)))
(if (<= t_4 5e+239)
(fabs
(fma
(/ (sin t) (sqrt (+ 1.0 (/ (* eh eh) (* (* t ew) (* t ew))))))
ew
(* t_1 t_5)))
(fabs (* eh (fma (sin t) (* ew t_2) t_6)))))))
double code(double eh, double ew, double t) {
double t_1 = eh * cos(t);
double t_2 = 1.0 / (eh * sqrt(fma(eh, (eh / (ew * (ew * (t * t)))), 1.0)));
double t_3 = atan(((eh / ew) / tan(t)));
double t_4 = fabs(((t_1 * sin(t_3)) + ((ew * sin(t)) * cos(t_3))));
double t_5 = sin(atan((eh / (ew * tan(t)))));
double t_6 = cos(t) * t_5;
double tmp;
if (t_4 <= 5e-165) {
tmp = fabs((eh * fma((sin(t) * t_2), ew, t_6)));
} else if (t_4 <= 5e+239) {
tmp = fabs(fma((sin(t) / sqrt((1.0 + ((eh * eh) / ((t * ew) * (t * ew)))))), ew, (t_1 * t_5)));
} else {
tmp = fabs((eh * fma(sin(t), (ew * t_2), t_6)));
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(eh * cos(t)) t_2 = Float64(1.0 / Float64(eh * sqrt(fma(eh, Float64(eh / Float64(ew * Float64(ew * Float64(t * t)))), 1.0)))) t_3 = atan(Float64(Float64(eh / ew) / tan(t))) t_4 = abs(Float64(Float64(t_1 * sin(t_3)) + Float64(Float64(ew * sin(t)) * cos(t_3)))) t_5 = sin(atan(Float64(eh / Float64(ew * tan(t))))) t_6 = Float64(cos(t) * t_5) tmp = 0.0 if (t_4 <= 5e-165) tmp = abs(Float64(eh * fma(Float64(sin(t) * t_2), ew, t_6))); elseif (t_4 <= 5e+239) tmp = abs(fma(Float64(sin(t) / sqrt(Float64(1.0 + Float64(Float64(eh * eh) / Float64(Float64(t * ew) * Float64(t * ew)))))), ew, Float64(t_1 * t_5))); else tmp = abs(Float64(eh * fma(sin(t), Float64(ew * t_2), t_6))); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(eh * N[Sqrt[N[(eh * N[(eh / N[(ew * N[(ew * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Abs[N[(N[(t$95$1 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[(N[Cos[t], $MachinePrecision] * t$95$5), $MachinePrecision]}, If[LessEqual[t$95$4, 5e-165], N[Abs[N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * t$95$2), $MachinePrecision] * ew + t$95$6), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 5e+239], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] / N[Sqrt[N[(1.0 + N[(N[(eh * eh), $MachinePrecision] / N[(N[(t * ew), $MachinePrecision] * N[(t * ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * ew + N[(t$95$1 * t$95$5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(eh * N[(N[Sin[t], $MachinePrecision] * N[(ew * t$95$2), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \cos t\\
t_2 := \frac{1}{eh \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh}{ew \cdot \left(ew \cdot \left(t \cdot t\right)\right)}, 1\right)}}\\
t_3 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
t_4 := \left|t\_1 \cdot \sin t\_3 + \left(ew \cdot \sin t\right) \cdot \cos t\_3\right|\\
t_5 := \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
t_6 := \cos t \cdot t\_5\\
\mathbf{if}\;t\_4 \leq 5 \cdot 10^{-165}:\\
\;\;\;\;\left|eh \cdot \mathsf{fma}\left(\sin t \cdot t\_2, ew, t\_6\right)\right|\\
\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+239}:\\
\;\;\;\;\left|\mathsf{fma}\left(\frac{\sin t}{\sqrt{1 + \frac{eh \cdot eh}{\left(t \cdot ew\right) \cdot \left(t \cdot ew\right)}}}, ew, t\_1 \cdot t\_5\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|eh \cdot \mathsf{fma}\left(\sin t, ew \cdot t\_2, t\_6\right)\right|\\
\end{array}
\end{array}
if (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))) < 4.99999999999999981e-165Initial program 99.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6498.2
Simplified98.2%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified98.1%
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr77.6%
if 4.99999999999999981e-165 < (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))) < 5.00000000000000007e239Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.6
Simplified99.6%
associate-*l*N/A
*-commutativeN/A
associate-/r*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr98.0%
if 5.00000000000000007e239 < (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))) Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7
Simplified99.7%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified87.0%
Applied egg-rr87.0%
Final simplification94.0%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (cos t)))
(t_2 (atan (/ (/ eh ew) (tan t))))
(t_3 (fabs (+ (* t_1 (sin t_2)) (* (* ew (sin t)) (cos t_2)))))
(t_4 (sin (atan (/ eh (* ew (tan t))))))
(t_5
(fabs
(*
eh
(fma
(*
(sin t)
(/ 1.0 (* eh (sqrt (fma eh (/ eh (* ew (* ew (* t t)))) 1.0)))))
ew
(* (cos t) t_4))))))
(if (<= t_3 5e-165)
t_5
(if (<= t_3 5e+239)
(fabs
(fma
(/ (sin t) (sqrt (+ 1.0 (/ (* eh eh) (* (* t ew) (* t ew))))))
ew
(* t_1 t_4)))
t_5))))
double code(double eh, double ew, double t) {
double t_1 = eh * cos(t);
double t_2 = atan(((eh / ew) / tan(t)));
double t_3 = fabs(((t_1 * sin(t_2)) + ((ew * sin(t)) * cos(t_2))));
double t_4 = sin(atan((eh / (ew * tan(t)))));
double t_5 = fabs((eh * fma((sin(t) * (1.0 / (eh * sqrt(fma(eh, (eh / (ew * (ew * (t * t)))), 1.0))))), ew, (cos(t) * t_4))));
double tmp;
if (t_3 <= 5e-165) {
tmp = t_5;
} else if (t_3 <= 5e+239) {
tmp = fabs(fma((sin(t) / sqrt((1.0 + ((eh * eh) / ((t * ew) * (t * ew)))))), ew, (t_1 * t_4)));
} else {
tmp = t_5;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(eh * cos(t)) t_2 = atan(Float64(Float64(eh / ew) / tan(t))) t_3 = abs(Float64(Float64(t_1 * sin(t_2)) + Float64(Float64(ew * sin(t)) * cos(t_2)))) t_4 = sin(atan(Float64(eh / Float64(ew * tan(t))))) t_5 = abs(Float64(eh * fma(Float64(sin(t) * Float64(1.0 / Float64(eh * sqrt(fma(eh, Float64(eh / Float64(ew * Float64(ew * Float64(t * t)))), 1.0))))), ew, Float64(cos(t) * t_4)))) tmp = 0.0 if (t_3 <= 5e-165) tmp = t_5; elseif (t_3 <= 5e+239) tmp = abs(fma(Float64(sin(t) / sqrt(Float64(1.0 + Float64(Float64(eh * eh) / Float64(Float64(t * ew) * Float64(t * ew)))))), ew, Float64(t_1 * t_4))); else tmp = t_5; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Abs[N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * N[(1.0 / N[(eh * N[Sqrt[N[(eh * N[(eh / N[(ew * N[(ew * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * ew + N[(N[Cos[t], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 5e-165], t$95$5, If[LessEqual[t$95$3, 5e+239], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] / N[Sqrt[N[(1.0 + N[(N[(eh * eh), $MachinePrecision] / N[(N[(t * ew), $MachinePrecision] * N[(t * ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * ew + N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$5]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \cos t\\
t_2 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
t_3 := \left|t\_1 \cdot \sin t\_2 + \left(ew \cdot \sin t\right) \cdot \cos t\_2\right|\\
t_4 := \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
t_5 := \left|eh \cdot \mathsf{fma}\left(\sin t \cdot \frac{1}{eh \cdot \sqrt{\mathsf{fma}\left(eh, \frac{eh}{ew \cdot \left(ew \cdot \left(t \cdot t\right)\right)}, 1\right)}}, ew, \cos t \cdot t\_4\right)\right|\\
\mathbf{if}\;t\_3 \leq 5 \cdot 10^{-165}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+239}:\\
\;\;\;\;\left|\mathsf{fma}\left(\frac{\sin t}{\sqrt{1 + \frac{eh \cdot eh}{\left(t \cdot ew\right) \cdot \left(t \cdot ew\right)}}}, ew, t\_1 \cdot t\_4\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))) < 4.99999999999999981e-165 or 5.00000000000000007e239 < (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))) Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.1
Simplified99.1%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified91.3%
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr83.3%
if 4.99999999999999981e-165 < (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))) < 5.00000000000000007e239Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.6
Simplified99.6%
associate-*l*N/A
*-commutativeN/A
associate-/r*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr98.0%
Final simplification94.0%
(FPCore (eh ew t) :precision binary64 (fabs (+ (* (* ew (sin t)) (cos (atan (/ eh (* t ew))))) (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t))))))))
double code(double eh, double ew, double t) {
return fabs((((ew * sin(t)) * cos(atan((eh / (t * ew))))) + ((eh * cos(t)) * sin(atan(((eh / ew) / tan(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((((ew * sin(t)) * cos(atan((eh / (t * ew))))) + ((eh * cos(t)) * sin(atan(((eh / ew) / tan(t)))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((((ew * Math.sin(t)) * Math.cos(Math.atan((eh / (t * ew))))) + ((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.cos(math.atan((eh / (t * ew))))) + ((eh * math.cos(t)) * math.sin(math.atan(((eh / ew) / math.tan(t)))))))
function code(eh, ew, t) return abs(Float64(Float64(Float64(ew * sin(t)) * cos(atan(Float64(eh / Float64(t * ew))))) + 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)) * cos(atan((eh / (t * ew))))) + ((eh * cos(t)) * sin(atan(((eh / ew) / tan(t))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(eh / N[(t * ew), $MachinePrecision]), $MachinePrecision]], $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|\left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{eh}{t \cdot ew}\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.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.4
Simplified99.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sqrt (fma eh (/ eh (* ew (* ew (* t t)))) 1.0)))
(t_2 (/ (sin t) t_1))
(t_3 (sin (atan (/ eh (* ew (tan t))))))
(t_4 (* (cos t) t_3)))
(if (<= ew -330000000.0)
(fabs (* ew (fma eh (/ t_4 ew) (* (sin t) (/ 1.0 t_1)))))
(if (<= ew 2e+21)
(fabs (* eh (fma ew (/ 1.0 (/ eh t_2)) t_4)))
(fabs (* ew (fma eh (* (cos t) (/ t_3 ew)) t_2)))))))
double code(double eh, double ew, double t) {
double t_1 = sqrt(fma(eh, (eh / (ew * (ew * (t * t)))), 1.0));
double t_2 = sin(t) / t_1;
double t_3 = sin(atan((eh / (ew * tan(t)))));
double t_4 = cos(t) * t_3;
double tmp;
if (ew <= -330000000.0) {
tmp = fabs((ew * fma(eh, (t_4 / ew), (sin(t) * (1.0 / t_1)))));
} else if (ew <= 2e+21) {
tmp = fabs((eh * fma(ew, (1.0 / (eh / t_2)), t_4)));
} else {
tmp = fabs((ew * fma(eh, (cos(t) * (t_3 / ew)), t_2)));
}
return tmp;
}
function code(eh, ew, t) t_1 = sqrt(fma(eh, Float64(eh / Float64(ew * Float64(ew * Float64(t * t)))), 1.0)) t_2 = Float64(sin(t) / t_1) t_3 = sin(atan(Float64(eh / Float64(ew * tan(t))))) t_4 = Float64(cos(t) * t_3) tmp = 0.0 if (ew <= -330000000.0) tmp = abs(Float64(ew * fma(eh, Float64(t_4 / ew), Float64(sin(t) * Float64(1.0 / t_1))))); elseif (ew <= 2e+21) tmp = abs(Float64(eh * fma(ew, Float64(1.0 / Float64(eh / t_2)), t_4))); else tmp = abs(Float64(ew * fma(eh, Float64(cos(t) * Float64(t_3 / ew)), t_2))); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Sqrt[N[(eh * N[(eh / N[(ew * N[(ew * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t], $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Cos[t], $MachinePrecision] * t$95$3), $MachinePrecision]}, If[LessEqual[ew, -330000000.0], N[Abs[N[(ew * N[(eh * N[(t$95$4 / ew), $MachinePrecision] + N[(N[Sin[t], $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 2e+21], N[Abs[N[(eh * N[(ew * N[(1.0 / N[(eh / t$95$2), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[(eh * N[(N[Cos[t], $MachinePrecision] * N[(t$95$3 / ew), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\mathsf{fma}\left(eh, \frac{eh}{ew \cdot \left(ew \cdot \left(t \cdot t\right)\right)}, 1\right)}\\
t_2 := \frac{\sin t}{t\_1}\\
t_3 := \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
t_4 := \cos t \cdot t\_3\\
\mathbf{if}\;ew \leq -330000000:\\
\;\;\;\;\left|ew \cdot \mathsf{fma}\left(eh, \frac{t\_4}{ew}, \sin t \cdot \frac{1}{t\_1}\right)\right|\\
\mathbf{elif}\;ew \leq 2 \cdot 10^{+21}:\\
\;\;\;\;\left|eh \cdot \mathsf{fma}\left(ew, \frac{1}{\frac{eh}{t\_2}}, t\_4\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \mathsf{fma}\left(eh, \cos t \cdot \frac{t\_3}{ew}, t\_2\right)\right|\\
\end{array}
\end{array}
if ew < -3.3e8Initial program 99.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9
Simplified99.9%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified99.8%
cos-atanN/A
times-fracN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.6
Applied egg-rr95.6%
if -3.3e8 < ew < 2e21Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.1
Simplified99.1%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified99.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
cos-atanN/A
times-fracN/A
div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr97.0%
if 2e21 < ew Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7
Simplified99.7%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified99.6%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr91.4%
Final simplification95.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sqrt (fma eh (/ eh (* ew (* ew (* t t)))) 1.0)))
(t_2 (sin (atan (/ eh (* ew (tan t))))))
(t_3 (* (cos t) t_2)))
(if (<= ew -5e+32)
(fabs (* ew (fma eh (/ t_3 ew) (* (sin t) (/ 1.0 t_1)))))
(if (<= ew 1.9e+22)
(fabs (* eh (fma (* (sin t) (/ 1.0 (* eh t_1))) ew t_3)))
(fabs (* ew (fma eh (* (cos t) (/ t_2 ew)) (/ (sin t) t_1))))))))
double code(double eh, double ew, double t) {
double t_1 = sqrt(fma(eh, (eh / (ew * (ew * (t * t)))), 1.0));
double t_2 = sin(atan((eh / (ew * tan(t)))));
double t_3 = cos(t) * t_2;
double tmp;
if (ew <= -5e+32) {
tmp = fabs((ew * fma(eh, (t_3 / ew), (sin(t) * (1.0 / t_1)))));
} else if (ew <= 1.9e+22) {
tmp = fabs((eh * fma((sin(t) * (1.0 / (eh * t_1))), ew, t_3)));
} else {
tmp = fabs((ew * fma(eh, (cos(t) * (t_2 / ew)), (sin(t) / t_1))));
}
return tmp;
}
function code(eh, ew, t) t_1 = sqrt(fma(eh, Float64(eh / Float64(ew * Float64(ew * Float64(t * t)))), 1.0)) t_2 = sin(atan(Float64(eh / Float64(ew * tan(t))))) t_3 = Float64(cos(t) * t_2) tmp = 0.0 if (ew <= -5e+32) tmp = abs(Float64(ew * fma(eh, Float64(t_3 / ew), Float64(sin(t) * Float64(1.0 / t_1))))); elseif (ew <= 1.9e+22) tmp = abs(Float64(eh * fma(Float64(sin(t) * Float64(1.0 / Float64(eh * t_1))), ew, t_3))); else tmp = abs(Float64(ew * fma(eh, Float64(cos(t) * Float64(t_2 / ew)), Float64(sin(t) / t_1)))); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Sqrt[N[(eh * N[(eh / N[(ew * N[(ew * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Cos[t], $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[ew, -5e+32], N[Abs[N[(ew * N[(eh * N[(t$95$3 / ew), $MachinePrecision] + N[(N[Sin[t], $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 1.9e+22], N[Abs[N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * N[(1.0 / N[(eh * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * ew + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[(eh * N[(N[Cos[t], $MachinePrecision] * N[(t$95$2 / ew), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[t], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\mathsf{fma}\left(eh, \frac{eh}{ew \cdot \left(ew \cdot \left(t \cdot t\right)\right)}, 1\right)}\\
t_2 := \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
t_3 := \cos t \cdot t\_2\\
\mathbf{if}\;ew \leq -5 \cdot 10^{+32}:\\
\;\;\;\;\left|ew \cdot \mathsf{fma}\left(eh, \frac{t\_3}{ew}, \sin t \cdot \frac{1}{t\_1}\right)\right|\\
\mathbf{elif}\;ew \leq 1.9 \cdot 10^{+22}:\\
\;\;\;\;\left|eh \cdot \mathsf{fma}\left(\sin t \cdot \frac{1}{eh \cdot t\_1}, ew, t\_3\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \mathsf{fma}\left(eh, \cos t \cdot \frac{t\_2}{ew}, \frac{\sin t}{t\_1}\right)\right|\\
\end{array}
\end{array}
if ew < -4.9999999999999997e32Initial program 99.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9
Simplified99.9%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified99.7%
cos-atanN/A
times-fracN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.2
Applied egg-rr95.2%
if -4.9999999999999997e32 < ew < 1.9000000000000002e22Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.1
Simplified99.1%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified99.1%
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr97.1%
if 1.9000000000000002e22 < ew Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7
Simplified99.7%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified99.6%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr91.4%
Final simplification95.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sqrt (fma eh (/ eh (* ew (* ew (* t t)))) 1.0)))
(t_2 (sin (atan (/ eh (* ew (tan t))))))
(t_3 (fabs (* ew (fma eh (* (cos t) (/ t_2 ew)) (/ (sin t) t_1))))))
(if (<= ew -1.2e+32)
t_3
(if (<= ew 5e+20)
(fabs (* eh (fma (* (sin t) (/ 1.0 (* eh t_1))) ew (* (cos t) t_2))))
t_3))))
double code(double eh, double ew, double t) {
double t_1 = sqrt(fma(eh, (eh / (ew * (ew * (t * t)))), 1.0));
double t_2 = sin(atan((eh / (ew * tan(t)))));
double t_3 = fabs((ew * fma(eh, (cos(t) * (t_2 / ew)), (sin(t) / t_1))));
double tmp;
if (ew <= -1.2e+32) {
tmp = t_3;
} else if (ew <= 5e+20) {
tmp = fabs((eh * fma((sin(t) * (1.0 / (eh * t_1))), ew, (cos(t) * t_2))));
} else {
tmp = t_3;
}
return tmp;
}
function code(eh, ew, t) t_1 = sqrt(fma(eh, Float64(eh / Float64(ew * Float64(ew * Float64(t * t)))), 1.0)) t_2 = sin(atan(Float64(eh / Float64(ew * tan(t))))) t_3 = abs(Float64(ew * fma(eh, Float64(cos(t) * Float64(t_2 / ew)), Float64(sin(t) / t_1)))) tmp = 0.0 if (ew <= -1.2e+32) tmp = t_3; elseif (ew <= 5e+20) tmp = abs(Float64(eh * fma(Float64(sin(t) * Float64(1.0 / Float64(eh * t_1))), ew, Float64(cos(t) * t_2)))); else tmp = t_3; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Sqrt[N[(eh * N[(eh / N[(ew * N[(ew * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(ew * N[(eh * N[(N[Cos[t], $MachinePrecision] * N[(t$95$2 / ew), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[t], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -1.2e+32], t$95$3, If[LessEqual[ew, 5e+20], N[Abs[N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * N[(1.0 / N[(eh * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * ew + N[(N[Cos[t], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\mathsf{fma}\left(eh, \frac{eh}{ew \cdot \left(ew \cdot \left(t \cdot t\right)\right)}, 1\right)}\\
t_2 := \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
t_3 := \left|ew \cdot \mathsf{fma}\left(eh, \cos t \cdot \frac{t\_2}{ew}, \frac{\sin t}{t\_1}\right)\right|\\
\mathbf{if}\;ew \leq -1.2 \cdot 10^{+32}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;ew \leq 5 \cdot 10^{+20}:\\
\;\;\;\;\left|eh \cdot \mathsf{fma}\left(\sin t \cdot \frac{1}{eh \cdot t\_1}, ew, \cos t \cdot t\_2\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if ew < -1.19999999999999996e32 or 5e20 < ew Initial program 99.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8
Simplified99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified99.7%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr93.4%
if -1.19999999999999996e32 < ew < 5e20Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.1
Simplified99.1%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified99.1%
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr97.1%
Final simplification95.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sqrt (fma eh (/ eh (* ew (* ew (* t t)))) 1.0)))
(t_2 (sin (atan (/ eh (* ew (tan t))))))
(t_3 (fabs (* ew (fma (cos t) (* eh (/ t_2 ew)) (/ (sin t) t_1))))))
(if (<= ew -1e+33)
t_3
(if (<= ew 2.8e-5)
(fabs (* eh (fma (* (sin t) (/ 1.0 (* eh t_1))) ew (* (cos t) t_2))))
t_3))))
double code(double eh, double ew, double t) {
double t_1 = sqrt(fma(eh, (eh / (ew * (ew * (t * t)))), 1.0));
double t_2 = sin(atan((eh / (ew * tan(t)))));
double t_3 = fabs((ew * fma(cos(t), (eh * (t_2 / ew)), (sin(t) / t_1))));
double tmp;
if (ew <= -1e+33) {
tmp = t_3;
} else if (ew <= 2.8e-5) {
tmp = fabs((eh * fma((sin(t) * (1.0 / (eh * t_1))), ew, (cos(t) * t_2))));
} else {
tmp = t_3;
}
return tmp;
}
function code(eh, ew, t) t_1 = sqrt(fma(eh, Float64(eh / Float64(ew * Float64(ew * Float64(t * t)))), 1.0)) t_2 = sin(atan(Float64(eh / Float64(ew * tan(t))))) t_3 = abs(Float64(ew * fma(cos(t), Float64(eh * Float64(t_2 / ew)), Float64(sin(t) / t_1)))) tmp = 0.0 if (ew <= -1e+33) tmp = t_3; elseif (ew <= 2.8e-5) tmp = abs(Float64(eh * fma(Float64(sin(t) * Float64(1.0 / Float64(eh * t_1))), ew, Float64(cos(t) * t_2)))); else tmp = t_3; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Sqrt[N[(eh * N[(eh / N[(ew * N[(ew * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(eh * N[(t$95$2 / ew), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[t], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -1e+33], t$95$3, If[LessEqual[ew, 2.8e-5], N[Abs[N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * N[(1.0 / N[(eh * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * ew + N[(N[Cos[t], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\mathsf{fma}\left(eh, \frac{eh}{ew \cdot \left(ew \cdot \left(t \cdot t\right)\right)}, 1\right)}\\
t_2 := \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
t_3 := \left|ew \cdot \mathsf{fma}\left(\cos t, eh \cdot \frac{t\_2}{ew}, \frac{\sin t}{t\_1}\right)\right|\\
\mathbf{if}\;ew \leq -1 \cdot 10^{+33}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;ew \leq 2.8 \cdot 10^{-5}:\\
\;\;\;\;\left|eh \cdot \mathsf{fma}\left(\sin t \cdot \frac{1}{eh \cdot t\_1}, ew, \cos t \cdot t\_2\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if ew < -9.9999999999999995e32 or 2.79999999999999996e-5 < ew Initial program 99.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8
Simplified99.8%
Taylor expanded in ew around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified99.7%
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr92.9%
if -9.9999999999999995e32 < ew < 2.79999999999999996e-5Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.1
Simplified99.1%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified99.1%
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr97.7%
Final simplification95.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sin (atan (/ eh (* ew (tan t))))))
(t_2
(fabs
(fma
(/ (sin t) (sqrt (+ 1.0 (/ (* eh eh) (* (* t ew) (* t ew))))))
ew
(* (* eh (cos t)) t_1)))))
(if (<= t -0.0145)
t_2
(if (<= t 1e-19)
(fabs (fma ew (* t (cos (atan (/ eh (* t ew))))) (* eh t_1)))
t_2))))
double code(double eh, double ew, double t) {
double t_1 = sin(atan((eh / (ew * tan(t)))));
double t_2 = fabs(fma((sin(t) / sqrt((1.0 + ((eh * eh) / ((t * ew) * (t * ew)))))), ew, ((eh * cos(t)) * t_1)));
double tmp;
if (t <= -0.0145) {
tmp = t_2;
} else if (t <= 1e-19) {
tmp = fabs(fma(ew, (t * cos(atan((eh / (t * ew))))), (eh * t_1)));
} else {
tmp = t_2;
}
return tmp;
}
function code(eh, ew, t) t_1 = sin(atan(Float64(eh / Float64(ew * tan(t))))) t_2 = abs(fma(Float64(sin(t) / sqrt(Float64(1.0 + Float64(Float64(eh * eh) / Float64(Float64(t * ew) * Float64(t * ew)))))), ew, Float64(Float64(eh * cos(t)) * t_1))) tmp = 0.0 if (t <= -0.0145) tmp = t_2; elseif (t <= 1e-19) tmp = abs(fma(ew, Float64(t * cos(atan(Float64(eh / Float64(t * ew))))), Float64(eh * t_1))); else tmp = t_2; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[(N[Sin[t], $MachinePrecision] / N[Sqrt[N[(1.0 + N[(N[(eh * eh), $MachinePrecision] / N[(N[(t * ew), $MachinePrecision] * N[(t * ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * ew + N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -0.0145], t$95$2, If[LessEqual[t, 1e-19], N[Abs[N[(ew * N[(t * N[Cos[N[ArcTan[N[(eh / N[(t * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(eh * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
t_2 := \left|\mathsf{fma}\left(\frac{\sin t}{\sqrt{1 + \frac{eh \cdot eh}{\left(t \cdot ew\right) \cdot \left(t \cdot ew\right)}}}, ew, \left(eh \cdot \cos t\right) \cdot t\_1\right)\right|\\
\mathbf{if}\;t \leq -0.0145:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 10^{-19}:\\
\;\;\;\;\left|\mathsf{fma}\left(ew, t \cdot \cos \tan^{-1} \left(\frac{eh}{t \cdot ew}\right), eh \cdot t\_1\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -0.0145000000000000007 or 9.9999999999999998e-20 < t Initial program 99.5%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.0
Simplified99.0%
associate-*l*N/A
*-commutativeN/A
associate-/r*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr88.2%
if -0.0145000000000000007 < t < 9.9999999999999998e-20Initial program 99.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9
Simplified99.9%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified98.2%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/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.f6499.2
Simplified99.2%
Final simplification93.2%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (cos t)))
(t_2 (* ew (tan t)))
(t_3
(fabs
(fma
(/ (* eh t_1) t_2)
(/ 1.0 (sqrt (fma eh (* eh (pow t_2 -2.0)) 1.0)))
(* ew (sin t))))))
(if (<= ew -6.2e+56) t_3 (if (<= ew 8.2e+17) (fabs t_1) t_3))))
double code(double eh, double ew, double t) {
double t_1 = eh * cos(t);
double t_2 = ew * tan(t);
double t_3 = fabs(fma(((eh * t_1) / t_2), (1.0 / sqrt(fma(eh, (eh * pow(t_2, -2.0)), 1.0))), (ew * sin(t))));
double tmp;
if (ew <= -6.2e+56) {
tmp = t_3;
} else if (ew <= 8.2e+17) {
tmp = fabs(t_1);
} else {
tmp = t_3;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(eh * cos(t)) t_2 = Float64(ew * tan(t)) t_3 = abs(fma(Float64(Float64(eh * t_1) / t_2), Float64(1.0 / sqrt(fma(eh, Float64(eh * (t_2 ^ -2.0)), 1.0))), Float64(ew * sin(t)))) tmp = 0.0 if (ew <= -6.2e+56) tmp = t_3; elseif (ew <= 8.2e+17) tmp = abs(t_1); else tmp = t_3; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[(N[(N[(eh * t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(eh * N[(eh * N[Power[t$95$2, -2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -6.2e+56], t$95$3, If[LessEqual[ew, 8.2e+17], N[Abs[t$95$1], $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \cos t\\
t_2 := ew \cdot \tan t\\
t_3 := \left|\mathsf{fma}\left(\frac{eh \cdot t\_1}{t\_2}, \frac{1}{\sqrt{\mathsf{fma}\left(eh, eh \cdot {t\_2}^{-2}, 1\right)}}, ew \cdot \sin t\right)\right|\\
\mathbf{if}\;ew \leq -6.2 \cdot 10^{+56}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;ew \leq 8.2 \cdot 10^{+17}:\\
\;\;\;\;\left|t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if ew < -6.20000000000000009e56 or 8.2e17 < ew Initial program 99.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8
Simplified99.8%
Applied egg-rr69.4%
Taylor expanded in eh around 0
Simplified71.9%
if -6.20000000000000009e56 < ew < 8.2e17Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.2
Simplified99.2%
Applied egg-rr22.9%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
cos-lowering-cos.f6485.5
Simplified85.5%
Final simplification79.3%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (* t ew) (* t ew))) (t_2 (* ew (sin t))))
(if (<= ew -2.6e+96)
(fabs
(fma
(/ (* eh eh) (* t ew))
(/ 1.0 (sqrt (fma eh (/ eh t_1) 1.0)))
(/ t_2 (sqrt (+ 1.0 (/ (* eh eh) t_1))))))
(if (<= ew 4.3e+15) (fabs (* eh (cos t))) (fabs t_2)))))
double code(double eh, double ew, double t) {
double t_1 = (t * ew) * (t * ew);
double t_2 = ew * sin(t);
double tmp;
if (ew <= -2.6e+96) {
tmp = fabs(fma(((eh * eh) / (t * ew)), (1.0 / sqrt(fma(eh, (eh / t_1), 1.0))), (t_2 / sqrt((1.0 + ((eh * eh) / t_1))))));
} else if (ew <= 4.3e+15) {
tmp = fabs((eh * cos(t)));
} else {
tmp = fabs(t_2);
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(Float64(t * ew) * Float64(t * ew)) t_2 = Float64(ew * sin(t)) tmp = 0.0 if (ew <= -2.6e+96) tmp = abs(fma(Float64(Float64(eh * eh) / Float64(t * ew)), Float64(1.0 / sqrt(fma(eh, Float64(eh / t_1), 1.0))), Float64(t_2 / sqrt(Float64(1.0 + Float64(Float64(eh * eh) / t_1)))))); elseif (ew <= 4.3e+15) tmp = abs(Float64(eh * cos(t))); else tmp = abs(t_2); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(t * ew), $MachinePrecision] * N[(t * ew), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -2.6e+96], N[Abs[N[(N[(N[(eh * eh), $MachinePrecision] / N[(t * ew), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(eh * N[(eh / t$95$1), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 / N[Sqrt[N[(1.0 + N[(N[(eh * eh), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 4.3e+15], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[t$95$2], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t \cdot ew\right) \cdot \left(t \cdot ew\right)\\
t_2 := ew \cdot \sin t\\
\mathbf{if}\;ew \leq -2.6 \cdot 10^{+96}:\\
\;\;\;\;\left|\mathsf{fma}\left(\frac{eh \cdot eh}{t \cdot ew}, \frac{1}{\sqrt{\mathsf{fma}\left(eh, \frac{eh}{t\_1}, 1\right)}}, \frac{t\_2}{\sqrt{1 + \frac{eh \cdot eh}{t\_1}}}\right)\right|\\
\mathbf{elif}\;ew \leq 4.3 \cdot 10^{+15}:\\
\;\;\;\;\left|eh \cdot \cos t\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t\_2\right|\\
\end{array}
\end{array}
if ew < -2.6e96Initial program 99.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8
Simplified99.8%
Applied egg-rr75.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6473.3
Simplified73.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
unswap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6473.3
Simplified73.3%
if -2.6e96 < ew < 4.3e15Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.2
Simplified99.2%
Applied egg-rr24.7%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
cos-lowering-cos.f6482.5
Simplified82.5%
if 4.3e15 < ew Initial program 99.7%
Applied egg-rr50.8%
Taylor expanded in eh around 0
*-lowering-*.f64N/A
sin-lowering-sin.f6471.9
Simplified71.9%
Final simplification78.5%
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (fabs (* eh (cos t))))) (if (<= eh -1.18e-88) t_1 (if (<= eh 5.4e-89) (fabs (* ew (sin t))) t_1))))
double code(double eh, double ew, double t) {
double t_1 = fabs((eh * cos(t)));
double tmp;
if (eh <= -1.18e-88) {
tmp = t_1;
} else if (eh <= 5.4e-89) {
tmp = fabs((ew * 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((eh * cos(t)))
if (eh <= (-1.18d-88)) then
tmp = t_1
else if (eh <= 5.4d-89) then
tmp = abs((ew * 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((eh * Math.cos(t)));
double tmp;
if (eh <= -1.18e-88) {
tmp = t_1;
} else if (eh <= 5.4e-89) {
tmp = Math.abs((ew * Math.sin(t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs((eh * math.cos(t))) tmp = 0 if eh <= -1.18e-88: tmp = t_1 elif eh <= 5.4e-89: tmp = math.fabs((ew * math.sin(t))) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(eh * cos(t))) tmp = 0.0 if (eh <= -1.18e-88) tmp = t_1; elseif (eh <= 5.4e-89) tmp = abs(Float64(ew * sin(t))); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = abs((eh * cos(t))); tmp = 0.0; if (eh <= -1.18e-88) tmp = t_1; elseif (eh <= 5.4e-89) tmp = abs((ew * sin(t))); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -1.18e-88], t$95$1, If[LessEqual[eh, 5.4e-89], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|eh \cdot \cos t\right|\\
\mathbf{if}\;eh \leq -1.18 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;eh \leq 5.4 \cdot 10^{-89}:\\
\;\;\;\;\left|ew \cdot \sin t\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if eh < -1.18000000000000004e-88 or 5.39999999999999975e-89 < eh Initial program 99.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7
Simplified99.7%
Applied egg-rr31.2%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
cos-lowering-cos.f6481.8
Simplified81.8%
if -1.18000000000000004e-88 < eh < 5.39999999999999975e-89Initial program 99.7%
Applied egg-rr45.6%
Taylor expanded in eh around 0
*-lowering-*.f64N/A
sin-lowering-sin.f6471.1
Simplified71.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.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.4
Simplified99.4%
Applied egg-rr44.1%
Taylor expanded in eh around inf
*-lowering-*.f64N/A
cos-lowering-cos.f6463.3
Simplified63.3%
(FPCore (eh ew t) :precision binary64 (if (<= eh -2.5e-89) (fabs eh) (if (<= eh 1.2e-185) (fabs (* t ew)) (fabs eh))))
double code(double eh, double ew, double t) {
double tmp;
if (eh <= -2.5e-89) {
tmp = fabs(eh);
} else if (eh <= 1.2e-185) {
tmp = fabs((t * ew));
} else {
tmp = fabs(eh);
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if (eh <= (-2.5d-89)) then
tmp = abs(eh)
else if (eh <= 1.2d-185) then
tmp = abs((t * ew))
else
tmp = abs(eh)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (eh <= -2.5e-89) {
tmp = Math.abs(eh);
} else if (eh <= 1.2e-185) {
tmp = Math.abs((t * ew));
} else {
tmp = Math.abs(eh);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if eh <= -2.5e-89: tmp = math.fabs(eh) elif eh <= 1.2e-185: tmp = math.fabs((t * ew)) else: tmp = math.fabs(eh) return tmp
function code(eh, ew, t) tmp = 0.0 if (eh <= -2.5e-89) tmp = abs(eh); elseif (eh <= 1.2e-185) tmp = abs(Float64(t * ew)); else tmp = abs(eh); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (eh <= -2.5e-89) tmp = abs(eh); elseif (eh <= 1.2e-185) tmp = abs((t * ew)); else tmp = abs(eh); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[eh, -2.5e-89], N[Abs[eh], $MachinePrecision], If[LessEqual[eh, 1.2e-185], N[Abs[N[(t * ew), $MachinePrecision]], $MachinePrecision], N[Abs[eh], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -2.5 \cdot 10^{-89}:\\
\;\;\;\;\left|eh\right|\\
\mathbf{elif}\;eh \leq 1.2 \cdot 10^{-185}:\\
\;\;\;\;\left|t \cdot ew\right|\\
\mathbf{else}:\\
\;\;\;\;\left|eh\right|\\
\end{array}
\end{array}
if eh < -2.49999999999999983e-89 or 1.2000000000000001e-185 < eh Initial program 99.7%
Taylor expanded in t around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6453.1
Simplified53.1%
sin-atanN/A
div-invN/A
associate-/l*N/A
div-invN/A
div-invN/A
swap-sqrN/A
inv-powN/A
inv-powN/A
pow-prod-upN/A
metadata-evalN/A
Applied egg-rr13.1%
Taylor expanded in eh around inf
Simplified53.4%
if -2.49999999999999983e-89 < eh < 1.2000000000000001e-185Initial program 99.7%
Applied egg-rr47.4%
Taylor expanded in eh around 0
*-lowering-*.f64N/A
sin-lowering-sin.f6476.0
Simplified76.0%
Taylor expanded in t around 0
*-commutativeN/A
*-lowering-*.f6429.7
Simplified29.7%
(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.7%
Taylor expanded in t around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6442.8
Simplified42.8%
sin-atanN/A
div-invN/A
associate-/l*N/A
div-invN/A
div-invN/A
swap-sqrN/A
inv-powN/A
inv-powN/A
pow-prod-upN/A
metadata-evalN/A
Applied egg-rr10.6%
Taylor expanded in eh around inf
Simplified43.2%
herbie shell --seed 2024199
(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))))))))