\[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}
\]
↓
\[\begin{array}{l}
t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
{\left(a \cdot \sin t_0\right)}^{2} + {\left(b \cdot \cos t_0\right)}^{2}
\end{array}
\]
(FPCore (a b angle)
:precision binary64
(+
(pow (* a (sin (* (/ angle 180.0) PI))) 2.0)
(pow (* b (cos (* (/ angle 180.0) PI))) 2.0)))
↓
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* angle (* 0.005555555555555556 PI))))
(+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0))))
double code(double a, double b, double angle) {
return pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(((angle / 180.0) * ((double) M_PI)))), 2.0);
}
↓
double code(double a, double b, double angle) {
double t_0 = angle * (0.005555555555555556 * ((double) M_PI));
return pow((a * sin(t_0)), 2.0) + pow((b * cos(t_0)), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(((angle / 180.0) * Math.PI))), 2.0);
}
↓
public static double code(double a, double b, double angle) {
double t_0 = angle * (0.005555555555555556 * Math.PI);
return Math.pow((a * Math.sin(t_0)), 2.0) + Math.pow((b * Math.cos(t_0)), 2.0);
}
def code(a, b, angle):
return math.pow((a * math.sin(((angle / 180.0) * math.pi))), 2.0) + math.pow((b * math.cos(((angle / 180.0) * math.pi))), 2.0)
↓
def code(a, b, angle):
t_0 = angle * (0.005555555555555556 * math.pi)
return math.pow((a * math.sin(t_0)), 2.0) + math.pow((b * math.cos(t_0)), 2.0)
function code(a, b, angle)
return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(Float64(angle / 180.0) * pi))) ^ 2.0))
end
↓
function code(a, b, angle)
t_0 = Float64(angle * Float64(0.005555555555555556 * pi))
return Float64((Float64(a * sin(t_0)) ^ 2.0) + (Float64(b * cos(t_0)) ^ 2.0))
end
function tmp = code(a, b, angle)
tmp = ((a * sin(((angle / 180.0) * pi))) ^ 2.0) + ((b * cos(((angle / 180.0) * pi))) ^ 2.0);
end
↓
function tmp = code(a, b, angle)
t_0 = angle * (0.005555555555555556 * pi);
tmp = ((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0);
end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
↓
code[a_, b_, angle_] := Block[{t$95$0 = N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}
↓
\begin{array}{l}
t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
{\left(a \cdot \sin t_0\right)}^{2} + {\left(b \cdot \cos t_0\right)}^{2}
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 20.3 |
|---|
| Cost | 39360 |
|---|
\[{\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + {\left(b \cdot \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)}^{2}
\]
| Alternative 2 |
|---|
| Error | 20.5 |
|---|
| Cost | 39296 |
|---|
\[{\left(a \cdot \sin \left(\left(angle \cdot \left(\sqrt{0.005555555555555556} \cdot \pi\right)\right) \cdot \sqrt{0.005555555555555556}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}
\]
| Alternative 3 |
|---|
| Error | 20.5 |
|---|
| Cost | 26368 |
|---|
\[{\left(a \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}
\]
| Alternative 4 |
|---|
| Error | 20.5 |
|---|
| Cost | 20552 |
|---|
\[\begin{array}{l}
t_0 := {\left(b \cdot 1\right)}^{2}\\
t_1 := \frac{\left(\left(1 - \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot a\right) \cdot a}{2} + t_0\\
\mathbf{if}\;angle \leq -80:\\
\;\;\;\;t_1\\
\mathbf{elif}\;angle \leq 0.005:\\
\;\;\;\;{\left(0.005555555555555556 \cdot \left(\left(\pi \cdot angle\right) \cdot a\right)\right)}^{2} + t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 26.0 |
|---|
| Cost | 19968 |
|---|
\[{\left(angle \cdot \left(a \cdot \pi\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5} + {\left(b \cdot 1\right)}^{2}
\]
| Alternative 6 |
|---|
| Error | 25.9 |
|---|
| Cost | 19968 |
|---|
\[{\left(0.005555555555555556 \cdot \left(angle \cdot \left(a \cdot \pi\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}
\]
| Alternative 7 |
|---|
| Error | 25.9 |
|---|
| Cost | 19968 |
|---|
\[{\left(0.005555555555555556 \cdot \left(\left(\pi \cdot angle\right) \cdot a\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}
\]