\[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2}
\]
↓
\[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}
\]
(FPCore (a b angle)
:precision binary64
(+
(pow (* a (cos (* PI (/ angle 180.0)))) 2.0)
(pow (* b (sin (* PI (/ angle 180.0)))) 2.0)))
↓
(FPCore (a b angle)
:precision binary64
(+
(pow (* a (cos (* PI (/ angle 180.0)))) 2.0)
(pow (* b (sin (* 0.005555555555555556 (* PI angle)))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * cos((((double) M_PI) * (angle / 180.0)))), 2.0) + pow((b * sin((((double) M_PI) * (angle / 180.0)))), 2.0);
}
↓
double code(double a, double b, double angle) {
return pow((a * cos((((double) M_PI) * (angle / 180.0)))), 2.0) + pow((b * sin((0.005555555555555556 * (((double) M_PI) * angle)))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.cos((Math.PI * (angle / 180.0)))), 2.0) + Math.pow((b * Math.sin((Math.PI * (angle / 180.0)))), 2.0);
}
↓
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.cos((Math.PI * (angle / 180.0)))), 2.0) + Math.pow((b * Math.sin((0.005555555555555556 * (Math.PI * angle)))), 2.0);
}
def code(a, b, angle):
return math.pow((a * math.cos((math.pi * (angle / 180.0)))), 2.0) + math.pow((b * math.sin((math.pi * (angle / 180.0)))), 2.0)
↓
def code(a, b, angle):
return math.pow((a * math.cos((math.pi * (angle / 180.0)))), 2.0) + math.pow((b * math.sin((0.005555555555555556 * (math.pi * angle)))), 2.0)
function code(a, b, angle)
return Float64((Float64(a * cos(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + (Float64(b * sin(Float64(pi * Float64(angle / 180.0)))) ^ 2.0))
end
↓
function code(a, b, angle)
return Float64((Float64(a * cos(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + (Float64(b * sin(Float64(0.005555555555555556 * Float64(pi * angle)))) ^ 2.0))
end
function tmp = code(a, b, angle)
tmp = ((a * cos((pi * (angle / 180.0)))) ^ 2.0) + ((b * sin((pi * (angle / 180.0)))) ^ 2.0);
end
↓
function tmp = code(a, b, angle)
tmp = ((a * cos((pi * (angle / 180.0)))) ^ 2.0) + ((b * sin((0.005555555555555556 * (pi * angle)))) ^ 2.0);
end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
↓
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2}
↓
{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}
Alternatives
| Alternative 1 |
|---|
| Error | 20.4 |
|---|
| Cost | 39360 |
|---|
\[{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2}
\]
| Alternative 2 |
|---|
| Error | 20.7 |
|---|
| Cost | 26500 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{-13}:\\
\;\;\;\;{a}^{2} + {\left(b \cdot \mathsf{expm1}\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{a}^{2} + \frac{b \cdot b}{2} \cdot \left(1 - \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 20.4 |
|---|
| Cost | 26240 |
|---|
\[{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2} + {a}^{2}
\]
| Alternative 4 |
|---|
| Error | 20.6 |
|---|
| Cost | 20744 |
|---|
\[\begin{array}{l}
t_0 := 1 - \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
t_1 := b \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{-5}:\\
\;\;\;\;{a}^{2} + t_0 \cdot \frac{b}{\frac{2}{b}}\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-13}:\\
\;\;\;\;{a}^{2} + \left(t_1 \cdot t_1\right) \cdot {\pi}^{2}\\
\mathbf{else}:\\
\;\;\;\;{a}^{2} + \frac{b \cdot b}{2} \cdot t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 20.6 |
|---|
| Cost | 20744 |
|---|
\[\begin{array}{l}
t_0 := b \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{-5}:\\
\;\;\;\;{a}^{2} + \frac{1 - \cos \left(2 \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}{\frac{2}{b \cdot b}}\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-13}:\\
\;\;\;\;{a}^{2} + \left(t_0 \cdot t_0\right) \cdot {\pi}^{2}\\
\mathbf{else}:\\
\;\;\;\;{a}^{2} + \frac{b \cdot b}{2} \cdot \left(1 - \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 20.6 |
|---|
| Cost | 20681 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{-5} \lor \neg \left(\frac{angle}{180} \leq 2 \cdot 10^{-13}\right):\\
\;\;\;\;{a}^{2} + \left(1 - \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{b}{\frac{2}{b}}\\
\mathbf{else}:\\
\;\;\;\;{a}^{2} + {\pi}^{2} \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(angle \cdot b\right) \cdot \left(angle \cdot b\right)\right)\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 20.6 |
|---|
| Cost | 20680 |
|---|
\[\begin{array}{l}
t_0 := 1 - \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{-5}:\\
\;\;\;\;{a}^{2} + t_0 \cdot \frac{b}{\frac{2}{b}}\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-13}:\\
\;\;\;\;{a}^{2} + {\pi}^{2} \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(angle \cdot b\right) \cdot \left(angle \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{a}^{2} + \frac{b \cdot b}{2} \cdot t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 25.9 |
|---|
| Cost | 20096 |
|---|
\[{a}^{2} + {\pi}^{2} \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(angle \cdot b\right) \cdot \left(angle \cdot b\right)\right)\right)
\]
| Alternative 9 |
|---|
| Error | 26.0 |
|---|
| Cost | 19840 |
|---|
\[{a}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot {\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2}
\]
| Alternative 10 |
|---|
| Error | 25.9 |
|---|
| Cost | 19840 |
|---|
\[{a}^{2} + {\left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)}^{2}
\]
| Alternative 11 |
|---|
| Error | 25.9 |
|---|
| Cost | 19840 |
|---|
\[{a}^{2} + {\left(angle \cdot \left(b \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}
\]
| Alternative 12 |
|---|
| Error | 25.9 |
|---|
| Cost | 19840 |
|---|
\[{a}^{2} + {\left(b \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}
\]