\[\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)
\]
↓
\[\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\pi \cdot angle}{90}\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
(* (+ b a) (* (- b a) (sin (/ (* PI angle) 90.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 (b + a) * ((b - a) * sin(((((double) M_PI) * angle) / 90.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 (b + a) * ((b - a) * Math.sin(((Math.PI * angle) / 90.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 (b + a) * ((b - a) * math.sin(((math.pi * angle) / 90.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(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(Float64(pi * angle) / 90.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 = (b + a) * ((b - a) * sin(((pi * angle) / 90.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[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(Pi * angle), $MachinePrecision] / 90.0), $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)
↓
\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\pi \cdot angle}{90}\right)\right)
Alternatives
| Alternative 1 |
|---|
| Error | 24.0 |
|---|
| Cost | 14096 |
|---|
\[\begin{array}{l}
t_0 := \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\
t_1 := \sin \left(angle \cdot \left(0.011111111111111112 \cdot \pi\right)\right)\\
\mathbf{if}\;b \leq -2.5 \cdot 10^{+118}:\\
\;\;\;\;\left(b + a\right) \cdot \left(t_1 \cdot b\right)\\
\mathbf{elif}\;b \leq -7.6 \cdot 10^{-109}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{-97}:\\
\;\;\;\;\left(b + a\right) \cdot \left(t_1 \cdot \left(-a\right)\right)\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{+120}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 24.5 |
|---|
| Cost | 14096 |
|---|
\[\begin{array}{l}
t_0 := \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\
t_1 := \sin \left(angle \cdot \left(0.011111111111111112 \cdot \pi\right)\right)\\
\mathbf{if}\;b \leq -2.6 \cdot 10^{+115}:\\
\;\;\;\;\left(b + a\right) \cdot \left(t_1 \cdot b\right)\\
\mathbf{elif}\;b \leq -3.9 \cdot 10^{-107}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-97}:\\
\;\;\;\;\left(b + a\right) \cdot \left(t_1 \cdot \left(-a\right)\right)\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+37}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\sin \left(\pi \cdot \left(0.011111111111111112 \cdot angle\right)\right) \cdot b\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 30.6 |
|---|
| Cost | 13768 |
|---|
\[\begin{array}{l}
t_0 := \left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right)\\
\mathbf{if}\;b \leq -1.2 \cdot 10^{-113}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-123}:\\
\;\;\;\;\left(-a \cdot a\right) \cdot \sin \left(2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 27.3 |
|---|
| Cost | 13768 |
|---|
\[\begin{array}{l}
t_0 := \left(b + a\right) \cdot \left(\left(-a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{-19}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{+26}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 27.3 |
|---|
| Cost | 13768 |
|---|
\[\begin{array}{l}
t_0 := \left(b + a\right) \cdot \left(\sin \left(angle \cdot \left(0.011111111111111112 \cdot \pi\right)\right) \cdot \left(-a\right)\right)\\
\mathbf{if}\;a \leq -6.4 \cdot 10^{-15}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+25}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 30.6 |
|---|
| Cost | 13704 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\
t_1 := \left(b + a\right) \cdot \left(t_0 \cdot b\right)\\
\mathbf{if}\;b \leq -1.9 \cdot 10^{-115}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-123}:\\
\;\;\;\;t_0 \cdot \left(-a \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 35.5 |
|---|
| Cost | 13640 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\
t_1 := t_0 \cdot \left(-a \cdot a\right)\\
\mathbf{if}\;a \leq -3.2 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{+33}:\\
\;\;\;\;t_0 \cdot \left(b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 35.5 |
|---|
| Cost | 13640 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\
t_1 := -a \cdot a\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{-19}:\\
\;\;\;\;\sin \left(\left(angle \cdot 0.011111111111111112\right) \cdot \pi\right) \cdot t_1\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{+33}:\\
\;\;\;\;t_0 \cdot \left(b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot t_1\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 20.6 |
|---|
| Cost | 13568 |
|---|
\[\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\right)
\]
| Alternative 10 |
|---|
| Error | 20.7 |
|---|
| Cost | 13568 |
|---|
\[\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot 0.011111111111111112\right) \cdot \pi\right)\right)
\]
| Alternative 11 |
|---|
| Error | 20.6 |
|---|
| Cost | 13568 |
|---|
\[\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)
\]
| Alternative 12 |
|---|
| Error | 41.5 |
|---|
| Cost | 13312 |
|---|
\[\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot b\right)
\]
| Alternative 13 |
|---|
| Error | 48.1 |
|---|
| Cost | 7300 |
|---|
\[\begin{array}{l}
\mathbf{if}\;angle \leq -29000:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot {\left(\frac{-1}{angle}\right)}^{3}\right)\\
\mathbf{elif}\;angle \leq 4 \cdot 10^{+16}:\\
\;\;\;\;\left(angle \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot 0\right)\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 48.2 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
t_0 := \left(b + a\right) \cdot \left(\left(b - a\right) \cdot 0\right)\\
\mathbf{if}\;angle \leq -7.5 \cdot 10^{+90}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;angle \leq 3.9 \cdot 10^{+16}:\\
\;\;\;\;\left(angle \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 51.1 |
|---|
| Cost | 576 |
|---|
\[\left(angle \cdot \left(b - a\right)\right) \cdot \left(a + b\right)
\]
| Alternative 16 |
|---|
| Error | 52.2 |
|---|
| Cost | 320 |
|---|
\[\left(angle \cdot b\right) \cdot b
\]