\[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
\]
↓
\[2 \cdot \left(\left(\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) + \cos \left(\pi \cdot \left(angle \cdot 0.016666666666666666\right)\right)\right) - \cos \left(angle \cdot \left(\pi \cdot -0.016666666666666666\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)
\]
(FPCore (a b angle)
:precision binary64
(*
(* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0))))
(cos (* PI (/ angle 180.0)))))
↓
(FPCore (a b angle)
:precision binary64
(*
2.0
(*
(-
(+
(cos (* PI (* angle 0.005555555555555556)))
(cos (* PI (* angle 0.016666666666666666))))
(cos (* angle (* PI -0.016666666666666666))))
(* (- (pow b 2.0) (pow a 2.0)) (sin (* PI (/ angle 180.0)))))))double code(double a, double b, double angle) {
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin((((double) M_PI) * (angle / 180.0)))) * cos((((double) M_PI) * (angle / 180.0)));
}
↓
double code(double a, double b, double angle) {
return 2.0 * (((cos((((double) M_PI) * (angle * 0.005555555555555556))) + cos((((double) M_PI) * (angle * 0.016666666666666666)))) - cos((angle * (((double) M_PI) * -0.016666666666666666)))) * ((pow(b, 2.0) - pow(a, 2.0)) * sin((((double) M_PI) * (angle / 180.0)))));
}
public static double code(double a, double b, double angle) {
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin((Math.PI * (angle / 180.0)))) * Math.cos((Math.PI * (angle / 180.0)));
}
↓
public static double code(double a, double b, double angle) {
return 2.0 * (((Math.cos((Math.PI * (angle * 0.005555555555555556))) + Math.cos((Math.PI * (angle * 0.016666666666666666)))) - Math.cos((angle * (Math.PI * -0.016666666666666666)))) * ((Math.pow(b, 2.0) - Math.pow(a, 2.0)) * Math.sin((Math.PI * (angle / 180.0)))));
}
def code(a, b, angle):
return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin((math.pi * (angle / 180.0)))) * math.cos((math.pi * (angle / 180.0)))
↓
def code(a, b, angle):
return 2.0 * (((math.cos((math.pi * (angle * 0.005555555555555556))) + math.cos((math.pi * (angle * 0.016666666666666666)))) - math.cos((angle * (math.pi * -0.016666666666666666)))) * ((math.pow(b, 2.0) - math.pow(a, 2.0)) * math.sin((math.pi * (angle / 180.0)))))
function code(a, b, angle)
return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(pi * Float64(angle / 180.0))))
end
↓
function code(a, b, angle)
return Float64(2.0 * Float64(Float64(Float64(cos(Float64(pi * Float64(angle * 0.005555555555555556))) + cos(Float64(pi * Float64(angle * 0.016666666666666666)))) - cos(Float64(angle * Float64(pi * -0.016666666666666666)))) * Float64(Float64((b ^ 2.0) - (a ^ 2.0)) * sin(Float64(pi * Float64(angle / 180.0))))))
end
function tmp = code(a, b, angle)
tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin((pi * (angle / 180.0)))) * cos((pi * (angle / 180.0)));
end
↓
function tmp = code(a, b, angle)
tmp = 2.0 * (((cos((pi * (angle * 0.005555555555555556))) + cos((pi * (angle * 0.016666666666666666)))) - cos((angle * (pi * -0.016666666666666666)))) * (((b ^ 2.0) - (a ^ 2.0)) * sin((pi * (angle / 180.0)))));
end
code[a_, b_, angle_] := N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
↓
code[a_, b_, angle_] := N[(2.0 * N[(N[(N[(N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Cos[N[(Pi * N[(angle * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[Cos[N[(angle * N[(Pi * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
↓
2 \cdot \left(\left(\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) + \cos \left(\pi \cdot \left(angle \cdot 0.016666666666666666\right)\right)\right) - \cos \left(angle \cdot \left(\pi \cdot -0.016666666666666666\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)
Alternatives
| Alternative 1 |
|---|
| Error | 33.2 |
|---|
| Cost | 39684 |
|---|
\[\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a}^{2} \leq 2 \cdot 10^{-285}:\\
\;\;\;\;2 \cdot \left(1 \cdot \left(-1 \cdot \left({a}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot \left(angle \cdot {b}^{2}\right)\right)\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 33.2 |
|---|
| Cost | 39684 |
|---|
\[\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a}^{2} \leq 2 \cdot 10^{-285}:\\
\;\;\;\;2 \cdot \left(1 \cdot \left(-1 \cdot \left({a}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left({b}^{2} \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 31.2 |
|---|
| Cost | 39552 |
|---|
\[2 \cdot \left(\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(-\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)
\]
| Alternative 4 |
|---|
| Error | 31.3 |
|---|
| Cost | 39488 |
|---|
\[2 \cdot \left(\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\]
| Alternative 5 |
|---|
| Error | 31.2 |
|---|
| Cost | 26496 |
|---|
\[2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(0.5 \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)
\]
| Alternative 6 |
|---|
| Error | 34.1 |
|---|
| Cost | 19968 |
|---|
\[2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right)\right)\right)
\]
| Alternative 7 |
|---|
| Error | 34.0 |
|---|
| Cost | 19968 |
|---|
\[2 \cdot \left(angle \cdot \left(\left({a}^{2} - {b}^{2}\right) \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)
\]
| Alternative 8 |
|---|
| Error | 38.0 |
|---|
| Cost | 13640 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)\right)\\
\mathbf{if}\;b \leq -2.4 \cdot 10^{-13}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 5.05 \cdot 10^{+20}:\\
\;\;\;\;-0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 38.0 |
|---|
| Cost | 13640 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{-11}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)\right)\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{+20}:\\
\;\;\;\;-0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} \cdot 0.005555555555555556\right)\right)\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 38.0 |
|---|
| Cost | 13640 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-12}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)\right)\\
\mathbf{elif}\;b \leq 5.05 \cdot 10^{+20}:\\
\;\;\;\;2 \cdot \left({a}^{2} \cdot \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} \cdot 0.005555555555555556\right)\right)\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 37.9 |
|---|
| Cost | 13640 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot \left({b}^{2} \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\
\mathbf{elif}\;b \leq 5.05 \cdot 10^{+20}:\\
\;\;\;\;2 \cdot \left({a}^{2} \cdot \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} \cdot 0.005555555555555556\right)\right)\right)\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 43.3 |
|---|
| Cost | 13248 |
|---|
\[-0.011111111111111112 \cdot \left(angle \cdot \left({a}^{2} \cdot \pi\right)\right)
\]
| Alternative 13 |
|---|
| Error | 43.3 |
|---|
| Cost | 13248 |
|---|
\[-0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)
\]