
(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 (+ (* eh (* (cos t) (sin t_1))) (* ew (* (cos t_1) (sin t)))))))
double code(double eh, double ew, double t) {
double t_1 = atan((eh / (ew * tan(t))));
return fabs(((eh * (cos(t) * sin(t_1))) + (ew * (cos(t_1) * sin(t)))));
}
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(((eh * (cos(t) * sin(t_1))) + (ew * (cos(t_1) * sin(t)))))
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(((eh * (Math.cos(t) * Math.sin(t_1))) + (ew * (Math.cos(t_1) * Math.sin(t)))));
}
def code(eh, ew, t): t_1 = math.atan((eh / (ew * math.tan(t)))) return math.fabs(((eh * (math.cos(t) * math.sin(t_1))) + (ew * (math.cos(t_1) * math.sin(t)))))
function code(eh, ew, t) t_1 = atan(Float64(eh / Float64(ew * tan(t)))) return abs(Float64(Float64(eh * Float64(cos(t) * sin(t_1))) + Float64(ew * Float64(cos(t_1) * sin(t))))) end
function tmp = code(eh, ew, t) t_1 = atan((eh / (ew * tan(t)))); tmp = abs(((eh * (cos(t) * sin(t_1))) + (ew * (cos(t_1) * sin(t))))); 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[(N[Cos[t], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(ew * N[(N[Cos[t$95$1], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
\left|eh \cdot \left(\cos t \cdot \sin t\_1\right) + ew \cdot \left(\cos t\_1 \cdot \sin t\right)\right|
\end{array}
\end{array}
Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in ew around 0 99.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (/ eh ew) (tan t))))
(fabs
(+
(/ (* ew (sin t)) (hypot 1.0 t_1))
(* (* eh (cos t)) (sin (atan t_1)))))))
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)) + ((eh * cos(t)) * sin(atan(t_1)))));
}
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)) + ((eh * Math.cos(t)) * Math.sin(Math.atan(t_1)))));
}
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)) + ((eh * math.cos(t)) * math.sin(math.atan(t_1)))))
function code(eh, ew, t) t_1 = Float64(Float64(eh / ew) / tan(t)) return abs(Float64(Float64(Float64(ew * sin(t)) / hypot(1.0, t_1)) + Float64(Float64(eh * cos(t)) * sin(atan(t_1))))) end
function tmp = code(eh, ew, t) t_1 = (eh / ew) / tan(t); tmp = abs((((ew * sin(t)) / hypot(1.0, t_1)) + ((eh * cos(t)) * sin(atan(t_1))))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $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[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{eh}{ew}}{\tan t}\\
\left|\frac{ew \cdot \sin t}{\mathsf{hypot}\left(1, t\_1\right)} + \left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} t\_1\right|
\end{array}
\end{array}
Initial program 99.8%
associate-/l/99.8%
cos-atan99.8%
un-div-inv99.8%
hypot-1-def99.8%
associate-/l/99.8%
Applied egg-rr99.8%
(FPCore (eh ew t) :precision binary64 (fabs (+ (* eh (* (cos t) (sin (atan (/ eh (* ew (tan t))))))) (/ ew (/ (hypot 1.0 (/ (/ eh ew) (tan t))) (sin t))))))
double code(double eh, double ew, double t) {
return fabs(((eh * (cos(t) * sin(atan((eh / (ew * tan(t))))))) + (ew / (hypot(1.0, ((eh / ew) / tan(t))) / sin(t)))));
}
public static double code(double eh, double ew, double t) {
return Math.abs(((eh * (Math.cos(t) * Math.sin(Math.atan((eh / (ew * Math.tan(t))))))) + (ew / (Math.hypot(1.0, ((eh / ew) / Math.tan(t))) / Math.sin(t)))));
}
def code(eh, ew, t): return math.fabs(((eh * (math.cos(t) * math.sin(math.atan((eh / (ew * math.tan(t))))))) + (ew / (math.hypot(1.0, ((eh / ew) / math.tan(t))) / math.sin(t)))))
function code(eh, ew, t) return abs(Float64(Float64(eh * Float64(cos(t) * sin(atan(Float64(eh / Float64(ew * tan(t))))))) + Float64(ew / Float64(hypot(1.0, Float64(Float64(eh / ew) / tan(t))) / sin(t))))) end
function tmp = code(eh, ew, t) tmp = abs(((eh * (cos(t) * sin(atan((eh / (ew * tan(t))))))) + (ew / (hypot(1.0, ((eh / ew) / tan(t))) / sin(t))))); end
code[eh_, ew_, t_] := N[Abs[N[(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] + N[(ew / N[(N[Sqrt[1.0 ^ 2 + N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] / N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) + \frac{ew}{\frac{\mathsf{hypot}\left(1, \frac{\frac{eh}{ew}}{\tan t}\right)}{\sin t}}\right|
\end{array}
Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in ew around 0 99.8%
*-commutative99.8%
associate-/r*99.8%
cos-atan99.8%
hypot-1-def99.8%
div-inv99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
(FPCore (eh ew t) :precision binary64 (fabs (+ (* eh (* (cos t) (sin (atan (/ eh (* ew (tan t))))))) (* ew (sin t)))))
double code(double eh, double ew, double t) {
return fabs(((eh * (cos(t) * sin(atan((eh / (ew * tan(t))))))) + (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 = abs(((eh * (cos(t) * sin(atan((eh / (ew * tan(t))))))) + (ew * sin(t))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((eh * (Math.cos(t) * Math.sin(Math.atan((eh / (ew * Math.tan(t))))))) + (ew * Math.sin(t))));
}
def code(eh, ew, t): return math.fabs(((eh * (math.cos(t) * math.sin(math.atan((eh / (ew * math.tan(t))))))) + (ew * math.sin(t))))
function code(eh, ew, t) return abs(Float64(Float64(eh * Float64(cos(t) * sin(atan(Float64(eh / Float64(ew * tan(t))))))) + Float64(ew * sin(t)))) end
function tmp = code(eh, ew, t) tmp = abs(((eh * (cos(t) * sin(atan((eh / (ew * tan(t))))))) + (ew * sin(t)))); end
code[eh_, ew_, t_] := N[Abs[N[(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] + N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right) + ew \cdot \sin t\right|
\end{array}
Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in ew around 0 99.8%
*-commutative99.8%
associate-/r*99.8%
cos-atan99.8%
hypot-1-def99.8%
div-inv99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in ew around inf 98.4%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (/ eh (* ew (tan t))))))
(if (<= eh -7e+128)
(* eh (* (cos t) (sin (atan (/ (/ eh (tan t)) ew)))))
(if (<= eh -0.27)
(fabs
(*
eh
(sin
(atan
(/
(+ (/ eh ew) (* -0.3333333333333333 (/ (* eh (pow t 2.0)) ew)))
t)))))
(if (<= eh 94.0)
(fabs (* ew (* (cos t_1) (sin t))))
(fabs (* eh (sin t_1))))))))
double code(double eh, double ew, double t) {
double t_1 = atan((eh / (ew * tan(t))));
double tmp;
if (eh <= -7e+128) {
tmp = eh * (cos(t) * sin(atan(((eh / tan(t)) / ew))));
} else if (eh <= -0.27) {
tmp = fabs((eh * sin(atan((((eh / ew) + (-0.3333333333333333 * ((eh * pow(t, 2.0)) / ew))) / t)))));
} else if (eh <= 94.0) {
tmp = fabs((ew * (cos(t_1) * sin(t))));
} else {
tmp = fabs((eh * sin(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 = atan((eh / (ew * tan(t))))
if (eh <= (-7d+128)) then
tmp = eh * (cos(t) * sin(atan(((eh / tan(t)) / ew))))
else if (eh <= (-0.27d0)) then
tmp = abs((eh * sin(atan((((eh / ew) + ((-0.3333333333333333d0) * ((eh * (t ** 2.0d0)) / ew))) / t)))))
else if (eh <= 94.0d0) then
tmp = abs((ew * (cos(t_1) * sin(t))))
else
tmp = abs((eh * sin(t_1)))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan((eh / (ew * Math.tan(t))));
double tmp;
if (eh <= -7e+128) {
tmp = eh * (Math.cos(t) * Math.sin(Math.atan(((eh / Math.tan(t)) / ew))));
} else if (eh <= -0.27) {
tmp = Math.abs((eh * Math.sin(Math.atan((((eh / ew) + (-0.3333333333333333 * ((eh * Math.pow(t, 2.0)) / ew))) / t)))));
} else if (eh <= 94.0) {
tmp = Math.abs((ew * (Math.cos(t_1) * Math.sin(t))));
} else {
tmp = Math.abs((eh * Math.sin(t_1)));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.atan((eh / (ew * math.tan(t)))) tmp = 0 if eh <= -7e+128: tmp = eh * (math.cos(t) * math.sin(math.atan(((eh / math.tan(t)) / ew)))) elif eh <= -0.27: tmp = math.fabs((eh * math.sin(math.atan((((eh / ew) + (-0.3333333333333333 * ((eh * math.pow(t, 2.0)) / ew))) / t))))) elif eh <= 94.0: tmp = math.fabs((ew * (math.cos(t_1) * math.sin(t)))) else: tmp = math.fabs((eh * math.sin(t_1))) return tmp
function code(eh, ew, t) t_1 = atan(Float64(eh / Float64(ew * tan(t)))) tmp = 0.0 if (eh <= -7e+128) tmp = Float64(eh * Float64(cos(t) * sin(atan(Float64(Float64(eh / tan(t)) / ew))))); elseif (eh <= -0.27) tmp = abs(Float64(eh * sin(atan(Float64(Float64(Float64(eh / ew) + Float64(-0.3333333333333333 * Float64(Float64(eh * (t ^ 2.0)) / ew))) / t))))); elseif (eh <= 94.0) tmp = abs(Float64(ew * Float64(cos(t_1) * sin(t)))); else tmp = abs(Float64(eh * sin(t_1))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = atan((eh / (ew * tan(t)))); tmp = 0.0; if (eh <= -7e+128) tmp = eh * (cos(t) * sin(atan(((eh / tan(t)) / ew)))); elseif (eh <= -0.27) tmp = abs((eh * sin(atan((((eh / ew) + (-0.3333333333333333 * ((eh * (t ^ 2.0)) / ew))) / t))))); elseif (eh <= 94.0) tmp = abs((ew * (cos(t_1) * sin(t)))); else tmp = abs((eh * sin(t_1))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eh, -7e+128], N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[eh, -0.27], N[Abs[N[(eh * N[Sin[N[ArcTan[N[(N[(N[(eh / ew), $MachinePrecision] + N[(-0.3333333333333333 * N[(N[(eh * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 94.0], N[Abs[N[(ew * N[(N[Cos[t$95$1], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(eh * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
\mathbf{if}\;eh \leq -7 \cdot 10^{+128}:\\
\;\;\;\;eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)\right)\\
\mathbf{elif}\;eh \leq -0.27:\\
\;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew} + -0.3333333333333333 \cdot \frac{eh \cdot {t}^{2}}{ew}}{t}\right)\right|\\
\mathbf{elif}\;eh \leq 94:\\
\;\;\;\;\left|ew \cdot \left(\cos t\_1 \cdot \sin t\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|eh \cdot \sin t\_1\right|\\
\end{array}
\end{array}
if eh < -6.99999999999999937e128Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr59.8%
Taylor expanded in ew around 0 57.2%
rem-cube-cbrt58.5%
*-commutative58.5%
*-commutative58.5%
associate-/r*58.5%
Applied egg-rr58.5%
if -6.99999999999999937e128 < eh < -0.27000000000000002Initial program 99.9%
fma-define99.9%
associate-/l/99.9%
associate-*l*99.9%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 64.3%
Taylor expanded in t around 0 64.4%
if -0.27000000000000002 < eh < 94Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in ew around inf 99.8%
Taylor expanded in ew around inf 67.0%
*-commutative67.0%
Simplified67.0%
if 94 < eh Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 59.1%
Final simplification63.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (sin (atan (/ eh (* ew (tan t)))))))
(if (or (<= eh -9.5e+37) (not (<= eh 8.5e+34)))
(fabs (* t_1 (* eh (cos t))))
(fabs (+ (* ew (sin t)) (* eh t_1))))))
double code(double eh, double ew, double t) {
double t_1 = sin(atan((eh / (ew * tan(t)))));
double tmp;
if ((eh <= -9.5e+37) || !(eh <= 8.5e+34)) {
tmp = fabs((t_1 * (eh * cos(t))));
} else {
tmp = fabs(((ew * sin(t)) + (eh * 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 = sin(atan((eh / (ew * tan(t)))))
if ((eh <= (-9.5d+37)) .or. (.not. (eh <= 8.5d+34))) then
tmp = abs((t_1 * (eh * cos(t))))
else
tmp = abs(((ew * sin(t)) + (eh * t_1)))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.sin(Math.atan((eh / (ew * Math.tan(t)))));
double tmp;
if ((eh <= -9.5e+37) || !(eh <= 8.5e+34)) {
tmp = Math.abs((t_1 * (eh * Math.cos(t))));
} else {
tmp = Math.abs(((ew * Math.sin(t)) + (eh * t_1)));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.sin(math.atan((eh / (ew * math.tan(t))))) tmp = 0 if (eh <= -9.5e+37) or not (eh <= 8.5e+34): tmp = math.fabs((t_1 * (eh * math.cos(t)))) else: tmp = math.fabs(((ew * math.sin(t)) + (eh * t_1))) return tmp
function code(eh, ew, t) t_1 = sin(atan(Float64(eh / Float64(ew * tan(t))))) tmp = 0.0 if ((eh <= -9.5e+37) || !(eh <= 8.5e+34)) tmp = abs(Float64(t_1 * Float64(eh * cos(t)))); else tmp = abs(Float64(Float64(ew * sin(t)) + Float64(eh * t_1))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = sin(atan((eh / (ew * tan(t))))); tmp = 0.0; if ((eh <= -9.5e+37) || ~((eh <= 8.5e+34))) tmp = abs((t_1 * (eh * cos(t)))); else tmp = abs(((ew * sin(t)) + (eh * t_1))); end tmp_2 = 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]}, If[Or[LessEqual[eh, -9.5e+37], N[Not[LessEqual[eh, 8.5e+34]], $MachinePrecision]], N[Abs[N[(t$95$1 * N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] + N[(eh * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
\mathbf{if}\;eh \leq -9.5 \cdot 10^{+37} \lor \neg \left(eh \leq 8.5 \cdot 10^{+34}\right):\\
\;\;\;\;\left|t\_1 \cdot \left(eh \cdot \cos t\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \sin t + eh \cdot t\_1\right|\\
\end{array}
\end{array}
if eh < -9.4999999999999995e37 or 8.5000000000000003e34 < eh Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in ew around 0 91.2%
associate-*r*91.2%
*-commutative91.2%
Simplified91.2%
if -9.4999999999999995e37 < eh < 8.5000000000000003e34Initial program 99.9%
fma-define99.9%
associate-/l/99.9%
associate-*l*99.9%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in ew around 0 99.9%
*-commutative99.9%
associate-/r*99.9%
cos-atan99.9%
hypot-1-def99.9%
div-inv99.9%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in ew around inf 98.9%
Taylor expanded in t around 0 89.6%
Final simplification90.3%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (/ eh (* ew (tan t))))))
(if (or (<= eh -7.2e-117) (not (<= eh 16.0)))
(fabs (* (sin t_1) (* eh (cos t))))
(fabs (* ew (* (cos t_1) (sin t)))))))
double code(double eh, double ew, double t) {
double t_1 = atan((eh / (ew * tan(t))));
double tmp;
if ((eh <= -7.2e-117) || !(eh <= 16.0)) {
tmp = fabs((sin(t_1) * (eh * cos(t))));
} else {
tmp = fabs((ew * (cos(t_1) * sin(t))));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = atan((eh / (ew * tan(t))))
if ((eh <= (-7.2d-117)) .or. (.not. (eh <= 16.0d0))) then
tmp = abs((sin(t_1) * (eh * cos(t))))
else
tmp = abs((ew * (cos(t_1) * sin(t))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan((eh / (ew * Math.tan(t))));
double tmp;
if ((eh <= -7.2e-117) || !(eh <= 16.0)) {
tmp = Math.abs((Math.sin(t_1) * (eh * Math.cos(t))));
} else {
tmp = Math.abs((ew * (Math.cos(t_1) * Math.sin(t))));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.atan((eh / (ew * math.tan(t)))) tmp = 0 if (eh <= -7.2e-117) or not (eh <= 16.0): tmp = math.fabs((math.sin(t_1) * (eh * math.cos(t)))) else: tmp = math.fabs((ew * (math.cos(t_1) * math.sin(t)))) return tmp
function code(eh, ew, t) t_1 = atan(Float64(eh / Float64(ew * tan(t)))) tmp = 0.0 if ((eh <= -7.2e-117) || !(eh <= 16.0)) tmp = abs(Float64(sin(t_1) * Float64(eh * cos(t)))); else tmp = abs(Float64(ew * Float64(cos(t_1) * sin(t)))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = atan((eh / (ew * tan(t)))); tmp = 0.0; if ((eh <= -7.2e-117) || ~((eh <= 16.0))) tmp = abs((sin(t_1) * (eh * cos(t)))); else tmp = abs((ew * (cos(t_1) * sin(t)))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[eh, -7.2e-117], N[Not[LessEqual[eh, 16.0]], $MachinePrecision]], N[Abs[N[(N[Sin[t$95$1], $MachinePrecision] * N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[(N[Cos[t$95$1], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\\
\mathbf{if}\;eh \leq -7.2 \cdot 10^{-117} \lor \neg \left(eh \leq 16\right):\\
\;\;\;\;\left|\sin t\_1 \cdot \left(eh \cdot \cos t\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \left(\cos t\_1 \cdot \sin t\right)\right|\\
\end{array}
\end{array}
if eh < -7.2000000000000001e-117 or 16 < eh Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in ew around 0 82.6%
associate-*r*82.6%
*-commutative82.6%
Simplified82.6%
if -7.2000000000000001e-117 < eh < 16Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in ew around inf 99.8%
Taylor expanded in ew around inf 73.7%
*-commutative73.7%
Simplified73.7%
Final simplification79.0%
(FPCore (eh ew t)
:precision binary64
(if (<= eh -9e+128)
(* eh (* (cos t) (sin (atan (/ (/ eh (tan t)) ew)))))
(if (<= eh -2.9e-123)
(fabs
(*
eh
(sin
(atan
(/
(+ (/ eh ew) (* -0.3333333333333333 (/ (* eh (pow t 2.0)) ew)))
t)))))
(if (<= eh 66.0)
(sqrt (pow (* ew (sin t)) 2.0))
(fabs (* eh (sin (atan (/ eh (* ew (tan t)))))))))))
double code(double eh, double ew, double t) {
double tmp;
if (eh <= -9e+128) {
tmp = eh * (cos(t) * sin(atan(((eh / tan(t)) / ew))));
} else if (eh <= -2.9e-123) {
tmp = fabs((eh * sin(atan((((eh / ew) + (-0.3333333333333333 * ((eh * pow(t, 2.0)) / ew))) / t)))));
} else if (eh <= 66.0) {
tmp = sqrt(pow((ew * sin(t)), 2.0));
} else {
tmp = fabs((eh * 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 (eh <= (-9d+128)) then
tmp = eh * (cos(t) * sin(atan(((eh / tan(t)) / ew))))
else if (eh <= (-2.9d-123)) then
tmp = abs((eh * sin(atan((((eh / ew) + ((-0.3333333333333333d0) * ((eh * (t ** 2.0d0)) / ew))) / t)))))
else if (eh <= 66.0d0) then
tmp = sqrt(((ew * sin(t)) ** 2.0d0))
else
tmp = abs((eh * 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 (eh <= -9e+128) {
tmp = eh * (Math.cos(t) * Math.sin(Math.atan(((eh / Math.tan(t)) / ew))));
} else if (eh <= -2.9e-123) {
tmp = Math.abs((eh * Math.sin(Math.atan((((eh / ew) + (-0.3333333333333333 * ((eh * Math.pow(t, 2.0)) / ew))) / t)))));
} else if (eh <= 66.0) {
tmp = Math.sqrt(Math.pow((ew * Math.sin(t)), 2.0));
} else {
tmp = Math.abs((eh * Math.sin(Math.atan((eh / (ew * Math.tan(t)))))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if eh <= -9e+128: tmp = eh * (math.cos(t) * math.sin(math.atan(((eh / math.tan(t)) / ew)))) elif eh <= -2.9e-123: tmp = math.fabs((eh * math.sin(math.atan((((eh / ew) + (-0.3333333333333333 * ((eh * math.pow(t, 2.0)) / ew))) / t))))) elif eh <= 66.0: tmp = math.sqrt(math.pow((ew * math.sin(t)), 2.0)) else: tmp = math.fabs((eh * math.sin(math.atan((eh / (ew * math.tan(t))))))) return tmp
function code(eh, ew, t) tmp = 0.0 if (eh <= -9e+128) tmp = Float64(eh * Float64(cos(t) * sin(atan(Float64(Float64(eh / tan(t)) / ew))))); elseif (eh <= -2.9e-123) tmp = abs(Float64(eh * sin(atan(Float64(Float64(Float64(eh / ew) + Float64(-0.3333333333333333 * Float64(Float64(eh * (t ^ 2.0)) / ew))) / t))))); elseif (eh <= 66.0) tmp = sqrt((Float64(ew * sin(t)) ^ 2.0)); else tmp = abs(Float64(eh * sin(atan(Float64(eh / Float64(ew * tan(t))))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (eh <= -9e+128) tmp = eh * (cos(t) * sin(atan(((eh / tan(t)) / ew)))); elseif (eh <= -2.9e-123) tmp = abs((eh * sin(atan((((eh / ew) + (-0.3333333333333333 * ((eh * (t ^ 2.0)) / ew))) / t))))); elseif (eh <= 66.0) tmp = sqrt(((ew * sin(t)) ^ 2.0)); else tmp = abs((eh * sin(atan((eh / (ew * tan(t))))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[eh, -9e+128], N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[eh, -2.9e-123], N[Abs[N[(eh * N[Sin[N[ArcTan[N[(N[(N[(eh / ew), $MachinePrecision] + N[(-0.3333333333333333 * N[(N[(eh * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[eh, 66.0], N[Sqrt[N[Power[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision], N[Abs[N[(eh * N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -9 \cdot 10^{+128}:\\
\;\;\;\;eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)\right)\\
\mathbf{elif}\;eh \leq -2.9 \cdot 10^{-123}:\\
\;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew} + -0.3333333333333333 \cdot \frac{eh \cdot {t}^{2}}{ew}}{t}\right)\right|\\
\mathbf{elif}\;eh \leq 66:\\
\;\;\;\;\sqrt{{\left(ew \cdot \sin t\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right|\\
\end{array}
\end{array}
if eh < -9.0000000000000003e128Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr59.8%
Taylor expanded in ew around 0 57.2%
rem-cube-cbrt58.5%
*-commutative58.5%
*-commutative58.5%
associate-/r*58.5%
Applied egg-rr58.5%
if -9.0000000000000003e128 < eh < -2.90000000000000004e-123Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 51.8%
Taylor expanded in t around 0 52.0%
if -2.90000000000000004e-123 < eh < 66Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr48.0%
Taylor expanded in ew around inf 41.9%
add-sqr-sqrt40.6%
sqrt-unprod51.4%
pow251.4%
Applied egg-rr51.4%
if 66 < eh Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 59.1%
Final simplification54.3%
(FPCore (eh ew t)
:precision binary64
(if (<= eh -9e+128)
(* eh (* (cos t) (sin (atan (/ (/ eh (tan t)) ew)))))
(if (or (<= eh -5.1e-118) (not (<= eh 33.0)))
(fabs (* eh (sin (atan (/ eh (* ew (tan t)))))))
(sqrt (pow (* ew (sin t)) 2.0)))))
double code(double eh, double ew, double t) {
double tmp;
if (eh <= -9e+128) {
tmp = eh * (cos(t) * sin(atan(((eh / tan(t)) / ew))));
} else if ((eh <= -5.1e-118) || !(eh <= 33.0)) {
tmp = fabs((eh * sin(atan((eh / (ew * tan(t)))))));
} else {
tmp = sqrt(pow((ew * 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 (eh <= (-9d+128)) then
tmp = eh * (cos(t) * sin(atan(((eh / tan(t)) / ew))))
else if ((eh <= (-5.1d-118)) .or. (.not. (eh <= 33.0d0))) then
tmp = abs((eh * sin(atan((eh / (ew * tan(t)))))))
else
tmp = sqrt(((ew * sin(t)) ** 2.0d0))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (eh <= -9e+128) {
tmp = eh * (Math.cos(t) * Math.sin(Math.atan(((eh / Math.tan(t)) / ew))));
} else if ((eh <= -5.1e-118) || !(eh <= 33.0)) {
tmp = Math.abs((eh * Math.sin(Math.atan((eh / (ew * Math.tan(t)))))));
} else {
tmp = Math.sqrt(Math.pow((ew * Math.sin(t)), 2.0));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if eh <= -9e+128: tmp = eh * (math.cos(t) * math.sin(math.atan(((eh / math.tan(t)) / ew)))) elif (eh <= -5.1e-118) or not (eh <= 33.0): tmp = math.fabs((eh * math.sin(math.atan((eh / (ew * math.tan(t))))))) else: tmp = math.sqrt(math.pow((ew * math.sin(t)), 2.0)) return tmp
function code(eh, ew, t) tmp = 0.0 if (eh <= -9e+128) tmp = Float64(eh * Float64(cos(t) * sin(atan(Float64(Float64(eh / tan(t)) / ew))))); elseif ((eh <= -5.1e-118) || !(eh <= 33.0)) tmp = abs(Float64(eh * sin(atan(Float64(eh / Float64(ew * tan(t))))))); else tmp = sqrt((Float64(ew * sin(t)) ^ 2.0)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (eh <= -9e+128) tmp = eh * (cos(t) * sin(atan(((eh / tan(t)) / ew)))); elseif ((eh <= -5.1e-118) || ~((eh <= 33.0))) tmp = abs((eh * sin(atan((eh / (ew * tan(t))))))); else tmp = sqrt(((ew * sin(t)) ^ 2.0)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[eh, -9e+128], N[(eh * N[(N[Cos[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[eh, -5.1e-118], N[Not[LessEqual[eh, 33.0]], $MachinePrecision]], N[Abs[N[(eh * N[Sin[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Power[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -9 \cdot 10^{+128}:\\
\;\;\;\;eh \cdot \left(\cos t \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)\right)\\
\mathbf{elif}\;eh \leq -5.1 \cdot 10^{-118} \lor \neg \left(eh \leq 33\right):\\
\;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{\left(ew \cdot \sin t\right)}^{2}}\\
\end{array}
\end{array}
if eh < -9.0000000000000003e128Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr59.8%
Taylor expanded in ew around 0 57.2%
rem-cube-cbrt58.5%
*-commutative58.5%
*-commutative58.5%
associate-/r*58.5%
Applied egg-rr58.5%
if -9.0000000000000003e128 < eh < -5.09999999999999964e-118 or 33 < eh Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 55.4%
if -5.09999999999999964e-118 < eh < 33Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr48.0%
Taylor expanded in ew around inf 41.9%
add-sqr-sqrt40.6%
sqrt-unprod51.4%
pow251.4%
Applied egg-rr51.4%
Final simplification54.2%
(FPCore (eh ew t)
:precision binary64
(if (<= ew -5.2e+102)
(sqrt (pow (* ew (sin t)) 2.0))
(if (<= ew 5.6e-30)
(fabs (* eh (sin (atan (/ eh (* ew (tan t)))))))
(* ew (sqrt (pow (sin t) 2.0))))))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= -5.2e+102) {
tmp = sqrt(pow((ew * sin(t)), 2.0));
} else if (ew <= 5.6e-30) {
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) :: tmp
if (ew <= (-5.2d+102)) then
tmp = sqrt(((ew * sin(t)) ** 2.0d0))
else if (ew <= 5.6d-30) 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 tmp;
if (ew <= -5.2e+102) {
tmp = Math.sqrt(Math.pow((ew * Math.sin(t)), 2.0));
} else if (ew <= 5.6e-30) {
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): tmp = 0 if ew <= -5.2e+102: tmp = math.sqrt(math.pow((ew * math.sin(t)), 2.0)) elif ew <= 5.6e-30: 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) tmp = 0.0 if (ew <= -5.2e+102) tmp = sqrt((Float64(ew * sin(t)) ^ 2.0)); elseif (ew <= 5.6e-30) 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) tmp = 0.0; if (ew <= -5.2e+102) tmp = sqrt(((ew * sin(t)) ^ 2.0)); elseif (ew <= 5.6e-30) 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_] := If[LessEqual[ew, -5.2e+102], N[Sqrt[N[Power[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 5.6e-30], 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}
\mathbf{if}\;ew \leq -5.2 \cdot 10^{+102}:\\
\;\;\;\;\sqrt{{\left(ew \cdot \sin t\right)}^{2}}\\
\mathbf{elif}\;ew \leq 5.6 \cdot 10^{-30}:\\
\;\;\;\;\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 < -5.20000000000000013e102Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr37.0%
Taylor expanded in ew around inf 35.6%
add-sqr-sqrt34.8%
sqrt-unprod44.1%
pow244.1%
Applied egg-rr44.1%
if -5.20000000000000013e102 < ew < 5.59999999999999977e-30Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 54.2%
if 5.59999999999999977e-30 < ew Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.6%
pow397.6%
Applied egg-rr52.4%
Taylor expanded in ew around inf 36.5%
add-sqr-sqrt35.9%
sqrt-unprod54.2%
pow254.2%
Applied egg-rr54.2%
(FPCore (eh ew t)
:precision binary64
(if (<= ew -1.75e+102)
(sqrt (pow (* ew (sin t)) 2.0))
(if (<= ew 1.35e-24)
(fabs (* eh (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.75e+102) {
tmp = sqrt(pow((ew * sin(t)), 2.0));
} else if (ew <= 1.35e-24) {
tmp = fabs((eh * 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.75d+102)) then
tmp = sqrt(((ew * sin(t)) ** 2.0d0))
else if (ew <= 1.35d-24) then
tmp = abs((eh * 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.75e+102) {
tmp = Math.sqrt(Math.pow((ew * Math.sin(t)), 2.0));
} else if (ew <= 1.35e-24) {
tmp = Math.abs((eh * 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.75e+102: tmp = math.sqrt(math.pow((ew * math.sin(t)), 2.0)) elif ew <= 1.35e-24: tmp = math.fabs((eh * 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.75e+102) tmp = sqrt((Float64(ew * sin(t)) ^ 2.0)); elseif (ew <= 1.35e-24) tmp = abs(Float64(eh * sin(atan(Float64(Float64(eh / 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.75e+102) tmp = sqrt(((ew * sin(t)) ^ 2.0)); elseif (ew <= 1.35e-24) tmp = abs((eh * 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.75e+102], N[Sqrt[N[Power[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 1.35e-24], N[Abs[N[(eh * N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $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.75 \cdot 10^{+102}:\\
\;\;\;\;\sqrt{{\left(ew \cdot \sin t\right)}^{2}}\\
\mathbf{elif}\;ew \leq 1.35 \cdot 10^{-24}:\\
\;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \sqrt{{\sin t}^{2}}\\
\end{array}
\end{array}
if ew < -1.75000000000000005e102Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr37.0%
Taylor expanded in ew around inf 35.6%
add-sqr-sqrt34.8%
sqrt-unprod44.1%
pow244.1%
Applied egg-rr44.1%
if -1.75000000000000005e102 < ew < 1.35000000000000003e-24Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 54.2%
Taylor expanded in t around 0 51.6%
Taylor expanded in t around 0 51.6%
if 1.35000000000000003e-24 < ew Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.6%
pow397.6%
Applied egg-rr52.4%
Taylor expanded in ew around inf 36.5%
add-sqr-sqrt35.9%
sqrt-unprod54.2%
pow254.2%
Applied egg-rr54.2%
(FPCore (eh ew t)
:precision binary64
(if (<= ew -5.5e+101)
(sqrt (pow (* ew (sin t)) 2.0))
(if (<= ew 2.9e-25)
(fabs (* eh (sin (atan (/ eh (* t ew))))))
(* ew (sqrt (pow (sin t) 2.0))))))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= -5.5e+101) {
tmp = sqrt(pow((ew * sin(t)), 2.0));
} else if (ew <= 2.9e-25) {
tmp = fabs((eh * sin(atan((eh / (t * ew))))));
} 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 <= (-5.5d+101)) then
tmp = sqrt(((ew * sin(t)) ** 2.0d0))
else if (ew <= 2.9d-25) then
tmp = abs((eh * sin(atan((eh / (t * ew))))))
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 <= -5.5e+101) {
tmp = Math.sqrt(Math.pow((ew * Math.sin(t)), 2.0));
} else if (ew <= 2.9e-25) {
tmp = Math.abs((eh * Math.sin(Math.atan((eh / (t * ew))))));
} else {
tmp = ew * Math.sqrt(Math.pow(Math.sin(t), 2.0));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if ew <= -5.5e+101: tmp = math.sqrt(math.pow((ew * math.sin(t)), 2.0)) elif ew <= 2.9e-25: tmp = math.fabs((eh * math.sin(math.atan((eh / (t * ew)))))) else: tmp = ew * math.sqrt(math.pow(math.sin(t), 2.0)) return tmp
function code(eh, ew, t) tmp = 0.0 if (ew <= -5.5e+101) tmp = sqrt((Float64(ew * sin(t)) ^ 2.0)); elseif (ew <= 2.9e-25) tmp = abs(Float64(eh * sin(atan(Float64(eh / Float64(t * ew)))))); 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 <= -5.5e+101) tmp = sqrt(((ew * sin(t)) ^ 2.0)); elseif (ew <= 2.9e-25) tmp = abs((eh * sin(atan((eh / (t * ew)))))); else tmp = ew * sqrt((sin(t) ^ 2.0)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[ew, -5.5e+101], N[Sqrt[N[Power[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 2.9e-25], N[Abs[N[(eh * N[Sin[N[ArcTan[N[(eh / N[(t * ew), $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 -5.5 \cdot 10^{+101}:\\
\;\;\;\;\sqrt{{\left(ew \cdot \sin t\right)}^{2}}\\
\mathbf{elif}\;ew \leq 2.9 \cdot 10^{-25}:\\
\;\;\;\;\left|eh \cdot \sin \tan^{-1} \left(\frac{eh}{t \cdot ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \sqrt{{\sin t}^{2}}\\
\end{array}
\end{array}
if ew < -5.50000000000000018e101Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr37.0%
Taylor expanded in ew around inf 35.6%
add-sqr-sqrt34.8%
sqrt-unprod44.1%
pow244.1%
Applied egg-rr44.1%
if -5.50000000000000018e101 < ew < 2.9000000000000001e-25Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 54.2%
Taylor expanded in t around 0 51.6%
if 2.9000000000000001e-25 < ew Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.6%
pow397.6%
Applied egg-rr52.4%
Taylor expanded in ew around inf 36.5%
add-sqr-sqrt35.9%
sqrt-unprod54.2%
pow254.2%
Applied egg-rr54.2%
Final simplification51.2%
(FPCore (eh ew t) :precision binary64 (if (or (<= eh -0.0088) (not (<= eh 2.4e+68))) (* eh (sin (atan (/ (/ eh ew) t)))) (sqrt (pow (* ew (sin t)) 2.0))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -0.0088) || !(eh <= 2.4e+68)) {
tmp = eh * sin(atan(((eh / ew) / t)));
} else {
tmp = sqrt(pow((ew * 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 ((eh <= (-0.0088d0)) .or. (.not. (eh <= 2.4d+68))) then
tmp = eh * sin(atan(((eh / ew) / t)))
else
tmp = sqrt(((ew * sin(t)) ** 2.0d0))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -0.0088) || !(eh <= 2.4e+68)) {
tmp = eh * Math.sin(Math.atan(((eh / ew) / t)));
} else {
tmp = Math.sqrt(Math.pow((ew * Math.sin(t)), 2.0));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -0.0088) or not (eh <= 2.4e+68): tmp = eh * math.sin(math.atan(((eh / ew) / t))) else: tmp = math.sqrt(math.pow((ew * math.sin(t)), 2.0)) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -0.0088) || !(eh <= 2.4e+68)) tmp = Float64(eh * sin(atan(Float64(Float64(eh / ew) / t)))); else tmp = sqrt((Float64(ew * sin(t)) ^ 2.0)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -0.0088) || ~((eh <= 2.4e+68))) tmp = eh * sin(atan(((eh / ew) / t))); else tmp = sqrt(((ew * sin(t)) ^ 2.0)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -0.0088], N[Not[LessEqual[eh, 2.4e+68]], $MachinePrecision]], N[(eh * N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[Power[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -0.0088 \lor \neg \left(eh \leq 2.4 \cdot 10^{+68}\right):\\
\;\;\;\;eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{\left(ew \cdot \sin t\right)}^{2}}\\
\end{array}
\end{array}
if eh < -0.00880000000000000053 or 2.40000000000000008e68 < eh Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 54.8%
add-cube-cbrt53.8%
pow353.8%
add-sqr-sqrt28.6%
fabs-sqr28.6%
add-sqr-sqrt28.9%
associate-/r*28.9%
Applied egg-rr28.9%
Taylor expanded in t around 0 28.3%
rem-cube-cbrt28.8%
*-commutative28.8%
associate-/r*28.8%
Applied egg-rr28.8%
if -0.00880000000000000053 < eh < 2.40000000000000008e68Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.7%
Applied egg-rr44.5%
Taylor expanded in ew around inf 34.6%
add-sqr-sqrt33.4%
sqrt-unprod45.3%
pow245.3%
Applied egg-rr45.3%
Final simplification38.1%
(FPCore (eh ew t)
:precision binary64
(if (<= ew -1.1e-85)
(sqrt (pow (* ew (sin t)) 2.0))
(if (<= ew 9.5e-97)
(* eh (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.1e-85) {
tmp = sqrt(pow((ew * sin(t)), 2.0));
} else if (ew <= 9.5e-97) {
tmp = eh * 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.1d-85)) then
tmp = sqrt(((ew * sin(t)) ** 2.0d0))
else if (ew <= 9.5d-97) then
tmp = eh * 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.1e-85) {
tmp = Math.sqrt(Math.pow((ew * Math.sin(t)), 2.0));
} else if (ew <= 9.5e-97) {
tmp = eh * 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.1e-85: tmp = math.sqrt(math.pow((ew * math.sin(t)), 2.0)) elif ew <= 9.5e-97: tmp = eh * 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.1e-85) tmp = sqrt((Float64(ew * sin(t)) ^ 2.0)); elseif (ew <= 9.5e-97) tmp = Float64(eh * sin(atan(Float64(Float64(eh / 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.1e-85) tmp = sqrt(((ew * sin(t)) ^ 2.0)); elseif (ew <= 9.5e-97) tmp = eh * 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.1e-85], N[Sqrt[N[Power[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision], If[LessEqual[ew, 9.5e-97], N[(eh * N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $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.1 \cdot 10^{-85}:\\
\;\;\;\;\sqrt{{\left(ew \cdot \sin t\right)}^{2}}\\
\mathbf{elif}\;ew \leq 9.5 \cdot 10^{-97}:\\
\;\;\;\;eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \sqrt{{\sin t}^{2}}\\
\end{array}
\end{array}
if ew < -1.1e-85Initial program 99.9%
fma-define99.9%
associate-/l/99.9%
associate-*l*99.9%
associate-/l/99.9%
Simplified99.9%
add-cube-cbrt97.7%
pow397.6%
Applied egg-rr40.9%
Taylor expanded in ew around inf 25.6%
add-sqr-sqrt24.8%
sqrt-unprod42.4%
pow242.4%
Applied egg-rr42.4%
if -1.1e-85 < ew < 9.5000000000000001e-97Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 60.3%
add-cube-cbrt59.3%
pow359.3%
add-sqr-sqrt27.5%
fabs-sqr27.5%
add-sqr-sqrt28.7%
associate-/r*28.7%
Applied egg-rr28.7%
Taylor expanded in t around 0 26.9%
rem-cube-cbrt27.3%
*-commutative27.3%
associate-/r*27.3%
Applied egg-rr27.3%
if 9.5000000000000001e-97 < ew Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.6%
pow397.5%
Applied egg-rr52.5%
Taylor expanded in ew around inf 34.9%
add-sqr-sqrt34.2%
sqrt-unprod51.3%
pow251.3%
Applied egg-rr51.3%
Final simplification40.1%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin (atan (/ (/ eh ew) t))))))
(if (<= eh -0.52)
t_1
(if (<= eh -5.6e-229)
(* ew (- (sin t)))
(if (<= eh 2.05e+16) (* ew (sin t)) t_1)))))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(atan(((eh / ew) / t)));
double tmp;
if (eh <= -0.52) {
tmp = t_1;
} else if (eh <= -5.6e-229) {
tmp = ew * -sin(t);
} else if (eh <= 2.05e+16) {
tmp = 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 = eh * sin(atan(((eh / ew) / t)))
if (eh <= (-0.52d0)) then
tmp = t_1
else if (eh <= (-5.6d-229)) then
tmp = ew * -sin(t)
else if (eh <= 2.05d+16) then
tmp = 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 = eh * Math.sin(Math.atan(((eh / ew) / t)));
double tmp;
if (eh <= -0.52) {
tmp = t_1;
} else if (eh <= -5.6e-229) {
tmp = ew * -Math.sin(t);
} else if (eh <= 2.05e+16) {
tmp = ew * Math.sin(t);
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.sin(math.atan(((eh / ew) / t))) tmp = 0 if eh <= -0.52: tmp = t_1 elif eh <= -5.6e-229: tmp = ew * -math.sin(t) elif eh <= 2.05e+16: tmp = ew * math.sin(t) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = Float64(eh * sin(atan(Float64(Float64(eh / ew) / t)))) tmp = 0.0 if (eh <= -0.52) tmp = t_1; elseif (eh <= -5.6e-229) tmp = Float64(ew * Float64(-sin(t))); elseif (eh <= 2.05e+16) tmp = Float64(ew * sin(t)); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * sin(atan(((eh / ew) / t))); tmp = 0.0; if (eh <= -0.52) tmp = t_1; elseif (eh <= -5.6e-229) tmp = ew * -sin(t); elseif (eh <= 2.05e+16) tmp = ew * sin(t); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eh, -0.52], t$95$1, If[LessEqual[eh, -5.6e-229], N[(ew * (-N[Sin[t], $MachinePrecision])), $MachinePrecision], If[LessEqual[eh, 2.05e+16], N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\\
\mathbf{if}\;eh \leq -0.52:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;eh \leq -5.6 \cdot 10^{-229}:\\
\;\;\;\;ew \cdot \left(-\sin t\right)\\
\mathbf{elif}\;eh \leq 2.05 \cdot 10^{+16}:\\
\;\;\;\;ew \cdot \sin t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if eh < -0.52000000000000002 or 2.05e16 < eh Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 55.3%
add-cube-cbrt54.3%
pow354.3%
add-sqr-sqrt27.3%
fabs-sqr27.3%
add-sqr-sqrt27.6%
associate-/r*27.6%
Applied egg-rr27.6%
Taylor expanded in t around 0 26.8%
rem-cube-cbrt27.3%
*-commutative27.3%
associate-/r*27.3%
Applied egg-rr27.3%
if -0.52000000000000002 < eh < -5.5999999999999998e-229Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.7%
pow397.6%
Applied egg-rr41.5%
Taylor expanded in ew around inf 23.2%
add-sqr-sqrt22.2%
sqrt-unprod44.3%
pow244.3%
Applied egg-rr44.3%
Taylor expanded in ew around -inf 36.7%
mul-1-neg36.7%
distribute-rgt-neg-in36.7%
Simplified36.7%
if -5.5999999999999998e-229 < eh < 2.05e16Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.8%
Applied egg-rr50.5%
Taylor expanded in ew around inf 45.8%
Final simplification35.2%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (/ eh ew) t)) (t_2 (* ew (- (sin t)))))
(if (<= t -4.4e-130)
t_2
(if (<= t -1e-214)
(/ (* eh t_1) (hypot 1.0 t_1))
(if (<= t 3.5e+18)
(sqrt (pow (* t ew) 2.0))
(if (<= t 3.5e+177) t_2 (* ew (sin t))))))))
double code(double eh, double ew, double t) {
double t_1 = (eh / ew) / t;
double t_2 = ew * -sin(t);
double tmp;
if (t <= -4.4e-130) {
tmp = t_2;
} else if (t <= -1e-214) {
tmp = (eh * t_1) / hypot(1.0, t_1);
} else if (t <= 3.5e+18) {
tmp = sqrt(pow((t * ew), 2.0));
} else if (t <= 3.5e+177) {
tmp = t_2;
} else {
tmp = ew * sin(t);
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double t_1 = (eh / ew) / t;
double t_2 = ew * -Math.sin(t);
double tmp;
if (t <= -4.4e-130) {
tmp = t_2;
} else if (t <= -1e-214) {
tmp = (eh * t_1) / Math.hypot(1.0, t_1);
} else if (t <= 3.5e+18) {
tmp = Math.sqrt(Math.pow((t * ew), 2.0));
} else if (t <= 3.5e+177) {
tmp = t_2;
} else {
tmp = ew * Math.sin(t);
}
return tmp;
}
def code(eh, ew, t): t_1 = (eh / ew) / t t_2 = ew * -math.sin(t) tmp = 0 if t <= -4.4e-130: tmp = t_2 elif t <= -1e-214: tmp = (eh * t_1) / math.hypot(1.0, t_1) elif t <= 3.5e+18: tmp = math.sqrt(math.pow((t * ew), 2.0)) elif t <= 3.5e+177: tmp = t_2 else: tmp = ew * math.sin(t) return tmp
function code(eh, ew, t) t_1 = Float64(Float64(eh / ew) / t) t_2 = Float64(ew * Float64(-sin(t))) tmp = 0.0 if (t <= -4.4e-130) tmp = t_2; elseif (t <= -1e-214) tmp = Float64(Float64(eh * t_1) / hypot(1.0, t_1)); elseif (t <= 3.5e+18) tmp = sqrt((Float64(t * ew) ^ 2.0)); elseif (t <= 3.5e+177) tmp = t_2; else tmp = Float64(ew * sin(t)); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = (eh / ew) / t; t_2 = ew * -sin(t); tmp = 0.0; if (t <= -4.4e-130) tmp = t_2; elseif (t <= -1e-214) tmp = (eh * t_1) / hypot(1.0, t_1); elseif (t <= 3.5e+18) tmp = sqrt(((t * ew) ^ 2.0)); elseif (t <= 3.5e+177) tmp = t_2; else tmp = ew * sin(t); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(ew * (-N[Sin[t], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[t, -4.4e-130], t$95$2, If[LessEqual[t, -1e-214], N[(N[(eh * t$95$1), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+18], N[Sqrt[N[Power[N[(t * ew), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 3.5e+177], t$95$2, N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{eh}{ew}}{t}\\
t_2 := ew \cdot \left(-\sin t\right)\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-214}:\\
\;\;\;\;\frac{eh \cdot t\_1}{\mathsf{hypot}\left(1, t\_1\right)}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+18}:\\
\;\;\;\;\sqrt{{\left(t \cdot ew\right)}^{2}}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+177}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \sin t\\
\end{array}
\end{array}
if t < -4.3999999999999997e-130 or 3.5e18 < t < 3.49999999999999991e177Initial program 99.7%
fma-define99.7%
associate-/l/99.7%
associate-*l*99.7%
associate-/l/99.7%
Simplified99.7%
add-cube-cbrt97.9%
pow397.8%
Applied egg-rr41.1%
Taylor expanded in ew around inf 17.8%
add-sqr-sqrt16.8%
sqrt-unprod32.9%
pow232.9%
Applied egg-rr32.9%
Taylor expanded in ew around -inf 34.1%
mul-1-neg34.1%
distribute-rgt-neg-in34.1%
Simplified34.1%
if -4.3999999999999997e-130 < t < -9.99999999999999913e-215Initial program 100.0%
fma-define100.0%
associate-/l/100.0%
associate-*l*100.0%
associate-/l/100.0%
Simplified100.0%
Taylor expanded in t around 0 89.8%
add-cube-cbrt87.6%
pow387.6%
add-sqr-sqrt36.2%
fabs-sqr36.2%
add-sqr-sqrt38.2%
associate-/r*38.2%
Applied egg-rr38.2%
Taylor expanded in t around 0 38.2%
rem-cube-cbrt38.8%
*-commutative38.8%
sin-atan11.9%
associate-*l/11.9%
associate-/r*12.7%
hypot-1-def23.0%
associate-/r*27.9%
Applied egg-rr27.9%
if -9.99999999999999913e-215 < t < 3.5e18Initial program 100.0%
fma-define100.0%
associate-/l/100.0%
associate-*l*100.0%
associate-/l/100.0%
Simplified100.0%
add-cube-cbrt97.8%
pow397.7%
Applied egg-rr55.8%
Taylor expanded in ew around inf 27.3%
add-sqr-sqrt26.5%
sqrt-unprod30.3%
pow230.3%
Applied egg-rr30.3%
Taylor expanded in t around 0 10.1%
unpow210.1%
unpow210.1%
swap-sqr29.2%
unpow229.2%
Simplified29.2%
if 3.49999999999999991e177 < t Initial program 99.7%
fma-define99.7%
associate-/l/99.7%
associate-*l*99.7%
associate-/l/99.7%
Simplified99.7%
add-cube-cbrt97.5%
pow397.8%
Applied egg-rr54.7%
Taylor expanded in ew around inf 29.6%
Final simplification31.5%
(FPCore (eh ew t) :precision binary64 (if (or (<= t -4.4e-130) (and (not (<= t 4400000000000.0)) (<= t 7.5e+176))) (* ew (- (sin t))) (* ew (sin t))))
double code(double eh, double ew, double t) {
double tmp;
if ((t <= -4.4e-130) || (!(t <= 4400000000000.0) && (t <= 7.5e+176))) {
tmp = ew * -sin(t);
} else {
tmp = ew * sin(t);
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-4.4d-130)) .or. (.not. (t <= 4400000000000.0d0)) .and. (t <= 7.5d+176)) then
tmp = ew * -sin(t)
else
tmp = ew * sin(t)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((t <= -4.4e-130) || (!(t <= 4400000000000.0) && (t <= 7.5e+176))) {
tmp = ew * -Math.sin(t);
} else {
tmp = ew * Math.sin(t);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (t <= -4.4e-130) or (not (t <= 4400000000000.0) and (t <= 7.5e+176)): tmp = ew * -math.sin(t) else: tmp = ew * math.sin(t) return tmp
function code(eh, ew, t) tmp = 0.0 if ((t <= -4.4e-130) || (!(t <= 4400000000000.0) && (t <= 7.5e+176))) tmp = Float64(ew * Float64(-sin(t))); else tmp = Float64(ew * sin(t)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((t <= -4.4e-130) || (~((t <= 4400000000000.0)) && (t <= 7.5e+176))) tmp = ew * -sin(t); else tmp = ew * sin(t); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -4.4e-130], And[N[Not[LessEqual[t, 4400000000000.0]], $MachinePrecision], LessEqual[t, 7.5e+176]]], N[(ew * (-N[Sin[t], $MachinePrecision])), $MachinePrecision], N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{-130} \lor \neg \left(t \leq 4400000000000\right) \land t \leq 7.5 \cdot 10^{+176}:\\
\;\;\;\;ew \cdot \left(-\sin t\right)\\
\mathbf{else}:\\
\;\;\;\;ew \cdot \sin t\\
\end{array}
\end{array}
if t < -4.3999999999999997e-130 or 4.4e12 < t < 7.499999999999999e176Initial program 99.7%
fma-define99.7%
associate-/l/99.7%
associate-*l*99.7%
associate-/l/99.7%
Simplified99.7%
add-cube-cbrt97.9%
pow397.8%
Applied egg-rr40.4%
Taylor expanded in ew around inf 17.5%
add-sqr-sqrt16.6%
sqrt-unprod32.4%
pow232.4%
Applied egg-rr32.4%
Taylor expanded in ew around -inf 33.6%
mul-1-neg33.6%
distribute-rgt-neg-in33.6%
Simplified33.6%
if -4.3999999999999997e-130 < t < 4.4e12 or 7.499999999999999e176 < t Initial program 99.9%
fma-define99.9%
associate-/l/99.9%
associate-*l*99.9%
associate-/l/99.9%
Simplified99.9%
add-cube-cbrt97.7%
pow397.7%
Applied egg-rr55.2%
Taylor expanded in ew around inf 26.4%
Final simplification29.8%
(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%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.7%
Applied egg-rr48.2%
Taylor expanded in ew around inf 22.2%
(FPCore (eh ew t) :precision binary64 (* t ew))
double code(double eh, double ew, double t) {
return t * ew;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = t * ew
end function
public static double code(double eh, double ew, double t) {
return t * ew;
}
def code(eh, ew, t): return t * ew
function code(eh, ew, t) return Float64(t * ew) end
function tmp = code(eh, ew, t) tmp = t * ew; end
code[eh_, ew_, t_] := N[(t * ew), $MachinePrecision]
\begin{array}{l}
\\
t \cdot ew
\end{array}
Initial program 99.8%
fma-define99.8%
associate-/l/99.8%
associate-*l*99.8%
associate-/l/99.8%
Simplified99.8%
add-cube-cbrt97.8%
pow397.7%
Applied egg-rr48.2%
Taylor expanded in ew around inf 22.2%
Taylor expanded in t around 0 12.1%
Final simplification12.1%
herbie shell --seed 2024139
(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))))))))