
(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 19 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 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(fma(ew, (sin(t) * cos(t_1)), (eh * (cos(t) * sin(t_1)))));
}
function code(eh, ew, t) t_1 = atan(Float64(eh / Float64(ew * tan(t)))) return abs(fma(ew, Float64(sin(t) * cos(t_1)), Float64(eh * Float64(cos(t) * sin(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[(ew * N[(N[Sin[t], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $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(ew, \sin t \cdot \cos t\_1, eh \cdot \left(\cos t \cdot \sin t\_1\right)\right)\right|
\end{array}
\end{array}
Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ eh (* ew (tan t)))))
(fabs
(+
(/ (* ew (sin t)) (hypot 1.0 t_1))
(* (sin (atan t_1)) (* eh (cos t)))))))
double code(double eh, double ew, double t) {
double t_1 = eh / (ew * tan(t));
return fabs((((ew * sin(t)) / hypot(1.0, t_1)) + (sin(atan(t_1)) * (eh * cos(t)))));
}
public static double code(double eh, double ew, double t) {
double t_1 = eh / (ew * Math.tan(t));
return Math.abs((((ew * Math.sin(t)) / Math.hypot(1.0, t_1)) + (Math.sin(Math.atan(t_1)) * (eh * Math.cos(t)))));
}
def code(eh, ew, t): t_1 = eh / (ew * math.tan(t)) return math.fabs((((ew * math.sin(t)) / math.hypot(1.0, t_1)) + (math.sin(math.atan(t_1)) * (eh * math.cos(t)))))
function code(eh, ew, t) t_1 = Float64(eh / Float64(ew * tan(t))) return abs(Float64(Float64(Float64(ew * sin(t)) / hypot(1.0, t_1)) + Float64(sin(atan(t_1)) * Float64(eh * cos(t))))) end
function tmp = code(eh, ew, t) t_1 = eh / (ew * tan(t)); tmp = abs((((ew * sin(t)) / hypot(1.0, t_1)) + (sin(atan(t_1)) * (eh * cos(t))))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision] * N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{eh}{ew \cdot \tan t}\\
\left|\frac{ew \cdot \sin t}{\mathsf{hypot}\left(1, t\_1\right)} + \sin \tan^{-1} t\_1 \cdot \left(eh \cdot \cos t\right)\right|
\end{array}
\end{array}
Initial program 99.8%
associate-/r*99.8%
cos-atan99.8%
un-div-inv99.8%
hypot-1-def99.8%
Applied egg-rr99.8%
associate-/r*99.8%
*-un-lft-identity99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in eh around 0 99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (+ (/ (* ew (sin t)) (hypot 1.0 (/ eh (* ew 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 * 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 * 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 * t)))) + ((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)) / hypot(1.0, Float64(eh / Float64(ew * 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 * t)))) + ((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[Sqrt[1.0 ^ 2 + N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision] ^ 2], $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|\frac{ew \cdot \sin t}{\mathsf{hypot}\left(1, \frac{eh}{ew \cdot 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-/r*99.8%
cos-atan99.8%
un-div-inv99.8%
hypot-1-def99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (eh ew t) :precision binary64 (fabs (fma ew (sin t) (* eh (* (cos t) (sin (atan (/ eh (* ew (tan t))))))))))
double code(double eh, double ew, double t) {
return fabs(fma(ew, sin(t), (eh * (cos(t) * sin(atan((eh / (ew * tan(t)))))))));
}
function code(eh, ew, t) return abs(fma(ew, sin(t), Float64(eh * 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[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\mathsf{fma}\left(ew, \sin t, eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right)\right)\right|
\end{array}
Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
cos-atan99.8%
un-div-inv99.8%
hypot-1-def99.8%
Applied egg-rr99.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in eh around 0 97.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (/ eh ew) (tan t)))
(t_2 (atan t_1))
(t_3 (sin t_2))
(t_4 (* eh t_3)))
(if (<= t -200000000000.0)
(fma eh (* (cos t) t_3) (* ew (sin t)))
(if (<= t 64000000.0)
(fabs (+ t_4 (/ (* ew t) (hypot 1.0 t_1))))
(if (<= t 1.02e+88)
(fabs (* (sin t) (* ew (cos t_2))))
(fabs (* (cos t) t_4)))))))
double code(double eh, double ew, double t) {
double t_1 = (eh / ew) / tan(t);
double t_2 = atan(t_1);
double t_3 = sin(t_2);
double t_4 = eh * t_3;
double tmp;
if (t <= -200000000000.0) {
tmp = fma(eh, (cos(t) * t_3), (ew * sin(t)));
} else if (t <= 64000000.0) {
tmp = fabs((t_4 + ((ew * t) / hypot(1.0, t_1))));
} else if (t <= 1.02e+88) {
tmp = fabs((sin(t) * (ew * cos(t_2))));
} else {
tmp = fabs((cos(t) * t_4));
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(Float64(eh / ew) / tan(t)) t_2 = atan(t_1) t_3 = sin(t_2) t_4 = Float64(eh * t_3) tmp = 0.0 if (t <= -200000000000.0) tmp = fma(eh, Float64(cos(t) * t_3), Float64(ew * sin(t))); elseif (t <= 64000000.0) tmp = abs(Float64(t_4 + Float64(Float64(ew * t) / hypot(1.0, t_1)))); elseif (t <= 1.02e+88) tmp = abs(Float64(sin(t) * Float64(ew * cos(t_2)))); else tmp = abs(Float64(cos(t) * t_4)); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(eh * t$95$3), $MachinePrecision]}, If[LessEqual[t, -200000000000.0], N[(eh * N[(N[Cos[t], $MachinePrecision] * t$95$3), $MachinePrecision] + N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 64000000.0], N[Abs[N[(t$95$4 + N[(N[(ew * t), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.02e+88], N[Abs[N[(N[Sin[t], $MachinePrecision] * N[(ew * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Cos[t], $MachinePrecision] * t$95$4), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{eh}{ew}}{\tan t}\\
t_2 := \tan^{-1} t\_1\\
t_3 := \sin t\_2\\
t_4 := eh \cdot t\_3\\
\mathbf{if}\;t \leq -200000000000:\\
\;\;\;\;\mathsf{fma}\left(eh, \cos t \cdot t\_3, ew \cdot \sin t\right)\\
\mathbf{elif}\;t \leq 64000000:\\
\;\;\;\;\left|t\_4 + \frac{ew \cdot t}{\mathsf{hypot}\left(1, t\_1\right)}\right|\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+88}:\\
\;\;\;\;\left|\sin t \cdot \left(ew \cdot \cos t\_2\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\cos t \cdot t\_4\right|\\
\end{array}
\end{array}
if t < -2e11Initial program 99.4%
associate-*l*99.4%
fma-define99.4%
associate-/r*99.4%
associate-*l*99.4%
associate-/r*99.4%
Simplified99.4%
add-cube-cbrt97.9%
pow398.0%
Applied egg-rr70.7%
Taylor expanded in eh around 0 69.4%
fma-define69.4%
associate-/r*69.4%
Simplified69.4%
if -2e11 < t < 6.4e7Initial program 100.0%
associate-*l*100.0%
fma-define100.0%
associate-/r*100.0%
associate-*l*100.0%
associate-/r*100.0%
Simplified100.0%
Taylor expanded in t around 0 97.7%
fma-define97.7%
associate-/r*97.7%
associate-*r*97.7%
associate-/r*97.7%
Simplified97.7%
fma-undefine97.7%
associate-/r*97.7%
cos-atan97.7%
hypot-1-def97.7%
un-div-inv97.7%
associate-/r*97.7%
Applied egg-rr97.7%
if 6.4e7 < t < 1.01999999999999998e88Initial program 99.9%
associate-*l*99.9%
fma-define99.9%
associate-/r*99.9%
associate-*l*99.9%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in t around 0 75.1%
associate-/r*75.1%
Simplified75.1%
Taylor expanded in ew around inf 68.7%
associate-*r*68.7%
associate-/r*68.7%
Simplified68.7%
if 1.01999999999999998e88 < t Initial program 99.5%
associate-*l*99.5%
fma-define99.5%
associate-/r*99.5%
associate-*l*99.5%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in ew around 0 69.8%
associate-*r*69.8%
*-commutative69.8%
associate-*l*69.8%
associate-/r*69.8%
Simplified69.8%
Final simplification85.3%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (/ (/ eh ew) (tan t))))
(t_2 (fabs (* (sin t) (* ew (cos t_1))))))
(if (<= ew -1e+127)
t_2
(if (<= ew -7.5e-55)
(fma eh (* (cos t) (sin t_1)) (* ew (sin t)))
(if (<= ew 1.9e+57)
(fabs (* eh (* (cos t) (sin (atan (/ eh (* ew (tan t))))))))
t_2)))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh / ew) / tan(t)));
double t_2 = fabs((sin(t) * (ew * cos(t_1))));
double tmp;
if (ew <= -1e+127) {
tmp = t_2;
} else if (ew <= -7.5e-55) {
tmp = fma(eh, (cos(t) * sin(t_1)), (ew * sin(t)));
} else if (ew <= 1.9e+57) {
tmp = fabs((eh * (cos(t) * sin(atan((eh / (ew * tan(t))))))));
} else {
tmp = t_2;
}
return tmp;
}
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh / ew) / tan(t))) t_2 = abs(Float64(sin(t) * Float64(ew * cos(t_1)))) tmp = 0.0 if (ew <= -1e+127) tmp = t_2; elseif (ew <= -7.5e-55) tmp = fma(eh, Float64(cos(t) * sin(t_1)), Float64(ew * sin(t))); elseif (ew <= 1.9e+57) tmp = abs(Float64(eh * Float64(cos(t) * sin(atan(Float64(eh / Float64(ew * tan(t)))))))); else tmp = t_2; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[Sin[t], $MachinePrecision] * N[(ew * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -1e+127], t$95$2, If[LessEqual[ew, -7.5e-55], N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 1.9e+57], N[Abs[N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
t_2 := \left|\sin t \cdot \left(ew \cdot \cos t\_1\right)\right|\\
\mathbf{if}\;ew \leq -1 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;ew \leq -7.5 \cdot 10^{-55}:\\
\;\;\;\;\mathsf{fma}\left(eh, \cos t \cdot \sin t\_1, ew \cdot \sin t\right)\\
\mathbf{elif}\;ew \leq 1.9 \cdot 10^{+57}:\\
\;\;\;\;\left|eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if ew < -9.99999999999999955e126 or 1.8999999999999999e57 < ew Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in t around 0 94.4%
associate-/r*94.4%
Simplified94.4%
Taylor expanded in ew around inf 77.1%
associate-*r*77.1%
associate-/r*77.1%
Simplified77.1%
if -9.99999999999999955e126 < ew < -7.50000000000000023e-55Initial program 99.6%
associate-*l*99.5%
fma-define99.6%
associate-/r*99.6%
associate-*l*99.6%
associate-/r*99.6%
Simplified99.6%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr72.1%
Taylor expanded in eh around 0 70.5%
fma-define70.6%
associate-/r*70.6%
Simplified70.6%
if -7.50000000000000023e-55 < ew < 1.8999999999999999e57Initial program 99.8%
associate-*l*99.8%
fma-define99.9%
associate-/r*99.9%
associate-*l*99.9%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in ew around 0 88.5%
Final simplification81.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (* (cos t) (sin (atan (/ eh (* ew (tan t))))))))
(t_2 (fabs (* (sin t) (* ew (cos (atan (/ (/ eh ew) (tan t)))))))))
(if (<= ew -1.05e+122)
t_2
(if (<= ew -7.5e-51)
(+ t_1 (* ew (sin t)))
(if (<= ew 5.8e+52) (fabs t_1) t_2)))))
double code(double eh, double ew, double t) {
double t_1 = eh * (cos(t) * sin(atan((eh / (ew * tan(t))))));
double t_2 = fabs((sin(t) * (ew * cos(atan(((eh / ew) / tan(t)))))));
double tmp;
if (ew <= -1.05e+122) {
tmp = t_2;
} else if (ew <= -7.5e-51) {
tmp = t_1 + (ew * sin(t));
} else if (ew <= 5.8e+52) {
tmp = fabs(t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = eh * (cos(t) * sin(atan((eh / (ew * tan(t))))))
t_2 = abs((sin(t) * (ew * cos(atan(((eh / ew) / tan(t)))))))
if (ew <= (-1.05d+122)) then
tmp = t_2
else if (ew <= (-7.5d-51)) then
tmp = t_1 + (ew * sin(t))
else if (ew <= 5.8d+52) then
tmp = abs(t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * (Math.cos(t) * Math.sin(Math.atan((eh / (ew * Math.tan(t))))));
double t_2 = Math.abs((Math.sin(t) * (ew * Math.cos(Math.atan(((eh / ew) / Math.tan(t)))))));
double tmp;
if (ew <= -1.05e+122) {
tmp = t_2;
} else if (ew <= -7.5e-51) {
tmp = t_1 + (ew * Math.sin(t));
} else if (ew <= 5.8e+52) {
tmp = Math.abs(t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * (math.cos(t) * math.sin(math.atan((eh / (ew * math.tan(t)))))) t_2 = math.fabs((math.sin(t) * (ew * math.cos(math.atan(((eh / ew) / math.tan(t))))))) tmp = 0 if ew <= -1.05e+122: tmp = t_2 elif ew <= -7.5e-51: tmp = t_1 + (ew * math.sin(t)) elif ew <= 5.8e+52: tmp = math.fabs(t_1) else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = Float64(eh * Float64(cos(t) * sin(atan(Float64(eh / Float64(ew * tan(t))))))) t_2 = abs(Float64(sin(t) * Float64(ew * cos(atan(Float64(Float64(eh / ew) / tan(t))))))) tmp = 0.0 if (ew <= -1.05e+122) tmp = t_2; elseif (ew <= -7.5e-51) tmp = Float64(t_1 + Float64(ew * sin(t))); elseif (ew <= 5.8e+52) tmp = abs(t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * (cos(t) * sin(atan((eh / (ew * tan(t)))))); t_2 = abs((sin(t) * (ew * cos(atan(((eh / ew) / tan(t))))))); tmp = 0.0; if (ew <= -1.05e+122) tmp = t_2; elseif (ew <= -7.5e-51) tmp = t_1 + (ew * sin(t)); elseif (ew <= 5.8e+52) tmp = abs(t_1); else tmp = t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[Sin[t], $MachinePrecision] * N[(ew * N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -1.05e+122], t$95$2, If[LessEqual[ew, -7.5e-51], N[(t$95$1 + N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 5.8e+52], N[Abs[t$95$1], $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right)\\
t_2 := \left|\sin t \cdot \left(ew \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right|\\
\mathbf{if}\;ew \leq -1.05 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;ew \leq -7.5 \cdot 10^{-51}:\\
\;\;\;\;t\_1 + ew \cdot \sin t\\
\mathbf{elif}\;ew \leq 5.8 \cdot 10^{+52}:\\
\;\;\;\;\left|t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if ew < -1.05000000000000008e122 or 5.8e52 < ew Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in t around 0 94.4%
associate-/r*94.4%
Simplified94.4%
Taylor expanded in ew around inf 77.1%
associate-*r*77.1%
associate-/r*77.1%
Simplified77.1%
if -1.05000000000000008e122 < ew < -7.49999999999999976e-51Initial program 99.6%
associate-*l*99.6%
fma-define99.6%
associate-/r*99.6%
associate-*l*99.6%
associate-/r*99.6%
Simplified99.6%
add-cube-cbrt98.0%
pow397.9%
Applied egg-rr71.4%
Taylor expanded in eh around 0 69.7%
if -7.49999999999999976e-51 < ew < 5.8e52Initial program 99.8%
associate-*l*99.8%
fma-define99.9%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in ew around 0 88.6%
Final simplification81.7%
(FPCore (eh ew t) :precision binary64 (if (or (<= ew -1e-25) (not (<= ew 2.9e+53))) (fabs (* (sin t) (* ew (cos (atan (/ (/ eh ew) (tan t))))))) (fabs (* eh (* (cos t) (sin (atan (/ eh (* ew (tan t))))))))))
double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -1e-25) || !(ew <= 2.9e+53)) {
tmp = fabs((sin(t) * (ew * cos(atan(((eh / ew) / tan(t)))))));
} else {
tmp = fabs((eh * (cos(t) * sin(atan((eh / (ew * 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) :: tmp
if ((ew <= (-1d-25)) .or. (.not. (ew <= 2.9d+53))) then
tmp = abs((sin(t) * (ew * cos(atan(((eh / ew) / tan(t)))))))
else
tmp = abs((eh * (cos(t) * sin(atan((eh / (ew * tan(t))))))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -1e-25) || !(ew <= 2.9e+53)) {
tmp = Math.abs((Math.sin(t) * (ew * Math.cos(Math.atan(((eh / ew) / Math.tan(t)))))));
} else {
tmp = Math.abs((eh * (Math.cos(t) * Math.sin(Math.atan((eh / (ew * Math.tan(t))))))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (ew <= -1e-25) or not (ew <= 2.9e+53): tmp = math.fabs((math.sin(t) * (ew * math.cos(math.atan(((eh / ew) / math.tan(t))))))) else: tmp = math.fabs((eh * (math.cos(t) * math.sin(math.atan((eh / (ew * math.tan(t)))))))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((ew <= -1e-25) || !(ew <= 2.9e+53)) tmp = abs(Float64(sin(t) * Float64(ew * cos(atan(Float64(Float64(eh / ew) / tan(t))))))); else tmp = abs(Float64(eh * Float64(cos(t) * sin(atan(Float64(eh / Float64(ew * tan(t)))))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((ew <= -1e-25) || ~((ew <= 2.9e+53))) tmp = abs((sin(t) * (ew * cos(atan(((eh / ew) / tan(t))))))); else tmp = abs((eh * (cos(t) * sin(atan((eh / (ew * tan(t)))))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -1e-25], N[Not[LessEqual[ew, 2.9e+53]], $MachinePrecision]], N[Abs[N[(N[Sin[t], $MachinePrecision] * N[(ew * N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -1 \cdot 10^{-25} \lor \neg \left(ew \leq 2.9 \cdot 10^{+53}\right):\\
\;\;\;\;\left|\sin t \cdot \left(ew \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right)\right|\\
\end{array}
\end{array}
if ew < -1.00000000000000004e-25 or 2.9000000000000002e53 < ew Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in t around 0 92.3%
associate-/r*92.3%
Simplified92.3%
Taylor expanded in ew around inf 71.5%
associate-*r*71.5%
associate-/r*71.5%
Simplified71.5%
if -1.00000000000000004e-25 < ew < 2.9000000000000002e53Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in ew around 0 88.2%
Final simplification79.9%
(FPCore (eh ew t) :precision binary64 (if (or (<= ew -3.4e+75) (not (<= ew 8.8e+55))) (pow (sqrt (pow (cbrt (* ew (sin t))) 2.0)) 3.0) (fabs (* eh (* (cos t) (sin (atan (/ eh (* ew (tan t))))))))))
double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -3.4e+75) || !(ew <= 8.8e+55)) {
tmp = pow(sqrt(pow(cbrt((ew * sin(t))), 2.0)), 3.0);
} else {
tmp = fabs((eh * (cos(t) * sin(atan((eh / (ew * tan(t))))))));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -3.4e+75) || !(ew <= 8.8e+55)) {
tmp = Math.pow(Math.sqrt(Math.pow(Math.cbrt((ew * Math.sin(t))), 2.0)), 3.0);
} else {
tmp = Math.abs((eh * (Math.cos(t) * Math.sin(Math.atan((eh / (ew * Math.tan(t))))))));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if ((ew <= -3.4e+75) || !(ew <= 8.8e+55)) tmp = sqrt((cbrt(Float64(ew * sin(t))) ^ 2.0)) ^ 3.0; else tmp = abs(Float64(eh * Float64(cos(t) * sin(atan(Float64(eh / Float64(ew * tan(t)))))))); end return tmp end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -3.4e+75], N[Not[LessEqual[ew, 8.8e+55]], $MachinePrecision]], N[Power[N[Sqrt[N[Power[N[Power[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision], 3.0], $MachinePrecision], N[Abs[N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -3.4 \cdot 10^{+75} \lor \neg \left(ew \leq 8.8 \cdot 10^{+55}\right):\\
\;\;\;\;{\left(\sqrt{{\left(\sqrt[3]{ew \cdot \sin t}\right)}^{2}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\left|eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right)\right|\\
\end{array}
\end{array}
if ew < -3.40000000000000011e75 or 8.80000000000000042e55 < ew Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr57.5%
Taylor expanded in ew around inf 46.7%
add-sqr-sqrt46.1%
sqrt-unprod74.1%
pow274.1%
Applied egg-rr74.1%
if -3.40000000000000011e75 < ew < 8.80000000000000042e55Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in ew around 0 83.1%
Final simplification79.3%
(FPCore (eh ew t) :precision binary64 (if (or (<= ew -1.35e-25) (not (<= ew 1.65e+28))) (pow (sqrt (pow (cbrt (* ew (sin t))) 2.0)) 3.0) (fabs (* eh (* (cos t) (sin (atan (/ eh (* ew t)))))))))
double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -1.35e-25) || !(ew <= 1.65e+28)) {
tmp = pow(sqrt(pow(cbrt((ew * sin(t))), 2.0)), 3.0);
} else {
tmp = fabs((eh * (cos(t) * sin(atan((eh / (ew * t)))))));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -1.35e-25) || !(ew <= 1.65e+28)) {
tmp = Math.pow(Math.sqrt(Math.pow(Math.cbrt((ew * Math.sin(t))), 2.0)), 3.0);
} else {
tmp = Math.abs((eh * (Math.cos(t) * Math.sin(Math.atan((eh / (ew * t)))))));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if ((ew <= -1.35e-25) || !(ew <= 1.65e+28)) tmp = sqrt((cbrt(Float64(ew * sin(t))) ^ 2.0)) ^ 3.0; else tmp = abs(Float64(eh * Float64(cos(t) * sin(atan(Float64(eh / Float64(ew * t))))))); end return tmp end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -1.35e-25], N[Not[LessEqual[ew, 1.65e+28]], $MachinePrecision]], N[Power[N[Sqrt[N[Power[N[Power[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision], 3.0], $MachinePrecision], N[Abs[N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -1.35 \cdot 10^{-25} \lor \neg \left(ew \leq 1.65 \cdot 10^{+28}\right):\\
\;\;\;\;{\left(\sqrt{{\left(\sqrt[3]{ew \cdot \sin t}\right)}^{2}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\left|eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)\right)\right|\\
\end{array}
\end{array}
if ew < -1.35000000000000008e-25 or 1.65e28 < ew Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr58.6%
Taylor expanded in ew around inf 45.3%
add-sqr-sqrt44.8%
sqrt-unprod69.6%
pow269.6%
Applied egg-rr69.6%
if -1.35000000000000008e-25 < ew < 1.65e28Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in ew around 0 88.7%
Taylor expanded in t around 0 76.0%
*-commutative99.2%
Simplified76.0%
Final simplification72.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (sin t))))
(if (<= ew -8.6e+214)
t_1
(if (<= ew -1.6e-25)
(sqrt (pow t_1 2.0))
(if (<= ew 2.1e+25)
(fabs (* eh (* (cos t) (sin (atan (/ eh (* ew t)))))))
(* ew (sqrt (pow (sin t) 2.0))))))))
double code(double eh, double ew, double t) {
double t_1 = ew * sin(t);
double tmp;
if (ew <= -8.6e+214) {
tmp = t_1;
} else if (ew <= -1.6e-25) {
tmp = sqrt(pow(t_1, 2.0));
} else if (ew <= 2.1e+25) {
tmp = fabs((eh * (cos(t) * sin(atan((eh / (ew * t)))))));
} else {
tmp = ew * sqrt(pow(sin(t), 2.0));
}
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 = ew * sin(t)
if (ew <= (-8.6d+214)) then
tmp = t_1
else if (ew <= (-1.6d-25)) then
tmp = sqrt((t_1 ** 2.0d0))
else if (ew <= 2.1d+25) then
tmp = abs((eh * (cos(t) * sin(atan((eh / (ew * t)))))))
else
tmp = ew * sqrt((sin(t) ** 2.0d0))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = ew * Math.sin(t);
double tmp;
if (ew <= -8.6e+214) {
tmp = t_1;
} else if (ew <= -1.6e-25) {
tmp = Math.sqrt(Math.pow(t_1, 2.0));
} else if (ew <= 2.1e+25) {
tmp = Math.abs((eh * (Math.cos(t) * Math.sin(Math.atan((eh / (ew * t)))))));
} else {
tmp = ew * Math.sqrt(Math.pow(Math.sin(t), 2.0));
}
return tmp;
}
def code(eh, ew, t): t_1 = ew * math.sin(t) tmp = 0 if ew <= -8.6e+214: tmp = t_1 elif ew <= -1.6e-25: tmp = math.sqrt(math.pow(t_1, 2.0)) elif ew <= 2.1e+25: tmp = math.fabs((eh * (math.cos(t) * math.sin(math.atan((eh / (ew * t))))))) else: tmp = ew * math.sqrt(math.pow(math.sin(t), 2.0)) return tmp
function code(eh, ew, t) t_1 = Float64(ew * sin(t)) tmp = 0.0 if (ew <= -8.6e+214) tmp = t_1; elseif (ew <= -1.6e-25) tmp = sqrt((t_1 ^ 2.0)); elseif (ew <= 2.1e+25) tmp = abs(Float64(eh * Float64(cos(t) * sin(atan(Float64(eh / Float64(ew * t))))))); else tmp = Float64(ew * sqrt((sin(t) ^ 2.0))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = ew * sin(t); tmp = 0.0; if (ew <= -8.6e+214) tmp = t_1; elseif (ew <= -1.6e-25) tmp = sqrt((t_1 ^ 2.0)); elseif (ew <= 2.1e+25) tmp = abs((eh * (cos(t) * sin(atan((eh / (ew * t))))))); else tmp = ew * sqrt((sin(t) ^ 2.0)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -8.6e+214], t$95$1, If[LessEqual[ew, -1.6e-25], N[Sqrt[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 2.1e+25], N[Abs[N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(ew * N[Sqrt[N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \sin t\\
\mathbf{if}\;ew \leq -8.6 \cdot 10^{+214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq -1.6 \cdot 10^{-25}:\\
\;\;\;\;\sqrt{{t\_1}^{2}}\\
\mathbf{elif}\;ew \leq 2.1 \cdot 10^{+25}:\\
\;\;\;\;\left|eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \sqrt{{\sin t}^{2}}\\
\end{array}
\end{array}
if ew < -8.59999999999999966e214Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr71.6%
Taylor expanded in ew around inf 68.4%
if -8.59999999999999966e214 < ew < -1.6000000000000001e-25Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr60.3%
Taylor expanded in ew around inf 39.7%
add-sqr-sqrt39.1%
sqrt-unprod52.9%
pow252.9%
Applied egg-rr52.9%
if -1.6000000000000001e-25 < ew < 2.0999999999999999e25Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in ew around 0 88.7%
Taylor expanded in t around 0 76.0%
*-commutative99.2%
Simplified76.0%
if 2.0999999999999999e25 < ew Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.7%
pow397.8%
Applied egg-rr52.5%
Taylor expanded in ew around inf 43.0%
add-sqr-sqrt42.3%
sqrt-unprod60.4%
pow260.4%
Applied egg-rr60.4%
Final simplification67.3%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (sin t))))
(if (<= ew -2.05e+215)
t_1
(if (<= ew -7e-26)
(sqrt (pow t_1 2.0))
(if (<= ew 2.9e+32)
(fabs (* eh (sin (atan (/ eh (* ew (tan t)))))))
(* ew (sqrt (pow (sin t) 2.0))))))))
double code(double eh, double ew, double t) {
double t_1 = ew * sin(t);
double tmp;
if (ew <= -2.05e+215) {
tmp = t_1;
} else if (ew <= -7e-26) {
tmp = sqrt(pow(t_1, 2.0));
} else if (ew <= 2.9e+32) {
tmp = fabs((eh * sin(atan((eh / (ew * tan(t)))))));
} else {
tmp = ew * sqrt(pow(sin(t), 2.0));
}
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 = ew * sin(t)
if (ew <= (-2.05d+215)) then
tmp = t_1
else if (ew <= (-7d-26)) then
tmp = sqrt((t_1 ** 2.0d0))
else if (ew <= 2.9d+32) then
tmp = abs((eh * sin(atan((eh / (ew * tan(t)))))))
else
tmp = ew * sqrt((sin(t) ** 2.0d0))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = ew * Math.sin(t);
double tmp;
if (ew <= -2.05e+215) {
tmp = t_1;
} else if (ew <= -7e-26) {
tmp = Math.sqrt(Math.pow(t_1, 2.0));
} else if (ew <= 2.9e+32) {
tmp = Math.abs((eh * Math.sin(Math.atan((eh / (ew * Math.tan(t)))))));
} else {
tmp = ew * Math.sqrt(Math.pow(Math.sin(t), 2.0));
}
return tmp;
}
def code(eh, ew, t): t_1 = ew * math.sin(t) tmp = 0 if ew <= -2.05e+215: tmp = t_1 elif ew <= -7e-26: tmp = math.sqrt(math.pow(t_1, 2.0)) elif ew <= 2.9e+32: tmp = math.fabs((eh * math.sin(math.atan((eh / (ew * math.tan(t))))))) else: tmp = ew * math.sqrt(math.pow(math.sin(t), 2.0)) return tmp
function code(eh, ew, t) t_1 = Float64(ew * sin(t)) tmp = 0.0 if (ew <= -2.05e+215) tmp = t_1; elseif (ew <= -7e-26) tmp = sqrt((t_1 ^ 2.0)); elseif (ew <= 2.9e+32) tmp = abs(Float64(eh * sin(atan(Float64(eh / Float64(ew * tan(t))))))); else tmp = Float64(ew * sqrt((sin(t) ^ 2.0))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = ew * sin(t); tmp = 0.0; if (ew <= -2.05e+215) tmp = t_1; elseif (ew <= -7e-26) tmp = sqrt((t_1 ^ 2.0)); elseif (ew <= 2.9e+32) tmp = abs((eh * sin(atan((eh / (ew * tan(t))))))); else tmp = ew * sqrt((sin(t) ^ 2.0)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -2.05e+215], t$95$1, If[LessEqual[ew, -7e-26], N[Sqrt[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 2.9e+32], N[Abs[N[(eh * N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(ew * N[Sqrt[N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \sin t\\
\mathbf{if}\;ew \leq -2.05 \cdot 10^{+215}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq -7 \cdot 10^{-26}:\\
\;\;\;\;\sqrt{{t\_1}^{2}}\\
\mathbf{elif}\;ew \leq 2.9 \cdot 10^{+32}:\\
\;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \sqrt{{\sin t}^{2}}\\
\end{array}
\end{array}
if ew < -2.0500000000000002e215Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr71.6%
Taylor expanded in ew around inf 68.4%
if -2.0500000000000002e215 < ew < -6.9999999999999997e-26Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr60.3%
Taylor expanded in ew around inf 39.7%
add-sqr-sqrt39.1%
sqrt-unprod52.9%
pow252.9%
Applied egg-rr52.9%
if -6.9999999999999997e-26 < ew < 2.90000000000000003e32Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in ew around 0 88.7%
Taylor expanded in t around 0 60.2%
if 2.90000000000000003e32 < ew Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.7%
pow397.8%
Applied egg-rr52.5%
Taylor expanded in ew around inf 43.0%
add-sqr-sqrt42.3%
sqrt-unprod60.4%
pow260.4%
Applied egg-rr60.4%
(FPCore (eh ew t)
:precision binary64
(if (<= ew -1.2e-53)
(+ (* ew (sin t)) (* eh (sin (atan (/ (/ eh ew) (tan t))))))
(if (<= ew 1.65e+39)
(fabs (* eh (* (cos t) (sin (atan (/ eh (* ew t)))))))
(* ew (sqrt (pow (sin t) 2.0))))))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= -1.2e-53) {
tmp = (ew * sin(t)) + (eh * sin(atan(((eh / ew) / tan(t)))));
} else if (ew <= 1.65e+39) {
tmp = fabs((eh * (cos(t) * sin(atan((eh / (ew * t)))))));
} else {
tmp = ew * sqrt(pow(sin(t), 2.0));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if (ew <= (-1.2d-53)) then
tmp = (ew * sin(t)) + (eh * sin(atan(((eh / ew) / tan(t)))))
else if (ew <= 1.65d+39) then
tmp = abs((eh * (cos(t) * sin(atan((eh / (ew * t)))))))
else
tmp = ew * sqrt((sin(t) ** 2.0d0))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (ew <= -1.2e-53) {
tmp = (ew * Math.sin(t)) + (eh * Math.sin(Math.atan(((eh / ew) / Math.tan(t)))));
} else if (ew <= 1.65e+39) {
tmp = Math.abs((eh * (Math.cos(t) * Math.sin(Math.atan((eh / (ew * t)))))));
} else {
tmp = ew * Math.sqrt(Math.pow(Math.sin(t), 2.0));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if ew <= -1.2e-53: tmp = (ew * math.sin(t)) + (eh * math.sin(math.atan(((eh / ew) / math.tan(t))))) elif ew <= 1.65e+39: tmp = math.fabs((eh * (math.cos(t) * math.sin(math.atan((eh / (ew * t))))))) else: tmp = ew * math.sqrt(math.pow(math.sin(t), 2.0)) return tmp
function code(eh, ew, t) tmp = 0.0 if (ew <= -1.2e-53) tmp = Float64(Float64(ew * sin(t)) + Float64(eh * sin(atan(Float64(Float64(eh / ew) / tan(t)))))); elseif (ew <= 1.65e+39) tmp = abs(Float64(eh * Float64(cos(t) * sin(atan(Float64(eh / Float64(ew * t))))))); else tmp = Float64(ew * sqrt((sin(t) ^ 2.0))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (ew <= -1.2e-53) tmp = (ew * sin(t)) + (eh * sin(atan(((eh / ew) / tan(t))))); elseif (ew <= 1.65e+39) tmp = abs((eh * (cos(t) * sin(atan((eh / (ew * t))))))); else tmp = ew * sqrt((sin(t) ^ 2.0)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[ew, -1.2e-53], N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] + N[(eh * N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[ew, 1.65e+39], N[Abs[N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(ew * N[Sqrt[N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -1.2 \cdot 10^{-53}:\\
\;\;\;\;ew \cdot \sin t + eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\mathbf{elif}\;ew \leq 1.65 \cdot 10^{+39}:\\
\;\;\;\;\left|eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \sqrt{{\sin t}^{2}}\\
\end{array}
\end{array}
if ew < -1.20000000000000004e-53Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr66.4%
Taylor expanded in eh around 0 66.3%
Taylor expanded in t around 0 58.7%
associate-/r*91.1%
Simplified58.7%
if -1.20000000000000004e-53 < ew < 1.6500000000000001e39Initial program 99.8%
associate-*l*99.8%
fma-define99.9%
associate-/r*99.9%
associate-*l*99.9%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in ew around 0 89.0%
Taylor expanded in t around 0 77.2%
*-commutative99.2%
Simplified77.2%
if 1.6500000000000001e39 < ew Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.7%
pow397.8%
Applied egg-rr52.5%
Taylor expanded in ew around inf 43.0%
add-sqr-sqrt42.3%
sqrt-unprod60.4%
pow260.4%
Applied egg-rr60.4%
Final simplification67.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (sin t))))
(if (<= ew -2e+215)
t_1
(if (<= ew -5e-31)
(sqrt (pow t_1 2.0))
(if (<= ew 1.35e-5)
(* eh (sin (atan (/ eh (* ew (tan t))))))
(* ew (sqrt (pow (sin t) 2.0))))))))
double code(double eh, double ew, double t) {
double t_1 = ew * sin(t);
double tmp;
if (ew <= -2e+215) {
tmp = t_1;
} else if (ew <= -5e-31) {
tmp = sqrt(pow(t_1, 2.0));
} else if (ew <= 1.35e-5) {
tmp = eh * sin(atan((eh / (ew * tan(t)))));
} else {
tmp = ew * sqrt(pow(sin(t), 2.0));
}
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 = ew * sin(t)
if (ew <= (-2d+215)) then
tmp = t_1
else if (ew <= (-5d-31)) then
tmp = sqrt((t_1 ** 2.0d0))
else if (ew <= 1.35d-5) then
tmp = eh * sin(atan((eh / (ew * tan(t)))))
else
tmp = ew * sqrt((sin(t) ** 2.0d0))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = ew * Math.sin(t);
double tmp;
if (ew <= -2e+215) {
tmp = t_1;
} else if (ew <= -5e-31) {
tmp = Math.sqrt(Math.pow(t_1, 2.0));
} else if (ew <= 1.35e-5) {
tmp = eh * Math.sin(Math.atan((eh / (ew * Math.tan(t)))));
} else {
tmp = ew * Math.sqrt(Math.pow(Math.sin(t), 2.0));
}
return tmp;
}
def code(eh, ew, t): t_1 = ew * math.sin(t) tmp = 0 if ew <= -2e+215: tmp = t_1 elif ew <= -5e-31: tmp = math.sqrt(math.pow(t_1, 2.0)) elif ew <= 1.35e-5: tmp = eh * math.sin(math.atan((eh / (ew * math.tan(t))))) else: tmp = ew * math.sqrt(math.pow(math.sin(t), 2.0)) return tmp
function code(eh, ew, t) t_1 = Float64(ew * sin(t)) tmp = 0.0 if (ew <= -2e+215) tmp = t_1; elseif (ew <= -5e-31) tmp = sqrt((t_1 ^ 2.0)); elseif (ew <= 1.35e-5) tmp = Float64(eh * sin(atan(Float64(eh / Float64(ew * tan(t)))))); else tmp = Float64(ew * sqrt((sin(t) ^ 2.0))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = ew * sin(t); tmp = 0.0; if (ew <= -2e+215) tmp = t_1; elseif (ew <= -5e-31) tmp = sqrt((t_1 ^ 2.0)); elseif (ew <= 1.35e-5) tmp = eh * sin(atan((eh / (ew * tan(t))))); else tmp = ew * sqrt((sin(t) ^ 2.0)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -2e+215], t$95$1, If[LessEqual[ew, -5e-31], N[Sqrt[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 1.35e-5], N[(eh * N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(ew * N[Sqrt[N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \sin t\\
\mathbf{if}\;ew \leq -2 \cdot 10^{+215}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq -5 \cdot 10^{-31}:\\
\;\;\;\;\sqrt{{t\_1}^{2}}\\
\mathbf{elif}\;ew \leq 1.35 \cdot 10^{-5}:\\
\;\;\;\;eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \sqrt{{\sin t}^{2}}\\
\end{array}
\end{array}
if ew < -1.99999999999999981e215Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr71.6%
Taylor expanded in ew around inf 68.4%
if -1.99999999999999981e215 < ew < -5e-31Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr61.0%
Taylor expanded in ew around inf 39.0%
add-sqr-sqrt38.4%
sqrt-unprod52.0%
pow252.0%
Applied egg-rr52.0%
if -5e-31 < ew < 1.3499999999999999e-5Initial program 99.8%
associate-*l*99.8%
fma-define99.9%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.9%
Simplified99.9%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr60.3%
Taylor expanded in t around 0 35.8%
associate-/r*35.8%
Simplified35.8%
rem-cube-cbrt36.5%
associate-/r*36.5%
*-commutative36.5%
Applied egg-rr36.5%
if 1.3499999999999999e-5 < ew Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
add-cube-cbrt97.7%
pow397.7%
Applied egg-rr52.8%
Taylor expanded in ew around inf 41.9%
add-sqr-sqrt41.3%
sqrt-unprod57.2%
pow257.2%
Applied egg-rr57.2%
Final simplification47.9%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (sin t))))
(if (<= ew -2.4e+217)
t_1
(if (<= ew 2.3e+207)
(sqrt (pow t_1 2.0))
(* ew (sqrt (pow (sin t) 2.0)))))))
double code(double eh, double ew, double t) {
double t_1 = ew * sin(t);
double tmp;
if (ew <= -2.4e+217) {
tmp = t_1;
} else if (ew <= 2.3e+207) {
tmp = sqrt(pow(t_1, 2.0));
} else {
tmp = ew * sqrt(pow(sin(t), 2.0));
}
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 = ew * sin(t)
if (ew <= (-2.4d+217)) then
tmp = t_1
else if (ew <= 2.3d+207) then
tmp = sqrt((t_1 ** 2.0d0))
else
tmp = ew * sqrt((sin(t) ** 2.0d0))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = ew * Math.sin(t);
double tmp;
if (ew <= -2.4e+217) {
tmp = t_1;
} else if (ew <= 2.3e+207) {
tmp = Math.sqrt(Math.pow(t_1, 2.0));
} else {
tmp = ew * Math.sqrt(Math.pow(Math.sin(t), 2.0));
}
return tmp;
}
def code(eh, ew, t): t_1 = ew * math.sin(t) tmp = 0 if ew <= -2.4e+217: tmp = t_1 elif ew <= 2.3e+207: tmp = math.sqrt(math.pow(t_1, 2.0)) else: tmp = ew * math.sqrt(math.pow(math.sin(t), 2.0)) return tmp
function code(eh, ew, t) t_1 = Float64(ew * sin(t)) tmp = 0.0 if (ew <= -2.4e+217) tmp = t_1; elseif (ew <= 2.3e+207) tmp = sqrt((t_1 ^ 2.0)); else tmp = Float64(ew * sqrt((sin(t) ^ 2.0))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = ew * sin(t); tmp = 0.0; if (ew <= -2.4e+217) tmp = t_1; elseif (ew <= 2.3e+207) tmp = sqrt((t_1 ^ 2.0)); else tmp = ew * sqrt((sin(t) ^ 2.0)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -2.4e+217], t$95$1, If[LessEqual[ew, 2.3e+207], N[Sqrt[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision], N[(ew * N[Sqrt[N[Power[N[Sin[t], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \sin t\\
\mathbf{if}\;ew \leq -2.4 \cdot 10^{+217}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq 2.3 \cdot 10^{+207}:\\
\;\;\;\;\sqrt{{t\_1}^{2}}\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \sqrt{{\sin t}^{2}}\\
\end{array}
\end{array}
if ew < -2.3999999999999998e217Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr71.6%
Taylor expanded in ew around inf 68.4%
if -2.3999999999999998e217 < ew < 2.29999999999999995e207Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr57.0%
Taylor expanded in ew around inf 20.1%
add-sqr-sqrt19.4%
sqrt-unprod28.3%
pow228.3%
Applied egg-rr28.3%
if 2.29999999999999995e207 < ew Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.8%
pow397.7%
Applied egg-rr69.2%
Taylor expanded in ew around inf 63.3%
add-sqr-sqrt63.0%
sqrt-unprod84.1%
pow284.1%
Applied egg-rr84.1%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (sin t))))
(if (<= ew -9.8e+213)
t_1
(if (<= ew 5.5e+207)
(sqrt (pow t_1 2.0))
(+ -1.0 (fma ew (sin t) 1.0))))))
double code(double eh, double ew, double t) {
double t_1 = ew * sin(t);
double tmp;
if (ew <= -9.8e+213) {
tmp = t_1;
} else if (ew <= 5.5e+207) {
tmp = sqrt(pow(t_1, 2.0));
} else {
tmp = -1.0 + fma(ew, sin(t), 1.0);
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(ew * sin(t)) tmp = 0.0 if (ew <= -9.8e+213) tmp = t_1; elseif (ew <= 5.5e+207) tmp = sqrt((t_1 ^ 2.0)); else tmp = Float64(-1.0 + fma(ew, sin(t), 1.0)); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ew, -9.8e+213], t$95$1, If[LessEqual[ew, 5.5e+207], N[Sqrt[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision], N[(-1.0 + N[(ew * N[Sin[t], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \sin t\\
\mathbf{if}\;ew \leq -9.8 \cdot 10^{+213}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq 5.5 \cdot 10^{+207}:\\
\;\;\;\;\sqrt{{t\_1}^{2}}\\
\mathbf{else}:\\
\;\;\;\;-1 + \mathsf{fma}\left(ew, \sin t, 1\right)\\
\end{array}
\end{array}
if ew < -9.79999999999999994e213Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr71.6%
Taylor expanded in ew around inf 68.4%
if -9.79999999999999994e213 < ew < 5.50000000000000036e207Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr57.0%
Taylor expanded in ew around inf 20.1%
add-sqr-sqrt19.4%
sqrt-unprod28.3%
pow228.3%
Applied egg-rr28.3%
if 5.50000000000000036e207 < ew Initial program 99.7%
associate-*l*99.7%
fma-define99.7%
associate-/r*99.7%
associate-*l*99.7%
associate-/r*99.7%
Simplified99.7%
add-cube-cbrt97.8%
pow397.7%
Applied egg-rr69.2%
Taylor expanded in ew around inf 62.0%
rem-cube-cbrt63.3%
expm1-log1p-u57.1%
expm1-undefine57.1%
Applied egg-rr57.1%
sub-neg57.1%
metadata-eval57.1%
+-commutative57.1%
log1p-undefine57.1%
rem-exp-log63.3%
+-commutative63.3%
fma-define63.3%
Simplified63.3%
(FPCore (eh ew t) :precision binary64 (if (or (<= t -1.55e-40) (not (<= t 7.5e-85))) (* ew (sin t)) (sqrt (pow (* ew t) 2.0))))
double code(double eh, double ew, double t) {
double tmp;
if ((t <= -1.55e-40) || !(t <= 7.5e-85)) {
tmp = ew * sin(t);
} else {
tmp = sqrt(pow((ew * t), 2.0));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.55d-40)) .or. (.not. (t <= 7.5d-85))) then
tmp = ew * sin(t)
else
tmp = sqrt(((ew * t) ** 2.0d0))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((t <= -1.55e-40) || !(t <= 7.5e-85)) {
tmp = ew * Math.sin(t);
} else {
tmp = Math.sqrt(Math.pow((ew * t), 2.0));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (t <= -1.55e-40) or not (t <= 7.5e-85): tmp = ew * math.sin(t) else: tmp = math.sqrt(math.pow((ew * t), 2.0)) return tmp
function code(eh, ew, t) tmp = 0.0 if ((t <= -1.55e-40) || !(t <= 7.5e-85)) tmp = Float64(ew * sin(t)); else tmp = sqrt((Float64(ew * t) ^ 2.0)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((t <= -1.55e-40) || ~((t <= 7.5e-85))) tmp = ew * sin(t); else tmp = sqrt(((ew * t) ^ 2.0)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -1.55e-40], N[Not[LessEqual[t, 7.5e-85]], $MachinePrecision]], N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[Power[N[(ew * t), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{-40} \lor \neg \left(t \leq 7.5 \cdot 10^{-85}\right):\\
\;\;\;\;ew \cdot \sin t\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{\left(ew \cdot t\right)}^{2}}\\
\end{array}
\end{array}
if t < -1.55000000000000005e-40 or 7.5000000000000003e-85 < t Initial program 99.6%
associate-*l*99.6%
fma-define99.6%
associate-/r*99.6%
associate-*l*99.6%
associate-/r*99.6%
Simplified99.6%
add-cube-cbrt97.7%
pow397.8%
Applied egg-rr63.6%
Taylor expanded in ew around inf 35.9%
if -1.55000000000000005e-40 < t < 7.5000000000000003e-85Initial program 100.0%
associate-*l*100.0%
fma-define100.0%
associate-/r*100.0%
associate-*l*100.0%
associate-/r*100.0%
Simplified100.0%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr53.9%
Taylor expanded in ew around inf 18.5%
Taylor expanded in t around 0 18.5%
add-sqr-sqrt17.8%
sqrt-unprod27.1%
pow227.1%
Applied egg-rr27.1%
Final simplification32.1%
(FPCore (eh ew t) :precision binary64 (* ew (sin t)))
double code(double eh, double ew, double t) {
return ew * sin(t);
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = ew * sin(t)
end function
public static double code(double eh, double ew, double t) {
return ew * Math.sin(t);
}
def code(eh, ew, t): return ew * math.sin(t)
function code(eh, ew, t) return Float64(ew * sin(t)) end
function tmp = code(eh, ew, t) tmp = ew * sin(t); end
code[eh_, ew_, t_] := N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
ew \cdot \sin t
\end{array}
Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr59.4%
Taylor expanded in ew around inf 28.3%
(FPCore (eh ew t) :precision binary64 (* ew t))
double code(double eh, double ew, double t) {
return ew * t;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = ew * t
end function
public static double code(double eh, double ew, double t) {
return ew * t;
}
def code(eh, ew, t): return ew * t
function code(eh, ew, t) return Float64(ew * t) end
function tmp = code(eh, ew, t) tmp = ew * t; end
code[eh_, ew_, t_] := N[(ew * t), $MachinePrecision]
\begin{array}{l}
\\
ew \cdot t
\end{array}
Initial program 99.8%
associate-*l*99.8%
fma-define99.8%
associate-/r*99.8%
associate-*l*99.8%
associate-/r*99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr59.4%
Taylor expanded in ew around inf 28.3%
Taylor expanded in t around 0 14.4%
herbie shell --seed 2024123
(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))))))))