
(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 13 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 (fabs (- (* ew (* (cos t) (cos (atan (/ 1.0 (/ ew (* (tan t) eh))))))) (* (sin t) (* eh (sin (atan (* (tan t) (/ eh (- ew))))))))))
double code(double eh, double ew, double t) {
return fabs(((ew * (cos(t) * cos(atan((1.0 / (ew / (tan(t) * eh))))))) - (sin(t) * (eh * sin(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(t) * cos(atan((1.0d0 / (ew / (tan(t) * eh))))))) - (sin(t) * (eh * sin(atan((tan(t) * (eh / -ew))))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((ew * (Math.cos(t) * Math.cos(Math.atan((1.0 / (ew / (Math.tan(t) * eh))))))) - (Math.sin(t) * (eh * Math.sin(Math.atan((Math.tan(t) * (eh / -ew))))))));
}
def code(eh, ew, t): return math.fabs(((ew * (math.cos(t) * math.cos(math.atan((1.0 / (ew / (math.tan(t) * eh))))))) - (math.sin(t) * (eh * math.sin(math.atan((math.tan(t) * (eh / -ew))))))))
function code(eh, ew, t) return abs(Float64(Float64(ew * Float64(cos(t) * cos(atan(Float64(1.0 / Float64(ew / Float64(tan(t) * eh))))))) - Float64(sin(t) * Float64(eh * sin(atan(Float64(tan(t) * Float64(eh / Float64(-ew))))))))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * (cos(t) * cos(atan((1.0 / (ew / (tan(t) * eh))))))) - (sin(t) * (eh * sin(atan((tan(t) * (eh / -ew)))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[(1.0 / N[(ew / N[(N[Tan[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{1}{\frac{ew}{\tan t \cdot eh}}\right)\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right)\right|
\end{array}
Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
associate-*r/99.8%
clear-num99.9%
add-sqr-sqrt51.5%
sqrt-unprod93.5%
sqr-neg93.5%
sqrt-unprod48.4%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (* (tan t) (/ eh (- ew)))))) (fabs (- (* ew (* (cos t) (cos t_1))) (* (sin t) (* eh (sin t_1)))))))
double code(double eh, double ew, double t) {
double t_1 = atan((tan(t) * (eh / -ew)));
return fabs(((ew * (cos(t) * cos(t_1))) - (sin(t) * (eh * 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((tan(t) * (eh / -ew)))
code = abs(((ew * (cos(t) * cos(t_1))) - (sin(t) * (eh * sin(t_1)))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan((Math.tan(t) * (eh / -ew)));
return Math.abs(((ew * (Math.cos(t) * Math.cos(t_1))) - (Math.sin(t) * (eh * Math.sin(t_1)))));
}
def code(eh, ew, t): t_1 = math.atan((math.tan(t) * (eh / -ew))) return math.fabs(((ew * (math.cos(t) * math.cos(t_1))) - (math.sin(t) * (eh * math.sin(t_1)))))
function code(eh, ew, t) t_1 = atan(Float64(tan(t) * Float64(eh / Float64(-ew)))) return abs(Float64(Float64(ew * Float64(cos(t) * cos(t_1))) - Float64(sin(t) * Float64(eh * sin(t_1))))) end
function tmp = code(eh, ew, t) t_1 = atan((tan(t) * (eh / -ew))); tmp = abs(((ew * (cos(t) * cos(t_1))) - (sin(t) * (eh * sin(t_1))))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\\
\left|ew \cdot \left(\cos t \cdot \cos t\_1\right) - \sin t \cdot \left(eh \cdot \sin t\_1\right)\right|
\end{array}
\end{array}
Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (- (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew)))))) (* (sin t) (* eh (sin (atan (* (tan t) (/ eh (- ew))))))))))
double code(double eh, double ew, double t) {
return fabs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (sin(t) * (eh * sin(atan((tan(t) * (eh / -ew))))))));
}
public static double code(double eh, double ew, double t) {
return Math.abs(((ew * (Math.cos(t) * (1.0 / Math.hypot(1.0, (Math.tan(t) * (eh / ew)))))) - (Math.sin(t) * (eh * Math.sin(Math.atan((Math.tan(t) * (eh / -ew))))))));
}
def code(eh, ew, t): return math.fabs(((ew * (math.cos(t) * (1.0 / math.hypot(1.0, (math.tan(t) * (eh / ew)))))) - (math.sin(t) * (eh * math.sin(math.atan((math.tan(t) * (eh / -ew))))))))
function code(eh, ew, t) return abs(Float64(Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))))) - Float64(sin(t) * Float64(eh * sin(atan(Float64(tan(t) * Float64(eh / Float64(-ew))))))))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (sin(t) * (eh * sin(atan((tan(t) * (eh / -ew)))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right)\right|
\end{array}
Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
cos-atan99.0%
hypot-1-def99.0%
div-inv99.0%
div-inv99.0%
add-sqr-sqrt51.5%
sqrt-unprod93.1%
sqr-neg93.1%
sqrt-unprod47.6%
add-sqr-sqrt99.0%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (- (* ew (* (cos t) (cos (atan (* (tan t) (/ eh (- ew))))))) (* (sin t) (* eh (sin (atan (/ (- eh) (/ ew t)))))))))
double code(double eh, double ew, double t) {
return fabs(((ew * (cos(t) * cos(atan((tan(t) * (eh / -ew)))))) - (sin(t) * (eh * sin(atan((-eh / (ew / t))))))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs(((ew * (cos(t) * cos(atan((tan(t) * (eh / -ew)))))) - (sin(t) * (eh * sin(atan((-eh / (ew / t))))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((ew * (Math.cos(t) * Math.cos(Math.atan((Math.tan(t) * (eh / -ew)))))) - (Math.sin(t) * (eh * Math.sin(Math.atan((-eh / (ew / t))))))));
}
def code(eh, ew, t): return math.fabs(((ew * (math.cos(t) * math.cos(math.atan((math.tan(t) * (eh / -ew)))))) - (math.sin(t) * (eh * math.sin(math.atan((-eh / (ew / t))))))))
function code(eh, ew, t) return abs(Float64(Float64(ew * Float64(cos(t) * cos(atan(Float64(tan(t) * Float64(eh / Float64(-ew))))))) - Float64(sin(t) * Float64(eh * sin(atan(Float64(Float64(-eh) / Float64(ew / t)))))))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * (cos(t) * cos(atan((tan(t) * (eh / -ew)))))) - (sin(t) * (eh * sin(atan((-eh / (ew / t)))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[N[ArcTan[N[((-eh) / N[(ew / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{t}}\right)\right)\right|
\end{array}
Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 99.0%
mul-1-neg99.0%
associate-/l*99.0%
distribute-neg-frac99.0%
Simplified99.0%
Final simplification99.0%
(FPCore (eh ew t) :precision binary64 (fabs (- (* ew (* (cos t) (/ 1.0 (hypot 1.0 (* (tan t) (/ eh ew)))))) (* (sin t) (* eh (sin (atan (/ (- eh) (/ ew t)))))))))
double code(double eh, double ew, double t) {
return fabs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (sin(t) * (eh * sin(atan((-eh / (ew / t))))))));
}
public static double code(double eh, double ew, double t) {
return Math.abs(((ew * (Math.cos(t) * (1.0 / Math.hypot(1.0, (Math.tan(t) * (eh / ew)))))) - (Math.sin(t) * (eh * Math.sin(Math.atan((-eh / (ew / t))))))));
}
def code(eh, ew, t): return math.fabs(((ew * (math.cos(t) * (1.0 / math.hypot(1.0, (math.tan(t) * (eh / ew)))))) - (math.sin(t) * (eh * math.sin(math.atan((-eh / (ew / t))))))))
function code(eh, ew, t) return abs(Float64(Float64(ew * Float64(cos(t) * Float64(1.0 / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))))) - Float64(sin(t) * Float64(eh * sin(atan(Float64(Float64(-eh) / Float64(ew / t)))))))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * (cos(t) * (1.0 / hypot(1.0, (tan(t) * (eh / ew)))))) - (sin(t) * (eh * sin(atan((-eh / (ew / t)))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[N[ArcTan[N[((-eh) / N[(ew / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \frac{1}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right) - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\frac{-eh}{\frac{ew}{t}}\right)\right)\right|
\end{array}
Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 99.0%
mul-1-neg99.0%
associate-/l*99.0%
distribute-neg-frac99.0%
Simplified99.0%
cos-atan99.0%
hypot-1-def99.0%
div-inv99.0%
div-inv99.0%
add-sqr-sqrt51.5%
sqrt-unprod93.1%
sqr-neg93.1%
sqrt-unprod47.6%
add-sqr-sqrt99.0%
Applied egg-rr99.0%
Final simplification99.0%
(FPCore (eh ew t) :precision binary64 (fabs (- (* ew (cos t)) (* (sin t) (* eh (sin (atan (* (tan t) (/ eh (- ew))))))))))
double code(double eh, double ew, double t) {
return fabs(((ew * cos(t)) - (sin(t) * (eh * sin(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(t)) - (sin(t) * (eh * sin(atan((tan(t) * (eh / -ew))))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((ew * Math.cos(t)) - (Math.sin(t) * (eh * Math.sin(Math.atan((Math.tan(t) * (eh / -ew))))))));
}
def code(eh, ew, t): return math.fabs(((ew * math.cos(t)) - (math.sin(t) * (eh * math.sin(math.atan((math.tan(t) * (eh / -ew))))))))
function code(eh, ew, t) return abs(Float64(Float64(ew * cos(t)) - Float64(sin(t) * Float64(eh * sin(atan(Float64(tan(t) * Float64(eh / Float64(-ew))))))))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * cos(t)) - (sin(t) * (eh * sin(atan((tan(t) * (eh / -ew)))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t], $MachinePrecision] * N[(eh * N[Sin[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[(eh / (-ew)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \cos t - \sin t \cdot \left(eh \cdot \sin \tan^{-1} \left(\tan t \cdot \frac{eh}{-ew}\right)\right)\right|
\end{array}
Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
cos-atan99.0%
hypot-1-def99.0%
div-inv99.0%
div-inv99.0%
add-sqr-sqrt51.5%
sqrt-unprod93.1%
sqr-neg93.1%
sqrt-unprod47.6%
add-sqr-sqrt99.0%
Applied egg-rr99.8%
Taylor expanded in t around 0 98.3%
Taylor expanded in ew around 0 98.3%
Final simplification98.3%
(FPCore (eh ew t) :precision binary64 (if (or (<= ew -6.5e+120) (not (<= ew 8.5e+81))) (fabs (- (* ew (cos t)) (* eh (* t (sin (atan (* t (/ (- eh) ew)))))))) (fabs (- (fabs (/ ew (hypot 1.0 (* (tan t) (/ eh ew))))) (* eh (sin t))))))
double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -6.5e+120) || !(ew <= 8.5e+81)) {
tmp = fabs(((ew * cos(t)) - (eh * (t * sin(atan((t * (-eh / ew))))))));
} else {
tmp = fabs((fabs((ew / hypot(1.0, (tan(t) * (eh / ew))))) - (eh * sin(t))));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -6.5e+120) || !(ew <= 8.5e+81)) {
tmp = Math.abs(((ew * Math.cos(t)) - (eh * (t * Math.sin(Math.atan((t * (-eh / ew))))))));
} else {
tmp = Math.abs((Math.abs((ew / Math.hypot(1.0, (Math.tan(t) * (eh / ew))))) - (eh * Math.sin(t))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (ew <= -6.5e+120) or not (ew <= 8.5e+81): tmp = math.fabs(((ew * math.cos(t)) - (eh * (t * math.sin(math.atan((t * (-eh / ew)))))))) else: tmp = math.fabs((math.fabs((ew / math.hypot(1.0, (math.tan(t) * (eh / ew))))) - (eh * math.sin(t)))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((ew <= -6.5e+120) || !(ew <= 8.5e+81)) tmp = abs(Float64(Float64(ew * cos(t)) - Float64(eh * Float64(t * sin(atan(Float64(t * Float64(Float64(-eh) / ew)))))))); else tmp = abs(Float64(abs(Float64(ew / hypot(1.0, Float64(tan(t) * Float64(eh / ew))))) - Float64(eh * sin(t)))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((ew <= -6.5e+120) || ~((ew <= 8.5e+81))) tmp = abs(((ew * cos(t)) - (eh * (t * sin(atan((t * (-eh / ew)))))))); else tmp = abs((abs((ew / hypot(1.0, (tan(t) * (eh / ew))))) - (eh * sin(t)))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -6.5e+120], N[Not[LessEqual[ew, 8.5e+81]], $MachinePrecision]], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] - N[(eh * N[(t * N[Sin[N[ArcTan[N[(t * N[((-eh) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Abs[N[(ew / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -6.5 \cdot 10^{+120} \lor \neg \left(ew \leq 8.5 \cdot 10^{+81}\right):\\
\;\;\;\;\left|ew \cdot \cos t - eh \cdot \left(t \cdot \sin \tan^{-1} \left(t \cdot \frac{-eh}{ew}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\left|\frac{ew}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right| - eh \cdot \sin t\right|\\
\end{array}
\end{array}
if ew < -6.4999999999999997e120 or 8.49999999999999986e81 < ew Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
mul-1-neg99.8%
associate-/l*99.8%
distribute-neg-frac99.8%
Simplified99.8%
cos-atan99.9%
hypot-1-def99.9%
div-inv99.9%
div-inv99.9%
add-sqr-sqrt50.6%
sqrt-unprod99.4%
sqr-neg99.4%
sqrt-unprod49.3%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 91.7%
mul-1-neg91.7%
associate-*l/91.7%
distribute-rgt-neg-in91.7%
Simplified91.7%
Taylor expanded in t around 0 91.4%
if -6.4999999999999997e120 < ew < 8.49999999999999986e81Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
*-commutative99.8%
sin-atan72.1%
associate-*l/70.8%
div-inv70.7%
div-inv70.8%
add-sqr-sqrt37.4%
sqrt-unprod52.8%
sqr-neg52.8%
sqrt-unprod32.0%
add-sqr-sqrt69.2%
hypot-1-def75.5%
div-inv75.4%
div-inv75.5%
add-sqr-sqrt40.6%
sqrt-unprod63.4%
Applied egg-rr75.5%
Taylor expanded in eh around inf 97.8%
Taylor expanded in t around 0 83.7%
associate-*r/83.7%
*-commutative83.7%
neg-mul-183.7%
distribute-lft-neg-in83.7%
associate-*r/83.7%
Simplified83.7%
add-sqr-sqrt40.8%
sqrt-unprod77.7%
pow277.7%
Applied egg-rr77.7%
unpow277.7%
rem-sqrt-square83.7%
associate-/l*83.7%
*-commutative83.7%
associate-*l/83.7%
*-commutative83.7%
Simplified83.7%
Final simplification86.1%
(FPCore (eh ew t) :precision binary64 (fabs (- (* ew (* (cos t) (cos (atan (/ (- eh) (/ ew t)))))) (* eh (sin t)))))
double code(double eh, double ew, double t) {
return fabs(((ew * (cos(t) * cos(atan((-eh / (ew / t)))))) - (eh * 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(((ew * (cos(t) * cos(atan((-eh / (ew / t)))))) - (eh * sin(t))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((ew * (Math.cos(t) * Math.cos(Math.atan((-eh / (ew / t)))))) - (eh * Math.sin(t))));
}
def code(eh, ew, t): return math.fabs(((ew * (math.cos(t) * math.cos(math.atan((-eh / (ew / t)))))) - (eh * math.sin(t))))
function code(eh, ew, t) return abs(Float64(Float64(ew * Float64(cos(t) * cos(atan(Float64(Float64(-eh) / Float64(ew / t)))))) - Float64(eh * sin(t)))) end
function tmp = code(eh, ew, t) tmp = abs(((ew * (cos(t) * cos(atan((-eh / (ew / t)))))) - (eh * sin(t)))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew * N[(N[Cos[t], $MachinePrecision] * N[Cos[N[ArcTan[N[((-eh) / N[(ew / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|ew \cdot \left(\cos t \cdot \cos \tan^{-1} \left(\frac{-eh}{\frac{ew}{t}}\right)\right) - eh \cdot \sin t\right|
\end{array}
Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
*-commutative99.8%
sin-atan80.7%
associate-*l/79.4%
div-inv79.3%
div-inv79.4%
add-sqr-sqrt41.4%
sqrt-unprod65.8%
sqr-neg65.8%
sqrt-unprod36.9%
add-sqr-sqrt78.3%
hypot-1-def82.6%
div-inv82.5%
div-inv82.6%
add-sqr-sqrt43.7%
sqrt-unprod73.2%
Applied egg-rr82.6%
Taylor expanded in eh around inf 98.1%
Taylor expanded in t around 0 87.3%
mul-1-neg99.0%
associate-/l*99.0%
distribute-neg-frac99.0%
Simplified87.3%
Final simplification87.3%
(FPCore (eh ew t) :precision binary64 (fabs (- (/ (* ew (cos t)) (hypot 1.0 (* (tan t) (/ eh ew)))) (* eh (sin t)))))
double code(double eh, double ew, double t) {
return fabs((((ew * cos(t)) / hypot(1.0, (tan(t) * (eh / ew)))) - (eh * sin(t))));
}
public static double code(double eh, double ew, double t) {
return Math.abs((((ew * Math.cos(t)) / Math.hypot(1.0, (Math.tan(t) * (eh / ew)))) - (eh * Math.sin(t))));
}
def code(eh, ew, t): return math.fabs((((ew * math.cos(t)) / math.hypot(1.0, (math.tan(t) * (eh / ew)))) - (eh * math.sin(t))))
function code(eh, ew, t) return abs(Float64(Float64(Float64(ew * cos(t)) / hypot(1.0, Float64(tan(t) * Float64(eh / ew)))) - Float64(eh * sin(t)))) end
function tmp = code(eh, ew, t) tmp = abs((((ew * cos(t)) / hypot(1.0, (tan(t) * (eh / ew)))) - (eh * sin(t)))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] - N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)} - eh \cdot \sin t\right|
\end{array}
Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
*-commutative99.8%
sin-atan80.7%
associate-*l/79.4%
div-inv79.3%
div-inv79.4%
add-sqr-sqrt41.4%
sqrt-unprod65.8%
sqr-neg65.8%
sqrt-unprod36.9%
add-sqr-sqrt78.3%
hypot-1-def82.6%
div-inv82.5%
div-inv82.6%
add-sqr-sqrt43.7%
sqrt-unprod73.2%
Applied egg-rr82.6%
Taylor expanded in eh around inf 98.1%
expm1-log1p-u69.8%
expm1-udef49.7%
Applied egg-rr50.5%
expm1-def70.6%
expm1-log1p98.1%
associate-*r/98.1%
Simplified98.1%
Final simplification98.1%
(FPCore (eh ew t) :precision binary64 (if (or (<= ew -1.15e+121) (not (<= ew 1.55e+82))) (fabs (- (* ew (cos t)) (* eh (* t (sin (atan (* t (/ (- eh) ew)))))))) (fabs (- (/ ew (hypot 1.0 (/ (tan t) (/ ew eh)))) (* eh (sin t))))))
double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -1.15e+121) || !(ew <= 1.55e+82)) {
tmp = fabs(((ew * cos(t)) - (eh * (t * sin(atan((t * (-eh / ew))))))));
} else {
tmp = fabs(((ew / hypot(1.0, (tan(t) / (ew / eh)))) - (eh * sin(t))));
}
return tmp;
}
public static double code(double eh, double ew, double t) {
double tmp;
if ((ew <= -1.15e+121) || !(ew <= 1.55e+82)) {
tmp = Math.abs(((ew * Math.cos(t)) - (eh * (t * Math.sin(Math.atan((t * (-eh / ew))))))));
} else {
tmp = Math.abs(((ew / Math.hypot(1.0, (Math.tan(t) / (ew / eh)))) - (eh * Math.sin(t))));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (ew <= -1.15e+121) or not (ew <= 1.55e+82): tmp = math.fabs(((ew * math.cos(t)) - (eh * (t * math.sin(math.atan((t * (-eh / ew)))))))) else: tmp = math.fabs(((ew / math.hypot(1.0, (math.tan(t) / (ew / eh)))) - (eh * math.sin(t)))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((ew <= -1.15e+121) || !(ew <= 1.55e+82)) tmp = abs(Float64(Float64(ew * cos(t)) - Float64(eh * Float64(t * sin(atan(Float64(t * Float64(Float64(-eh) / ew)))))))); else tmp = abs(Float64(Float64(ew / hypot(1.0, Float64(tan(t) / Float64(ew / eh)))) - Float64(eh * sin(t)))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((ew <= -1.15e+121) || ~((ew <= 1.55e+82))) tmp = abs(((ew * cos(t)) - (eh * (t * sin(atan((t * (-eh / ew)))))))); else tmp = abs(((ew / hypot(1.0, (tan(t) / (ew / eh)))) - (eh * sin(t)))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[ew, -1.15e+121], N[Not[LessEqual[ew, 1.55e+82]], $MachinePrecision]], N[Abs[N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] - N[(eh * N[(t * N[Sin[N[ArcTan[N[(t * N[((-eh) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] / N[(ew / eh), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] - N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq -1.15 \cdot 10^{+121} \lor \neg \left(ew \leq 1.55 \cdot 10^{+82}\right):\\
\;\;\;\;\left|ew \cdot \cos t - eh \cdot \left(t \cdot \sin \tan^{-1} \left(t \cdot \frac{-eh}{ew}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{ew}{\mathsf{hypot}\left(1, \frac{\tan t}{\frac{ew}{eh}}\right)} - eh \cdot \sin t\right|\\
\end{array}
\end{array}
if ew < -1.1499999999999999e121 or 1.55000000000000016e82 < ew Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
mul-1-neg99.8%
associate-/l*99.8%
distribute-neg-frac99.8%
Simplified99.8%
cos-atan99.9%
hypot-1-def99.9%
div-inv99.9%
div-inv99.9%
add-sqr-sqrt50.6%
sqrt-unprod99.4%
sqr-neg99.4%
sqrt-unprod49.3%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 91.7%
mul-1-neg91.7%
associate-*l/91.7%
distribute-rgt-neg-in91.7%
Simplified91.7%
Taylor expanded in t around 0 91.4%
if -1.1499999999999999e121 < ew < 1.55000000000000016e82Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
*-commutative99.8%
sin-atan72.1%
associate-*l/70.8%
div-inv70.7%
div-inv70.8%
add-sqr-sqrt37.4%
sqrt-unprod52.8%
sqr-neg52.8%
sqrt-unprod32.0%
add-sqr-sqrt69.2%
hypot-1-def75.5%
div-inv75.4%
div-inv75.5%
add-sqr-sqrt40.6%
sqrt-unprod63.4%
Applied egg-rr75.5%
Taylor expanded in eh around inf 97.8%
Taylor expanded in t around 0 83.7%
associate-*r/83.7%
*-commutative83.7%
neg-mul-183.7%
distribute-lft-neg-in83.7%
associate-*r/83.7%
Simplified83.7%
cos-atan83.7%
un-div-inv83.7%
hypot-1-def83.7%
clear-num83.7%
add-sqr-sqrt45.7%
sqrt-unprod79.6%
sqr-neg79.6%
sqrt-unprod38.0%
add-sqr-sqrt83.7%
un-div-inv83.7%
Applied egg-rr83.7%
Final simplification86.1%
(FPCore (eh ew t) :precision binary64 (if (or (<= t -2.4e-8) (not (<= t 0.00052))) (fabs (- (/ 0.0 (/ 2.0 ew)) (* eh (sin t)))) (fabs (- (* ew (cos (atan (* (tan t) (/ (- eh) ew))))) (* t eh)))))
double code(double eh, double ew, double t) {
double tmp;
if ((t <= -2.4e-8) || !(t <= 0.00052)) {
tmp = fabs(((0.0 / (2.0 / ew)) - (eh * sin(t))));
} else {
tmp = fabs(((ew * cos(atan((tan(t) * (-eh / ew))))) - (t * eh)));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-2.4d-8)) .or. (.not. (t <= 0.00052d0))) then
tmp = abs(((0.0d0 / (2.0d0 / ew)) - (eh * sin(t))))
else
tmp = abs(((ew * cos(atan((tan(t) * (-eh / ew))))) - (t * eh)))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((t <= -2.4e-8) || !(t <= 0.00052)) {
tmp = Math.abs(((0.0 / (2.0 / ew)) - (eh * Math.sin(t))));
} else {
tmp = Math.abs(((ew * Math.cos(Math.atan((Math.tan(t) * (-eh / ew))))) - (t * eh)));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (t <= -2.4e-8) or not (t <= 0.00052): tmp = math.fabs(((0.0 / (2.0 / ew)) - (eh * math.sin(t)))) else: tmp = math.fabs(((ew * math.cos(math.atan((math.tan(t) * (-eh / ew))))) - (t * eh))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((t <= -2.4e-8) || !(t <= 0.00052)) tmp = abs(Float64(Float64(0.0 / Float64(2.0 / ew)) - Float64(eh * sin(t)))); else tmp = abs(Float64(Float64(ew * cos(atan(Float64(tan(t) * Float64(Float64(-eh) / ew))))) - Float64(t * eh))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((t <= -2.4e-8) || ~((t <= 0.00052))) tmp = abs(((0.0 / (2.0 / ew)) - (eh * sin(t)))); else tmp = abs(((ew * cos(atan((tan(t) * (-eh / ew))))) - (t * eh))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -2.4e-8], N[Not[LessEqual[t, 0.00052]], $MachinePrecision]], N[Abs[N[(N[(0.0 / N[(2.0 / ew), $MachinePrecision]), $MachinePrecision] - N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(ew * N[Cos[N[ArcTan[N[(N[Tan[t], $MachinePrecision] * N[((-eh) / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t * eh), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-8} \lor \neg \left(t \leq 0.00052\right):\\
\;\;\;\;\left|\frac{0}{\frac{2}{ew}} - eh \cdot \sin t\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \cos \tan^{-1} \left(\tan t \cdot \frac{-eh}{ew}\right) - t \cdot eh\right|\\
\end{array}
\end{array}
if t < -2.39999999999999998e-8 or 5.19999999999999954e-4 < t Initial program 99.7%
associate-*l*99.7%
Simplified99.7%
*-commutative99.7%
sin-atan68.7%
associate-*l/67.7%
div-inv67.6%
div-inv67.7%
add-sqr-sqrt38.3%
sqrt-unprod55.2%
sqr-neg55.2%
sqrt-unprod27.9%
add-sqr-sqrt66.2%
hypot-1-def75.2%
div-inv75.1%
div-inv75.2%
add-sqr-sqrt43.2%
sqrt-unprod61.6%
Applied egg-rr75.2%
Taylor expanded in eh around inf 98.0%
cos-mult97.6%
associate-*r/97.6%
Applied egg-rr97.6%
*-commutative97.6%
associate-/l*97.5%
Simplified97.5%
Applied egg-rr0.0%
+-inverses52.7%
Simplified52.7%
if -2.39999999999999998e-8 < t < 5.19999999999999954e-4Initial program 100.0%
associate-*l*100.0%
Simplified100.0%
*-commutative100.0%
sin-atan91.7%
associate-*l/90.2%
div-inv90.2%
div-inv90.2%
add-sqr-sqrt44.3%
sqrt-unprod75.7%
sqr-neg75.7%
sqrt-unprod45.3%
add-sqr-sqrt89.4%
hypot-1-def89.4%
div-inv89.3%
div-inv89.4%
add-sqr-sqrt44.1%
sqrt-unprod83.9%
Applied egg-rr89.4%
Taylor expanded in eh around inf 98.2%
Taylor expanded in t around 0 98.2%
associate-*r/98.2%
*-commutative98.2%
neg-mul-198.2%
distribute-lft-neg-in98.2%
associate-*r/98.2%
Simplified98.2%
Taylor expanded in t around 0 98.2%
Final simplification76.4%
(FPCore (eh ew t) :precision binary64 (fabs (- (/ ew (hypot 1.0 (/ (tan t) (/ ew eh)))) (* eh (sin t)))))
double code(double eh, double ew, double t) {
return fabs(((ew / hypot(1.0, (tan(t) / (ew / eh)))) - (eh * sin(t))));
}
public static double code(double eh, double ew, double t) {
return Math.abs(((ew / Math.hypot(1.0, (Math.tan(t) / (ew / eh)))) - (eh * Math.sin(t))));
}
def code(eh, ew, t): return math.fabs(((ew / math.hypot(1.0, (math.tan(t) / (ew / eh)))) - (eh * math.sin(t))))
function code(eh, ew, t) return abs(Float64(Float64(ew / hypot(1.0, Float64(tan(t) / Float64(ew / eh)))) - Float64(eh * sin(t)))) end
function tmp = code(eh, ew, t) tmp = abs(((ew / hypot(1.0, (tan(t) / (ew / eh)))) - (eh * sin(t)))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(ew / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] / N[(ew / eh), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] - N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{ew}{\mathsf{hypot}\left(1, \frac{\tan t}{\frac{ew}{eh}}\right)} - eh \cdot \sin t\right|
\end{array}
Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
*-commutative99.8%
sin-atan80.7%
associate-*l/79.4%
div-inv79.3%
div-inv79.4%
add-sqr-sqrt41.4%
sqrt-unprod65.8%
sqr-neg65.8%
sqrt-unprod36.9%
add-sqr-sqrt78.3%
hypot-1-def82.6%
div-inv82.5%
div-inv82.6%
add-sqr-sqrt43.7%
sqrt-unprod73.2%
Applied egg-rr82.6%
Taylor expanded in eh around inf 98.1%
Taylor expanded in t around 0 80.1%
associate-*r/80.1%
*-commutative80.1%
neg-mul-180.1%
distribute-lft-neg-in80.1%
associate-*r/80.1%
Simplified80.1%
cos-atan80.1%
un-div-inv80.1%
hypot-1-def80.1%
clear-num80.1%
add-sqr-sqrt43.6%
sqrt-unprod77.2%
sqr-neg77.2%
sqrt-unprod36.5%
add-sqr-sqrt80.1%
un-div-inv80.1%
Applied egg-rr80.1%
Final simplification80.1%
(FPCore (eh ew t) :precision binary64 (fabs (- (/ 0.0 (/ 2.0 ew)) (* eh (sin t)))))
double code(double eh, double ew, double t) {
return fabs(((0.0 / (2.0 / ew)) - (eh * 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(((0.0d0 / (2.0d0 / ew)) - (eh * sin(t))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((0.0 / (2.0 / ew)) - (eh * Math.sin(t))));
}
def code(eh, ew, t): return math.fabs(((0.0 / (2.0 / ew)) - (eh * math.sin(t))))
function code(eh, ew, t) return abs(Float64(Float64(0.0 / Float64(2.0 / ew)) - Float64(eh * sin(t)))) end
function tmp = code(eh, ew, t) tmp = abs(((0.0 / (2.0 / ew)) - (eh * sin(t)))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(0.0 / N[(2.0 / ew), $MachinePrecision]), $MachinePrecision] - N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{0}{\frac{2}{ew}} - eh \cdot \sin t\right|
\end{array}
Initial program 99.8%
associate-*l*99.8%
Simplified99.8%
*-commutative99.8%
sin-atan80.7%
associate-*l/79.4%
div-inv79.3%
div-inv79.4%
add-sqr-sqrt41.4%
sqrt-unprod65.8%
sqr-neg65.8%
sqrt-unprod36.9%
add-sqr-sqrt78.3%
hypot-1-def82.6%
div-inv82.5%
div-inv82.6%
add-sqr-sqrt43.7%
sqrt-unprod73.2%
Applied egg-rr82.6%
Taylor expanded in eh around inf 98.1%
cos-mult97.9%
associate-*r/97.9%
Applied egg-rr97.9%
*-commutative97.9%
associate-/l*97.7%
Simplified97.7%
Applied egg-rr0.0%
+-inverses38.4%
Simplified38.4%
Final simplification38.4%
herbie shell --seed 2024040
(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)))))))