
(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 7 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 (atan (/ (* (tan t) eh) (- ew))))) (fabs (- (* (sin t_1) (* (sin t) eh)) (* (* (cos t) ew) (cos t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((tan(t) * eh) / -ew));
return fabs(((sin(t_1) * (sin(t) * eh)) - ((cos(t) * ew) * cos(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(((sin(t_1) * (sin(t) * eh)) - ((cos(t) * ew) * cos(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(((Math.sin(t_1) * (Math.sin(t) * eh)) - ((Math.cos(t) * ew) * Math.cos(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((math.tan(t) * eh) / -ew)) return math.fabs(((math.sin(t_1) * (math.sin(t) * eh)) - ((math.cos(t) * ew) * math.cos(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(tan(t) * eh) / Float64(-ew))) return abs(Float64(Float64(sin(t_1) * Float64(sin(t) * eh)) - Float64(Float64(cos(t) * ew) * cos(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((tan(t) * eh) / -ew)); tmp = abs(((sin(t_1) * (sin(t) * eh)) - ((cos(t) * ew) * cos(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] * eh), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[Sin[t$95$1], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision] - N[(N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right)\\
\left|\sin t\_1 \cdot \left(\sin t \cdot eh\right) - \left(\cos t \cdot ew\right) \cdot \cos t\_1\right|
\end{array}
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (- (* (sin (atan (/ (* (- eh) t) ew))) (* (sin t) eh)) (* (* (cos t) ew) (cos (atan (/ (* (tan t) eh) (- ew))))))))
double code(double eh, double ew, double t) {
return fabs(((sin(atan(((-eh * t) / ew))) * (sin(t) * eh)) - ((cos(t) * 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(((sin(atan(((-eh * t) / ew))) * (sin(t) * eh)) - ((cos(t) * ew) * cos(atan(((tan(t) * eh) / -ew))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((Math.sin(Math.atan(((-eh * t) / ew))) * (Math.sin(t) * eh)) - ((Math.cos(t) * ew) * Math.cos(Math.atan(((Math.tan(t) * eh) / -ew))))));
}
def code(eh, ew, t): return math.fabs(((math.sin(math.atan(((-eh * t) / ew))) * (math.sin(t) * eh)) - ((math.cos(t) * ew) * math.cos(math.atan(((math.tan(t) * eh) / -ew))))))
function code(eh, ew, t) return abs(Float64(Float64(sin(atan(Float64(Float64(Float64(-eh) * t) / ew))) * Float64(sin(t) * eh)) - Float64(Float64(cos(t) * ew) * cos(atan(Float64(Float64(tan(t) * eh) / Float64(-ew))))))) end
function tmp = code(eh, ew, t) tmp = abs(((sin(atan(((-eh * t) / ew))) * (sin(t) * eh)) - ((cos(t) * ew) * cos(atan(((tan(t) * eh) / -ew)))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[Sin[N[ArcTan[N[(N[((-eh) * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision] - N[(N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] * eh), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot t}{ew}\right) \cdot \left(\sin t \cdot eh\right) - \left(\cos t \cdot ew\right) \cdot \cos \tan^{-1} \left(\frac{\tan t \cdot eh}{-ew}\right)\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6499.1
Applied rewrites99.1%
Final simplification99.1%
(FPCore (eh ew t) :precision binary64 (fabs (- (* (sin (atan (/ (* (- eh) t) ew))) (* (sin t) eh)) (* (sqrt (fma (cos (* 2.0 t)) 0.5 0.5)) ew))))
double code(double eh, double ew, double t) {
return fabs(((sin(atan(((-eh * t) / ew))) * (sin(t) * eh)) - (sqrt(fma(cos((2.0 * t)), 0.5, 0.5)) * ew)));
}
function code(eh, ew, t) return abs(Float64(Float64(sin(atan(Float64(Float64(Float64(-eh) * t) / ew))) * Float64(sin(t) * eh)) - Float64(sqrt(fma(cos(Float64(2.0 * t)), 0.5, 0.5)) * ew))) end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[Sin[N[ArcTan[N[(N[((-eh) * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[N[(N[Cos[N[(2.0 * t), $MachinePrecision]], $MachinePrecision] * 0.5 + 0.5), $MachinePrecision]], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot t}{ew}\right) \cdot \left(\sin t \cdot eh\right) - \sqrt{\mathsf{fma}\left(\cos \left(2 \cdot t\right), 0.5, 0.5\right)} \cdot ew\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6499.1
Applied rewrites99.1%
Applied rewrites73.4%
Taylor expanded in ew around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f6498.6
Applied rewrites98.6%
Final simplification98.6%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (sin t) eh))
(t_2 (* (cos t) ew))
(t_3 (fabs t_2))
(t_4 (* (- eh) t)))
(if (<= ew -5.5e-76)
t_3
(if (<= ew 6.8e-101)
(fabs t_1)
(if (<= ew 9.6e+92)
(fabs
(fma
(/ t_4 (* (sqrt (+ (/ (* t_4 t_4) (* ew ew)) 1.0)) ew))
t_1
(- t_2)))
t_3)))))
double code(double eh, double ew, double t) {
double t_1 = sin(t) * eh;
double t_2 = cos(t) * ew;
double t_3 = fabs(t_2);
double t_4 = -eh * t;
double tmp;
if (ew <= -5.5e-76) {
tmp = t_3;
} else if (ew <= 6.8e-101) {
tmp = fabs(t_1);
} else if (ew <= 9.6e+92) {
tmp = fabs(fma((t_4 / (sqrt((((t_4 * t_4) / (ew * ew)) + 1.0)) * ew)), t_1, -t_2));
} else {
tmp = t_3;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(sin(t) * eh) t_2 = Float64(cos(t) * ew) t_3 = abs(t_2) t_4 = Float64(Float64(-eh) * t) tmp = 0.0 if (ew <= -5.5e-76) tmp = t_3; elseif (ew <= 6.8e-101) tmp = abs(t_1); elseif (ew <= 9.6e+92) tmp = abs(fma(Float64(t_4 / Float64(sqrt(Float64(Float64(Float64(t_4 * t_4) / Float64(ew * ew)) + 1.0)) * ew)), t_1, Float64(-t_2))); else tmp = t_3; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$3 = N[Abs[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[((-eh) * t), $MachinePrecision]}, If[LessEqual[ew, -5.5e-76], t$95$3, If[LessEqual[ew, 6.8e-101], N[Abs[t$95$1], $MachinePrecision], If[LessEqual[ew, 9.6e+92], N[Abs[N[(N[(t$95$4 / N[(N[Sqrt[N[(N[(N[(t$95$4 * t$95$4), $MachinePrecision] / N[(ew * ew), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] * t$95$1 + (-t$95$2)), $MachinePrecision]], $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin t \cdot eh\\
t_2 := \cos t \cdot ew\\
t_3 := \left|t\_2\right|\\
t_4 := \left(-eh\right) \cdot t\\
\mathbf{if}\;ew \leq -5.5 \cdot 10^{-76}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;ew \leq 6.8 \cdot 10^{-101}:\\
\;\;\;\;\left|t\_1\right|\\
\mathbf{elif}\;ew \leq 9.6 \cdot 10^{+92}:\\
\;\;\;\;\left|\mathsf{fma}\left(\frac{t\_4}{\sqrt{\frac{t\_4 \cdot t\_4}{ew \cdot ew} + 1} \cdot ew}, t\_1, -t\_2\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if ew < -5.50000000000000014e-76 or 9.60000000000000018e92 < ew Initial program 99.9%
Applied rewrites36.5%
Taylor expanded in ew around inf
*-commutativeN/A
lower-*.f64N/A
lower-cos.f6484.0
Applied rewrites84.0%
if -5.50000000000000014e-76 < ew < 6.79999999999999978e-101Initial program 99.7%
Applied rewrites37.0%
Taylor expanded in eh around -inf
*-commutativeN/A
lower-*.f64N/A
lower-sin.f6486.7
Applied rewrites86.7%
if 6.79999999999999978e-101 < ew < 9.60000000000000018e92Initial program 99.8%
Taylor expanded in t around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6499.8
Applied rewrites99.8%
Applied rewrites99.5%
Taylor expanded in ew around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f6498.3
Applied rewrites98.3%
Applied rewrites77.9%
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (fabs (* (cos t) ew)))) (if (<= ew -5.5e-76) t_1 (if (<= ew 3.5e-84) (fabs (* (sin t) eh)) t_1))))
double code(double eh, double ew, double t) {
double t_1 = fabs((cos(t) * ew));
double tmp;
if (ew <= -5.5e-76) {
tmp = t_1;
} else if (ew <= 3.5e-84) {
tmp = fabs((sin(t) * eh));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = abs((cos(t) * ew))
if (ew <= (-5.5d-76)) then
tmp = t_1
else if (ew <= 3.5d-84) then
tmp = abs((sin(t) * eh))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.abs((Math.cos(t) * ew));
double tmp;
if (ew <= -5.5e-76) {
tmp = t_1;
} else if (ew <= 3.5e-84) {
tmp = Math.abs((Math.sin(t) * eh));
} else {
tmp = t_1;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.fabs((math.cos(t) * ew)) tmp = 0 if ew <= -5.5e-76: tmp = t_1 elif ew <= 3.5e-84: tmp = math.fabs((math.sin(t) * eh)) else: tmp = t_1 return tmp
function code(eh, ew, t) t_1 = abs(Float64(cos(t) * ew)) tmp = 0.0 if (ew <= -5.5e-76) tmp = t_1; elseif (ew <= 3.5e-84) tmp = abs(Float64(sin(t) * eh)); else tmp = t_1; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = abs((cos(t) * ew)); tmp = 0.0; if (ew <= -5.5e-76) tmp = t_1; elseif (ew <= 3.5e-84) tmp = abs((sin(t) * eh)); else tmp = t_1; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Abs[N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[ew, -5.5e-76], t$95$1, If[LessEqual[ew, 3.5e-84], N[Abs[N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left|\cos t \cdot ew\right|\\
\mathbf{if}\;ew \leq -5.5 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;ew \leq 3.5 \cdot 10^{-84}:\\
\;\;\;\;\left|\sin t \cdot eh\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if ew < -5.50000000000000014e-76 or 3.5000000000000001e-84 < ew Initial program 99.9%
Applied rewrites46.5%
Taylor expanded in ew around inf
*-commutativeN/A
lower-*.f64N/A
lower-cos.f6479.1
Applied rewrites79.1%
if -5.50000000000000014e-76 < ew < 3.5000000000000001e-84Initial program 99.7%
Applied rewrites38.9%
Taylor expanded in eh around -inf
*-commutativeN/A
lower-*.f64N/A
lower-sin.f6486.1
Applied rewrites86.1%
(FPCore (eh ew t) :precision binary64 (fabs (* (cos t) ew)))
double code(double eh, double ew, double t) {
return fabs((cos(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 = abs((cos(t) * ew))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((Math.cos(t) * ew));
}
def code(eh, ew, t): return math.fabs((math.cos(t) * ew))
function code(eh, ew, t) return abs(Float64(cos(t) * ew)) end
function tmp = code(eh, ew, t) tmp = abs((cos(t) * ew)); end
code[eh_, ew_, t_] := N[Abs[N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\cos t \cdot ew\right|
\end{array}
Initial program 99.8%
Applied rewrites36.3%
Taylor expanded in ew around inf
*-commutativeN/A
lower-*.f64N/A
lower-cos.f6456.3
Applied rewrites56.3%
(FPCore (eh ew t) :precision binary64 (fabs ew))
double code(double eh, double ew, double t) {
return 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 = abs(ew)
end function
public static double code(double eh, double ew, double t) {
return Math.abs(ew);
}
def code(eh, ew, t): return math.fabs(ew)
function code(eh, ew, t) return abs(ew) end
function tmp = code(eh, ew, t) tmp = abs(ew); end
code[eh_, ew_, t_] := N[Abs[ew], $MachinePrecision]
\begin{array}{l}
\\
\left|ew\right|
\end{array}
Initial program 99.8%
Applied rewrites70.9%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6436.1
Applied rewrites36.1%
Applied rewrites36.1%
herbie shell --seed 2024240
(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)))))))