
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew)))) (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((-eh * tan(t)) / ew));
return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((-eh * tan(t)) / ew))
code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((-eh * math.tan(t)) / ew)) return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((-eh * tan(t)) / ew)); tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew)))) (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((-eh * tan(t)) / ew));
return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((-eh * tan(t)) / ew))
code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((-eh * math.tan(t)) / ew)) return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((-eh * tan(t)) / ew)); tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (tan t) (/ eh ew))))
(fabs
(+
(/ (* ew (cos t)) (hypot 1.0 t_1))
(* eh (* (sin t) (sin (atan t_1))))))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) * (eh / ew);
return fabs((((ew * cos(t)) / hypot(1.0, t_1)) + (eh * (sin(t) * sin(atan(t_1))))));
}
public static double code(double eh, double ew, double t) {
double t_1 = Math.tan(t) * (eh / ew);
return Math.abs((((ew * Math.cos(t)) / Math.hypot(1.0, t_1)) + (eh * (Math.sin(t) * Math.sin(Math.atan(t_1))))));
}
def code(eh, ew, t): t_1 = math.tan(t) * (eh / ew) return math.fabs((((ew * math.cos(t)) / math.hypot(1.0, t_1)) + (eh * (math.sin(t) * math.sin(math.atan(t_1))))))
function code(eh, ew, t) t_1 = Float64(tan(t) * Float64(eh / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) / hypot(1.0, t_1)) + Float64(eh * Float64(sin(t) * sin(atan(t_1)))))) end
function tmp = code(eh, ew, t) t_1 = tan(t) * (eh / ew); tmp = abs((((ew * cos(t)) / hypot(1.0, t_1)) + (eh * (sin(t) * sin(atan(t_1)))))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] + N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan t \cdot \frac{eh}{ew}\\
\left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, t\_1\right)} + eh \cdot \left(\sin t \cdot \sin \tan^{-1} t\_1\right)\right|
\end{array}
\end{array}
Initial program 99.8%
sub-neg99.8%
Applied egg-rr99.8%
(FPCore (eh ew t) :precision binary64 (fabs (+ (* eh (* (sin t) (sin (atan (* (tan t) (/ eh ew)))))) (* ew (cbrt (pow (cos t) 3.0))))))
double code(double eh, double ew, double t) {
return fabs(((eh * (sin(t) * sin(atan((tan(t) * (eh / ew)))))) + (ew * cbrt(pow(cos(t), 3.0)))));
}
public static double code(double eh, double ew, double t) {
return Math.abs(((eh * (Math.sin(t) * Math.sin(Math.atan((Math.tan(t) * (eh / ew)))))) + (ew * Math.cbrt(Math.pow(Math.cos(t), 3.0)))));
}
function code(eh, ew, t) return abs(Float64(Float64(eh * Float64(sin(t) * sin(atan(Float64(tan(t) * Float64(eh / ew)))))) + Float64(ew * cbrt((cos(t) ^ 3.0))))) end
code[eh_, ew_, t_] := N[Abs[N[(N[(eh * N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(ew * N[Power[N[Power[N[Cos[t], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{ew}\right)\right) + ew \cdot \sqrt[3]{{\cos t}^{3}}\right|
\end{array}
Initial program 99.8%
sub-neg99.8%
Applied egg-rr99.8%
add-cbrt-cube99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in t around 0 98.6%
Final simplification98.6%
(FPCore (eh ew t)
:precision binary64
(if (or (<= ew -1.5e-108) (not (<= ew 6000.0)))
(fabs
(*
ew
(+ (cos t) (* eh (/ (* (sin t) (sin (atan (* eh (/ (tan t) ew))))) ew)))))
(fabs
(*
eh
(-
(* ew (/ (cos t) eh))
(* (sin t) (sin (atan (* (tan t) (/ eh (- ew)))))))))))
double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -1.5e-108) || !(ew <= 6000.0)) {
tmp = fabs((ew * (cos(t) + (eh * ((sin(t) * sin(atan((eh * (tan(t) / ew))))) / ew)))));
} else {
tmp = fabs((eh * ((ew * (cos(t) / eh)) - (sin(t) * sin(atan((tan(t) * (eh / -ew))))))));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((ew <= (-1.5d-108)) .or. (.not. (ew <= 6000.0d0))) then
tmp = abs((ew * (cos(t) + (eh * ((sin(t) * sin(atan((eh * (tan(t) / ew))))) / ew)))))
else
tmp = abs((eh * ((ew * (cos(t) / eh)) - (sin(t) * sin(atan((tan(t) * (eh / -ew))))))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -1.5e-108) || !(ew <= 6000.0)) {
tmp = Math.abs((ew * (Math.cos(t) + (eh * ((Math.sin(t) * Math.sin(Math.atan((eh * (Math.tan(t) / ew))))) / ew)))));
} else {
tmp = Math.abs((eh * ((ew * (Math.cos(t) / eh)) - (Math.sin(t) * Math.sin(Math.atan((Math.tan(t) * (eh / -ew))))))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (ew <= -1.5e-108) or not (ew <= 6000.0): tmp = math.fabs((ew * (math.cos(t) + (eh * ((math.sin(t) * math.sin(math.atan((eh * (math.tan(t) / ew))))) / ew))))) else: tmp = math.fabs((eh * ((ew * (math.cos(t) / eh)) - (math.sin(t) * math.sin(math.atan((math.tan(t) * (eh / -ew)))))))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((ew <= -1.5e-108) || !(ew <= 6000.0)) tmp = abs(Float64(ew * Float64(cos(t) + Float64(eh * Float64(Float64(sin(t) * sin(atan(Float64(eh * Float64(tan(t) / ew))))) / ew))))); else tmp = abs(Float64(eh * Float64(Float64(ew * Float64(cos(t) / eh)) - Float64(sin(t) * sin(atan(Float64(tan(t) * Float64(eh / Float64(-ew))))))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((ew <= -1.5e-108) || ~((ew <= 6000.0))) tmp = abs((ew * (cos(t) + (eh * ((sin(t) * sin(atan((eh * (tan(t) / ew))))) / ew))))); else tmp = abs((eh * ((ew * (cos(t) / eh)) - (sin(t) * sin(atan((tan(t) * (eh / -ew)))))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -1.5e-108], N[Not[LessEqual[ew, 6000.0]], $MachinePrecision]], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] + N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(eh * N[(N[(ew * N[(N[Cos[t], $MachinePrecision] / eh), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -1.5 \cdot 10^{-108} \lor \neg \left(ew \leq 6000\right):\\
\;\;\;\;\left|ew \cdot \left(\cos t + eh \cdot \frac{\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}{ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|eh \cdot \left(ew \cdot \frac{\cos t}{eh} - \sin t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right)\right|\\
\end{array}
\end{array}
if ew < -1.49999999999999996e-108 or 6e3 < ew Initial program 99.8%
sub-neg99.8%
Applied egg-rr99.8%
add-exp-log77.7%
Applied egg-rr77.7%
Taylor expanded in ew around inf 98.9%
associate-/l*99.0%
associate-/l*99.0%
Simplified99.0%
if -1.49999999999999996e-108 < ew < 6e3Initial program 99.7%
add-sqr-sqrt53.1%
pow253.1%
Applied egg-rr74.5%
Taylor expanded in ew around inf 80.2%
mul-1-neg80.2%
unsub-neg80.2%
associate-/l*80.1%
mul-1-neg80.1%
*-commutative80.1%
associate-*r/80.1%
distribute-rgt-neg-in80.1%
distribute-neg-frac280.1%
Simplified80.1%
Taylor expanded in eh around inf 98.4%
+-commutative98.4%
mul-1-neg98.4%
mul-1-neg98.4%
*-commutative98.4%
distribute-frac-neg298.4%
associate-*r/98.4%
unsub-neg98.4%
associate-/l*98.3%
Simplified98.3%
Final simplification98.7%
(FPCore (eh ew t)
:precision binary64
(if (<= eh -1.18e+122)
(fabs (* (* eh (sin t)) (sin (atan (* (tan t) (/ eh (- ew)))))))
(fabs
(*
ew
(+
(cos t)
(* eh (/ (* (sin t) (sin (atan (* eh (/ (tan t) ew))))) ew)))))))
double code(double eh, double ew, double t) {
double tmp;
if (eh <= -1.18e+122) {
tmp = fabs(((eh * sin(t)) * sin(atan((tan(t) * (eh / -ew))))));
} else {
tmp = fabs((ew * (cos(t) + (eh * ((sin(t) * sin(atan((eh * (tan(t) / ew))))) / ew)))));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if (eh <= (-1.18d+122)) then
tmp = abs(((eh * sin(t)) * sin(atan((tan(t) * (eh / -ew))))))
else
tmp = abs((ew * (cos(t) + (eh * ((sin(t) * sin(atan((eh * (tan(t) / ew))))) / ew)))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (eh <= -1.18e+122) {
tmp = Math.abs(((eh * Math.sin(t)) * Math.sin(Math.atan((Math.tan(t) * (eh / -ew))))));
} else {
tmp = Math.abs((ew * (Math.cos(t) + (eh * ((Math.sin(t) * Math.sin(Math.atan((eh * (Math.tan(t) / ew))))) / ew)))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if eh <= -1.18e+122: tmp = math.fabs(((eh * math.sin(t)) * math.sin(math.atan((math.tan(t) * (eh / -ew)))))) else: tmp = math.fabs((ew * (math.cos(t) + (eh * ((math.sin(t) * math.sin(math.atan((eh * (math.tan(t) / ew))))) / ew))))) return tmp
function code(eh, ew, t) tmp = 0.0 if (eh <= -1.18e+122) tmp = abs(Float64(Float64(eh * sin(t)) * sin(atan(Float64(tan(t) * Float64(eh / Float64(-ew))))))); else tmp = abs(Float64(ew * Float64(cos(t) + Float64(eh * Float64(Float64(sin(t) * sin(atan(Float64(eh * Float64(tan(t) / ew))))) / ew))))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (eh <= -1.18e+122) tmp = abs(((eh * sin(t)) * sin(atan((tan(t) * (eh / -ew)))))); else tmp = abs((ew * (cos(t) + (eh * ((sin(t) * sin(atan((eh * (tan(t) / ew))))) / ew))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[eh, -1.18e+122], N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[(N[Cos[t], $MachinePrecision] + N[(eh * N[(N[(N[Sin[t], $MachinePrecision] * N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -1.18 \cdot 10^{+122}:\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \left(\cos t + eh \cdot \frac{\sin t \cdot \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right)}{ew}\right)\right|\\
\end{array}
\end{array}
if eh < -1.18000000000000003e122Initial program 99.8%
Taylor expanded in ew around 0 75.7%
mul-1-neg75.7%
associate-*r*75.8%
distribute-rgt-neg-in75.8%
mul-1-neg75.8%
associate-*r/75.7%
*-commutative75.7%
associate-*l/75.8%
associate-*r/75.8%
distribute-rgt-neg-in75.8%
distribute-neg-frac275.8%
Simplified75.8%
if -1.18000000000000003e122 < eh Initial program 99.8%
sub-neg99.8%
Applied egg-rr99.8%
add-exp-log71.1%
Applied egg-rr71.1%
Taylor expanded in ew around inf 95.9%
associate-/l*95.9%
associate-/l*95.9%
Simplified95.9%
Final simplification92.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (* (tan t) (/ eh (- ew))))))
(if (or (<= ew -1.1e-102) (not (<= ew 1.55e-87)))
(fabs (* (* ew (cos t)) (cos t_1)))
(fabs (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan((tan(t) * (eh / -ew)));
double tmp;
if ((ew <= -1.1e-102) || !(ew <= 1.55e-87)) {
tmp = fabs(((ew * cos(t)) * cos(t_1)));
} else {
tmp = fabs(((eh * sin(t)) * 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((tan(t) * (eh / -ew)))
if ((ew <= (-1.1d-102)) .or. (.not. (ew <= 1.55d-87))) then
tmp = abs(((ew * cos(t)) * cos(t_1)))
else
tmp = abs(((eh * sin(t)) * sin(t_1)))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan((Math.tan(t) * (eh / -ew)));
double tmp;
if ((ew <= -1.1e-102) || !(ew <= 1.55e-87)) {
tmp = Math.abs(((ew * Math.cos(t)) * Math.cos(t_1)));
} else {
tmp = Math.abs(((eh * Math.sin(t)) * Math.sin(t_1)));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.atan((math.tan(t) * (eh / -ew))) tmp = 0 if (ew <= -1.1e-102) or not (ew <= 1.55e-87): tmp = math.fabs(((ew * math.cos(t)) * math.cos(t_1))) else: tmp = math.fabs(((eh * math.sin(t)) * math.sin(t_1))) return tmp
function code(eh, ew, t) t_1 = atan(Float64(tan(t) * Float64(eh / Float64(-ew)))) tmp = 0.0 if ((ew <= -1.1e-102) || !(ew <= 1.55e-87)) tmp = abs(Float64(Float64(ew * cos(t)) * cos(t_1))); else tmp = abs(Float64(Float64(eh * sin(t)) * sin(t_1))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = atan((tan(t) * (eh / -ew))); tmp = 0.0; if ((ew <= -1.1e-102) || ~((ew <= 1.55e-87))) tmp = abs(((ew * cos(t)) * cos(t_1))); else tmp = abs(((eh * sin(t)) * sin(t_1))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[ew, -1.1e-102], N[Not[LessEqual[ew, 1.55e-87]], $MachinePrecision]], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\\
\mathbf{if}\;ew \leq -1.1 \cdot 10^{-102} \lor \neg \left(ew \leq 1.55 \cdot 10^{-87}\right):\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\left(eh \cdot \sin t\right) \cdot \sin t\_1\right|\\
\end{array}
\end{array}
if ew < -1.10000000000000006e-102 or 1.54999999999999999e-87 < ew Initial program 99.8%
Taylor expanded in ew around inf 86.7%
associate-*r*86.7%
associate-*r/86.7%
neg-mul-186.7%
*-commutative86.7%
distribute-rgt-neg-in86.7%
mul-1-neg86.7%
associate-*r/86.7%
mul-1-neg86.7%
Simplified86.7%
if -1.10000000000000006e-102 < ew < 1.54999999999999999e-87Initial program 99.7%
Taylor expanded in ew around 0 78.5%
mul-1-neg78.5%
associate-*r*78.5%
distribute-rgt-neg-in78.5%
mul-1-neg78.5%
associate-*r/78.5%
*-commutative78.5%
associate-*l/78.5%
associate-*r/78.5%
distribute-rgt-neg-in78.5%
distribute-neg-frac278.5%
Simplified78.5%
Final simplification83.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (* (tan t) (/ eh (- ew))))))
(if (or (<= t -240000.0) (not (<= t 0.078)))
(fabs (* (* ew (cos t)) (cos t_1)))
(fabs (+ ew (* t (- (* -0.5 (* ew t)) (* eh (sin t_1)))))))))
double code(double eh, double ew, double t) {
double t_1 = atan((tan(t) * (eh / -ew)));
double tmp;
if ((t <= -240000.0) || !(t <= 0.078)) {
tmp = fabs(((ew * cos(t)) * cos(t_1)));
} else {
tmp = fabs((ew + (t * ((-0.5 * (ew * t)) - (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((tan(t) * (eh / -ew)))
if ((t <= (-240000.0d0)) .or. (.not. (t <= 0.078d0))) then
tmp = abs(((ew * cos(t)) * cos(t_1)))
else
tmp = abs((ew + (t * (((-0.5d0) * (ew * t)) - (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((Math.tan(t) * (eh / -ew)));
double tmp;
if ((t <= -240000.0) || !(t <= 0.078)) {
tmp = Math.abs(((ew * Math.cos(t)) * Math.cos(t_1)));
} else {
tmp = Math.abs((ew + (t * ((-0.5 * (ew * t)) - (eh * Math.sin(t_1))))));
}
return tmp;
}
def code(eh, ew, t): t_1 = math.atan((math.tan(t) * (eh / -ew))) tmp = 0 if (t <= -240000.0) or not (t <= 0.078): tmp = math.fabs(((ew * math.cos(t)) * math.cos(t_1))) else: tmp = math.fabs((ew + (t * ((-0.5 * (ew * t)) - (eh * math.sin(t_1)))))) return tmp
function code(eh, ew, t) t_1 = atan(Float64(tan(t) * Float64(eh / Float64(-ew)))) tmp = 0.0 if ((t <= -240000.0) || !(t <= 0.078)) tmp = abs(Float64(Float64(ew * cos(t)) * cos(t_1))); else tmp = abs(Float64(ew + Float64(t * Float64(Float64(-0.5 * Float64(ew * t)) - Float64(eh * sin(t_1)))))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = atan((tan(t) * (eh / -ew))); tmp = 0.0; if ((t <= -240000.0) || ~((t <= 0.078))) tmp = abs(((ew * cos(t)) * cos(t_1))); else tmp = abs((ew + (t * ((-0.5 * (ew * t)) - (eh * sin(t_1)))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[t, -240000.0], N[Not[LessEqual[t, 0.078]], $MachinePrecision]], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew + N[(t * N[(N[(-0.5 * N[(ew * t), $MachinePrecision]), $MachinePrecision] - N[(eh * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\\
\mathbf{if}\;t \leq -240000 \lor \neg \left(t \leq 0.078\right):\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew + t \cdot \left(-0.5 \cdot \left(ew \cdot t\right) - eh \cdot \sin t\_1\right)\right|\\
\end{array}
\end{array}
if t < -2.4e5 or 0.0779999999999999999 < t Initial program 99.5%
Taylor expanded in ew around inf 54.1%
associate-*r*54.1%
associate-*r/54.1%
neg-mul-154.1%
*-commutative54.1%
distribute-rgt-neg-in54.1%
mul-1-neg54.1%
associate-*r/54.1%
mul-1-neg54.1%
Simplified54.1%
if -2.4e5 < t < 0.0779999999999999999Initial program 100.0%
add-sqr-sqrt52.2%
pow252.2%
Applied egg-rr60.0%
Taylor expanded in ew around inf 94.3%
mul-1-neg94.3%
unsub-neg94.3%
associate-/l*94.2%
mul-1-neg94.2%
*-commutative94.2%
associate-*r/94.2%
distribute-rgt-neg-in94.2%
distribute-neg-frac294.2%
Simplified94.2%
Taylor expanded in t around 0 97.5%
+-commutative97.5%
mul-1-neg97.5%
unsub-neg97.5%
mul-1-neg97.5%
associate-*l/97.5%
distribute-rgt-neg-in97.5%
Simplified97.5%
Final simplification78.0%
(FPCore (eh ew t) :precision binary64 (fabs (- (* eh (* t (sin (atan (* (tan t) (/ eh (- ew))))))) ew)))
double code(double eh, double ew, double t) {
return fabs(((eh * (t * sin(atan((tan(t) * (eh / -ew)))))) - ew));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs(((eh * (t * sin(atan((tan(t) * (eh / -ew)))))) - ew))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((eh * (t * Math.sin(Math.atan((Math.tan(t) * (eh / -ew)))))) - ew));
}
def code(eh, ew, t): return math.fabs(((eh * (t * math.sin(math.atan((math.tan(t) * (eh / -ew)))))) - ew))
function code(eh, ew, t) return abs(Float64(Float64(eh * Float64(t * sin(atan(Float64(tan(t) * Float64(eh / Float64(-ew))))))) - ew)) end
function tmp = code(eh, ew, t) tmp = abs(((eh * (t * sin(atan((tan(t) * (eh / -ew)))))) - ew)); end
code[eh_, ew_, t_] := N[Abs[N[(N[(eh * N[(t * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - ew), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|eh \cdot \left(t \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right) - ew\right|
\end{array}
Initial program 99.8%
add-sqr-sqrt53.2%
pow253.2%
Applied egg-rr62.1%
Taylor expanded in t around 0 59.6%
mul-1-neg59.6%
unsub-neg59.6%
mul-1-neg59.6%
*-commutative59.6%
associate-*r/59.6%
distribute-rgt-neg-in59.6%
distribute-neg-frac259.6%
Simplified59.6%
Final simplification59.6%
(FPCore (eh ew t) :precision binary64 (fabs (+ ew (* (sin (atan (* eh (/ (tan t) ew)))) (* t eh)))))
double code(double eh, double ew, double t) {
return fabs((ew + (sin(atan((eh * (tan(t) / ew)))) * (t * eh))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((ew + (sin(atan((eh * (tan(t) / ew)))) * (t * eh))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew + (Math.sin(Math.atan((eh * (Math.tan(t) / ew)))) * (t * eh))));
}
def code(eh, ew, t): return math.fabs((ew + (math.sin(math.atan((eh * (math.tan(t) / ew)))) * (t * eh))))
function code(eh, ew, t) return abs(Float64(ew + Float64(sin(atan(Float64(eh * Float64(tan(t) / ew)))) * Float64(t * eh)))) end
function tmp = code(eh, ew, t) tmp = abs((ew + (sin(atan((eh * (tan(t) / ew)))) * (t * eh)))); end
code[eh_, ew_, t_] := N[Abs[N[(ew + N[(N[Sin[N[ArcTan[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(t * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew + \sin \tan^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \left(t \cdot eh\right)\right|
\end{array}
Initial program 99.8%
sub-neg99.8%
Applied egg-rr99.8%
add-exp-log67.6%
Applied egg-rr67.6%
Taylor expanded in t around 0 59.6%
associate-*r*59.4%
*-commutative59.4%
associate-/l*59.4%
Simplified59.4%
Final simplification59.4%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (cos (atan (* (tan t) (/ eh (- ew))))))))
double code(double eh, double ew, double t) {
return fabs((ew * cos(atan((tan(t) * (eh / -ew))))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((ew * cos(atan((tan(t) * (eh / -ew))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew * Math.cos(Math.atan((Math.tan(t) * (eh / -ew))))));
}
def code(eh, ew, t): return math.fabs((ew * math.cos(math.atan((math.tan(t) * (eh / -ew))))))
function code(eh, ew, t) return abs(Float64(ew * cos(atan(Float64(tan(t) * Float64(eh / Float64(-ew))))))) end
function tmp = code(eh, ew, t) tmp = abs((ew * cos(atan((tan(t) * (eh / -ew)))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[Cos[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \cos \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
*-commutative46.2%
distribute-rgt-neg-in46.2%
mul-1-neg46.2%
associate-*r/46.2%
mul-1-neg46.2%
Simplified46.2%
Final simplification46.2%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (/ 1.0 (hypot 1.0 (* eh (/ (tan t) ew)))))))
double code(double eh, double ew, double t) {
return fabs((ew * (1.0 / hypot(1.0, (eh * (tan(t) / ew))))));
}
public static double code(double eh, double ew, double t) {
return Math.abs((ew * (1.0 / Math.hypot(1.0, (eh * (Math.tan(t) / ew))))));
}
def code(eh, ew, t): return math.fabs((ew * (1.0 / math.hypot(1.0, (eh * (math.tan(t) / ew))))))
function code(eh, ew, t) return abs(Float64(ew * Float64(1.0 / hypot(1.0, Float64(eh * Float64(tan(t) / ew)))))) end
function tmp = code(eh, ew, t) tmp = abs((ew * (1.0 / hypot(1.0, (eh * (tan(t) / ew)))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
*-commutative46.2%
distribute-rgt-neg-in46.2%
mul-1-neg46.2%
associate-*r/46.2%
mul-1-neg46.2%
Simplified46.2%
associate-*r/46.2%
*-commutative46.2%
cos-atan46.0%
hypot-1-def46.0%
*-commutative46.0%
associate-*r/46.0%
Applied egg-rr46.0%
hypot-undefine45.9%
swap-sqr43.8%
distribute-frac-neg43.8%
distribute-frac-neg43.8%
sqr-neg43.8%
swap-sqr45.9%
hypot-undefine46.0%
associate-*r/46.0%
*-commutative46.0%
associate-/l*46.0%
Simplified46.0%
(FPCore (eh ew t) :precision binary64 (* (cos (atan (/ (* t eh) ew))) (fabs ew)))
double code(double eh, double ew, double t) {
return cos(atan(((t * eh) / ew))) * fabs(ew);
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = cos(atan(((t * eh) / ew))) * abs(ew)
end function
public static double code(double eh, double ew, double t) {
return Math.cos(Math.atan(((t * eh) / ew))) * Math.abs(ew);
}
def code(eh, ew, t): return math.cos(math.atan(((t * eh) / ew))) * math.fabs(ew)
function code(eh, ew, t) return Float64(cos(atan(Float64(Float64(t * eh) / ew))) * abs(ew)) end
function tmp = code(eh, ew, t) tmp = cos(atan(((t * eh) / ew))) * abs(ew); end
code[eh_, ew_, t_] := N[(N[Cos[N[ArcTan[N[(N[(t * eh), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Abs[ew], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos \tan^{-1} \left(\frac{t \cdot eh}{ew}\right) \cdot \left|ew\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
*-commutative46.2%
distribute-rgt-neg-in46.2%
mul-1-neg46.2%
associate-*r/46.2%
mul-1-neg46.2%
Simplified46.2%
Taylor expanded in t around 0 45.3%
mul-1-neg45.3%
associate-/l*45.3%
distribute-rgt-neg-in45.3%
Simplified45.3%
*-un-lft-identity45.3%
distribute-rgt-neg-out45.3%
atan-neg45.3%
Applied egg-rr45.3%
*-lft-identity45.3%
fabs-mul45.3%
*-commutative45.3%
rem-square-sqrt45.3%
fabs-sqr45.3%
rem-square-sqrt45.3%
cos-neg45.3%
associate-*r/45.3%
*-commutative45.3%
Simplified45.3%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (+ (* -0.5 (pow (* t (/ eh ew)) 2.0)) 1.0))))
double code(double eh, double ew, double t) {
return fabs((ew * ((-0.5 * pow((t * (eh / ew)), 2.0)) + 1.0)));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((ew * (((-0.5d0) * ((t * (eh / ew)) ** 2.0d0)) + 1.0d0)))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew * ((-0.5 * Math.pow((t * (eh / ew)), 2.0)) + 1.0)));
}
def code(eh, ew, t): return math.fabs((ew * ((-0.5 * math.pow((t * (eh / ew)), 2.0)) + 1.0)))
function code(eh, ew, t) return abs(Float64(ew * Float64(Float64(-0.5 * (Float64(t * Float64(eh / ew)) ^ 2.0)) + 1.0))) end
function tmp = code(eh, ew, t) tmp = abs((ew * ((-0.5 * ((t * (eh / ew)) ^ 2.0)) + 1.0))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(N[(-0.5 * N[Power[N[(t * N[(eh / ew), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(-0.5 \cdot {\left(t \cdot \frac{eh}{ew}\right)}^{2} + 1\right)\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
*-commutative46.2%
distribute-rgt-neg-in46.2%
mul-1-neg46.2%
associate-*r/46.2%
mul-1-neg46.2%
Simplified46.2%
Taylor expanded in t around 0 45.3%
mul-1-neg45.3%
associate-/l*45.3%
distribute-rgt-neg-in45.3%
Simplified45.3%
cos-atan44.6%
hypot-1-def44.7%
distribute-neg-frac244.7%
Applied egg-rr44.7%
distribute-frac-neg244.7%
distribute-neg-frac44.7%
Simplified44.7%
Taylor expanded in ew around inf 32.0%
associate-/l*31.8%
unpow231.8%
unpow231.8%
unpow231.8%
times-frac36.9%
swap-sqr45.2%
unpow145.2%
pow-plus45.2%
*-commutative45.2%
associate-*l/45.2%
associate-/l*45.2%
metadata-eval45.2%
Simplified45.2%
Final simplification45.2%
(FPCore (eh ew t) :precision binary64 (fabs (/ ew (hypot 1.0 (* eh (/ t (- ew)))))))
double code(double eh, double ew, double t) {
return fabs((ew / hypot(1.0, (eh * (t / -ew)))));
}
public static double code(double eh, double ew, double t) {
return Math.abs((ew / Math.hypot(1.0, (eh * (t / -ew)))));
}
def code(eh, ew, t): return math.fabs((ew / math.hypot(1.0, (eh * (t / -ew)))))
function code(eh, ew, t) return abs(Float64(ew / hypot(1.0, Float64(eh * Float64(t / Float64(-ew)))))) end
function tmp = code(eh, ew, t) tmp = abs((ew / hypot(1.0, (eh * (t / -ew))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew / N[Sqrt[1.0 ^ 2 + N[(eh * N[(t / (-ew)), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{ew}{\mathsf{hypot}\left(1, eh \cdot \frac{t}{-ew}\right)}\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
*-commutative46.2%
distribute-rgt-neg-in46.2%
mul-1-neg46.2%
associate-*r/46.2%
mul-1-neg46.2%
Simplified46.2%
Taylor expanded in t around 0 45.3%
mul-1-neg45.3%
associate-/l*45.3%
distribute-rgt-neg-in45.3%
Simplified45.3%
cos-atan44.6%
hypot-1-def44.7%
distribute-neg-frac244.7%
Applied egg-rr44.7%
distribute-frac-neg244.7%
distribute-neg-frac44.7%
Simplified44.7%
un-div-inv44.7%
distribute-frac-neg44.7%
Applied egg-rr44.7%
Final simplification44.7%
(FPCore (eh ew t) :precision binary64 (/ (fabs ew) (hypot 1.0 (* t (/ eh ew)))))
double code(double eh, double ew, double t) {
return fabs(ew) / hypot(1.0, (t * (eh / ew)));
}
public static double code(double eh, double ew, double t) {
return Math.abs(ew) / Math.hypot(1.0, (t * (eh / ew)));
}
def code(eh, ew, t): return math.fabs(ew) / math.hypot(1.0, (t * (eh / ew)))
function code(eh, ew, t) return Float64(abs(ew) / hypot(1.0, Float64(t * Float64(eh / ew)))) end
function tmp = code(eh, ew, t) tmp = abs(ew) / hypot(1.0, (t * (eh / ew))); end
code[eh_, ew_, t_] := N[(N[Abs[ew], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(t * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left|ew\right|}{\mathsf{hypot}\left(1, t \cdot \frac{eh}{ew}\right)}
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
*-commutative46.2%
distribute-rgt-neg-in46.2%
mul-1-neg46.2%
associate-*r/46.2%
mul-1-neg46.2%
Simplified46.2%
Taylor expanded in t around 0 45.3%
mul-1-neg45.3%
associate-/l*45.3%
distribute-rgt-neg-in45.3%
Simplified45.3%
cos-atan44.6%
hypot-1-def44.7%
distribute-neg-frac244.7%
Applied egg-rr44.7%
distribute-frac-neg244.7%
distribute-neg-frac44.7%
Simplified44.7%
*-un-lft-identity44.7%
un-div-inv44.7%
distribute-frac-neg44.7%
Applied egg-rr44.7%
*-lft-identity44.7%
fabs-div44.7%
rem-square-sqrt44.7%
fabs-sqr44.7%
rem-square-sqrt44.7%
hypot-undefine44.6%
distribute-rgt-neg-out44.6%
distribute-rgt-neg-out44.6%
sqr-neg44.6%
hypot-undefine44.7%
*-commutative44.7%
associate-*l/44.5%
associate-/l*44.6%
Simplified44.6%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (/ 1.0 (* t (/ eh ew))))))
double code(double eh, double ew, double t) {
return fabs((ew * (1.0 / (t * (eh / ew)))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((ew * (1.0d0 / (t * (eh / ew)))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew * (1.0 / (t * (eh / ew)))));
}
def code(eh, ew, t): return math.fabs((ew * (1.0 / (t * (eh / ew)))))
function code(eh, ew, t) return abs(Float64(ew * Float64(1.0 / Float64(t * Float64(eh / ew))))) end
function tmp = code(eh, ew, t) tmp = abs((ew * (1.0 / (t * (eh / ew))))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(1.0 / N[(t * N[(eh / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \frac{1}{t \cdot \frac{eh}{ew}}\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
*-commutative46.2%
distribute-rgt-neg-in46.2%
mul-1-neg46.2%
associate-*r/46.2%
mul-1-neg46.2%
Simplified46.2%
Taylor expanded in t around 0 45.3%
mul-1-neg45.3%
associate-/l*45.3%
distribute-rgt-neg-in45.3%
Simplified45.3%
cos-atan44.6%
hypot-1-def44.7%
distribute-neg-frac244.7%
Applied egg-rr44.7%
distribute-frac-neg244.7%
distribute-neg-frac44.7%
Simplified44.7%
Taylor expanded in eh around inf 5.1%
*-commutative5.1%
associate-/l*5.2%
Simplified5.2%
(FPCore (eh ew t) :precision binary64 (fabs (* ew (/ ew (* t eh)))))
double code(double eh, double ew, double t) {
return fabs((ew * (ew / (t * eh))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((ew * (ew / (t * eh))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((ew * (ew / (t * eh))));
}
def code(eh, ew, t): return math.fabs((ew * (ew / (t * eh))))
function code(eh, ew, t) return abs(Float64(ew * Float64(ew / Float64(t * eh)))) end
function tmp = code(eh, ew, t) tmp = abs((ew * (ew / (t * eh)))); end
code[eh_, ew_, t_] := N[Abs[N[(ew * N[(ew / N[(t * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \frac{ew}{t \cdot eh}\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
*-commutative46.2%
distribute-rgt-neg-in46.2%
mul-1-neg46.2%
associate-*r/46.2%
mul-1-neg46.2%
Simplified46.2%
Taylor expanded in t around 0 45.3%
mul-1-neg45.3%
associate-/l*45.3%
distribute-rgt-neg-in45.3%
Simplified45.3%
cos-atan44.6%
hypot-1-def44.7%
distribute-neg-frac244.7%
Applied egg-rr44.7%
distribute-frac-neg244.7%
distribute-neg-frac44.7%
Simplified44.7%
Taylor expanded in eh around inf 5.1%
*-commutative5.1%
Simplified5.1%
herbie shell --seed 2024177
(FPCore (eh ew t)
:name "Example 2 from Robby"
:precision binary64
(fabs (- (* (* ew (cos t)) (cos (atan (/ (* (- eh) (tan t)) ew)))) (* (* eh (sin t)) (sin (atan (/ (* (- eh) (tan t)) ew)))))))