\[\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)
\]
↓
\[\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
2 \cdot \left(\sin t_0 \cdot \left(\cos t_0 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)
\end{array}
\]
(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
(let* ((t_0 (* PI (* 0.005555555555555556 angle))))
(* 2.0 (* (sin t_0) (* (cos t_0) (- (pow b 2.0) (pow a 2.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) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle);
return 2.0 * (sin(t_0) * (cos(t_0) * (pow(b, 2.0) - pow(a, 2.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) {
double t_0 = Math.PI * (0.005555555555555556 * angle);
return 2.0 * (Math.sin(t_0) * (Math.cos(t_0) * (Math.pow(b, 2.0) - Math.pow(a, 2.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):
t_0 = math.pi * (0.005555555555555556 * angle)
return 2.0 * (math.sin(t_0) * (math.cos(t_0) * (math.pow(b, 2.0) - math.pow(a, 2.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)
t_0 = Float64(pi * Float64(0.005555555555555556 * angle))
return Float64(2.0 * Float64(sin(t_0) * Float64(cos(t_0) * Float64((b ^ 2.0) - (a ^ 2.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)
t_0 = pi * (0.005555555555555556 * angle);
tmp = 2.0 * (sin(t_0) * (cos(t_0) * ((b ^ 2.0) - (a ^ 2.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_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, N[(2.0 * N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $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)
↓
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
2 \cdot \left(\sin t_0 \cdot \left(\cos t_0 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 31.0 |
|---|
| Cost | 39488 |
|---|
\[2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)
\]
| Alternative 2 |
|---|
| Error | 30.9 |
|---|
| Cost | 39488 |
|---|
\[2 \cdot \left(\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)
\]
| Alternative 3 |
|---|
| Error | 32.1 |
|---|
| Cost | 33092 |
|---|
\[\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a}^{2} \leq -2 \cdot 10^{-281}:\\
\;\;\;\;\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-2 \cdot {a}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot {b}^{2}\right)\right) \cdot 1\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 32.2 |
|---|
| Cost | 32964 |
|---|
\[\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a}^{2} \leq -2 \cdot 10^{-281}:\\
\;\;\;\;\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-2 \cdot {a}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot {b}^{2}\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 31.9 |
|---|
| Cost | 26368 |
|---|
\[\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)
\]
| Alternative 6 |
|---|
| Error | 36.7 |
|---|
| Cost | 20040 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot {b}^{2}\right)\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{-37}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-62}:\\
\;\;\;\;{a}^{2} \cdot \left(angle \cdot \left(\pi \cdot -0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 37.4 |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {b}^{2}\right)\right)\\
\mathbf{if}\;b \leq -4.5 \cdot 10^{-37}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 4.7 \cdot 10^{-62}:\\
\;\;\;\;angle \cdot \left(-0.011111111111111112 \cdot \left({a}^{2} \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 37.4 |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{-36}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {b}^{2}\right)\right)\\
\mathbf{elif}\;b \leq 1.85 \cdot 10^{-62}:\\
\;\;\;\;angle \cdot \left(-0.011111111111111112 \cdot \left({a}^{2} \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot {b}^{2}\right)\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 37.4 |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{-37}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {b}^{2}\right)\right)\\
\mathbf{elif}\;b \leq 9.3 \cdot 10^{-63}:\\
\;\;\;\;angle \cdot \left(-0.011111111111111112 \cdot \left({a}^{2} \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\pi \cdot \left({b}^{2} \cdot 0.011111111111111112\right)\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 37.5 |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{-38}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {b}^{2}\right)\right)\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-62}:\\
\;\;\;\;angle \cdot \left({a}^{2} \cdot \left(\pi \cdot -0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\pi \cdot \left({b}^{2} \cdot 0.011111111111111112\right)\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 37.5 |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -7.6 \cdot 10^{-39}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {b}^{2}\right)\right)\\
\mathbf{elif}\;b \leq 5.8 \cdot 10^{-62}:\\
\;\;\;\;\left(angle \cdot \left({a}^{2} \cdot \pi\right)\right) \cdot -0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\pi \cdot \left({b}^{2} \cdot 0.011111111111111112\right)\right)\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 37.4 |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{-37}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {b}^{2}\right)\right)\\
\mathbf{elif}\;b \leq 6.3 \cdot 10^{-62}:\\
\;\;\;\;{a}^{2} \cdot \left(angle \cdot \left(\pi \cdot -0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\pi \cdot \left({b}^{2} \cdot 0.011111111111111112\right)\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 37.4 |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{-36}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {b}^{2}\right)\right)\\
\mathbf{elif}\;b \leq 4.1 \cdot 10^{-62}:\\
\;\;\;\;{a}^{2} \cdot \left(angle \cdot \left(\pi \cdot -0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{b}^{2} \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 43.2 |
|---|
| Cost | 13248 |
|---|
\[0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {b}^{2}\right)\right)
\]