\[\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(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\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
(*
(* (log1p (expm1 (sin (* angle (* PI 0.011111111111111112))))) (+ b a))
(- b a)))
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 (log1p(expm1(sin((angle * (((double) M_PI) * 0.011111111111111112))))) * (b + a)) * (b - a);
}
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 (Math.log1p(Math.expm1(Math.sin((angle * (Math.PI * 0.011111111111111112))))) * (b + a)) * (b - a);
}
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 (math.log1p(math.expm1(math.sin((angle * (math.pi * 0.011111111111111112))))) * (b + a)) * (b - a)
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(log1p(expm1(sin(Float64(angle * Float64(pi * 0.011111111111111112))))) * Float64(b + a)) * Float64(b - a))
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[(N[Log[1 + N[(Exp[N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $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(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)
Alternatives
| Alternative 1 |
|---|
| Error | 22.9 |
|---|
| Cost | 13576 |
|---|
\[\begin{array}{l}
t_0 := angle \cdot \left(\pi \cdot 0.011111111111111112\right)\\
t_1 := \sin t_0 \cdot \left(b \cdot b\right)\\
\mathbf{if}\;angle \leq -4.4 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;angle \leq 3.8 \cdot 10^{-6}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 21.4 |
|---|
| Cost | 13568 |
|---|
\[\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)
\]
| Alternative 3 |
|---|
| Error | 25.1 |
|---|
| Cost | 13380 |
|---|
\[\begin{array}{l}
\mathbf{if}\;angle \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot {b}^{2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 30.1 |
|---|
| Cost | 7432 |
|---|
\[\begin{array}{l}
t_0 := \pi \cdot \left(a \cdot \left(a \cdot \left(angle \cdot -0.011111111111111112\right)\right)\right)\\
\mathbf{if}\;a \leq -1.2767636737649875 \cdot 10^{+152}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 7761425756558442000:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 25.2 |
|---|
| Cost | 7300 |
|---|
\[\begin{array}{l}
\mathbf{if}\;angle \leq -4.4 \cdot 10^{-9}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 25.1 |
|---|
| Cost | 7300 |
|---|
\[\begin{array}{l}
\mathbf{if}\;angle \leq -0.028:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 33.6 |
|---|
| Cost | 7176 |
|---|
\[\begin{array}{l}
t_0 := \pi \cdot \left(\left(angle \cdot a\right) \cdot \left(a \cdot -0.011111111111111112\right)\right)\\
\mathbf{if}\;a \leq -4.7839323881146706 \cdot 10^{+55}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 7.67253897484111 \cdot 10^{-27}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 33.6 |
|---|
| Cost | 7176 |
|---|
\[\begin{array}{l}
t_0 := \pi \cdot \left(a \cdot \left(a \cdot \left(angle \cdot -0.011111111111111112\right)\right)\right)\\
\mathbf{if}\;a \leq -4.7839323881146706 \cdot 10^{+55}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 7.67253897484111 \cdot 10^{-27}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 43.6 |
|---|
| Cost | 6912 |
|---|
\[angle \cdot \left(a \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot a\right)\right)\right)
\]
| Alternative 10 |
|---|
| Error | 40.0 |
|---|
| Cost | 6912 |
|---|
\[\pi \cdot \left(\left(angle \cdot a\right) \cdot \left(a \cdot -0.011111111111111112\right)\right)
\]