Math FPCore C Java Python Julia MATLAB Wolfram TeX \[\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 := \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-33}:\\
\;\;\;\;2 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot 0.5\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\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
(* (sin (* 0.011111111111111112 (* PI angle))) (- (* b b) (* a a)))))
(if (<= (/ angle 180.0) -2e-8)
t_0
(if (<= (/ angle 180.0) 5e-33)
(*
2.0
(* (+ b a) (* (* (- b a) 0.5) (* angle (* PI 0.011111111111111112)))))
t_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 = sin((0.011111111111111112 * (((double) M_PI) * angle))) * ((b * b) - (a * a));
double tmp;
if ((angle / 180.0) <= -2e-8) {
tmp = t_0;
} else if ((angle / 180.0) <= 5e-33) {
tmp = 2.0 * ((b + a) * (((b - a) * 0.5) * (angle * (((double) M_PI) * 0.011111111111111112))));
} else {
tmp = t_0;
}
return tmp;
}
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.sin((0.011111111111111112 * (Math.PI * angle))) * ((b * b) - (a * a));
double tmp;
if ((angle / 180.0) <= -2e-8) {
tmp = t_0;
} else if ((angle / 180.0) <= 5e-33) {
tmp = 2.0 * ((b + a) * (((b - a) * 0.5) * (angle * (Math.PI * 0.011111111111111112))));
} else {
tmp = t_0;
}
return tmp;
}
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.sin((0.011111111111111112 * (math.pi * angle))) * ((b * b) - (a * a))
tmp = 0
if (angle / 180.0) <= -2e-8:
tmp = t_0
elif (angle / 180.0) <= 5e-33:
tmp = 2.0 * ((b + a) * (((b - a) * 0.5) * (angle * (math.pi * 0.011111111111111112))))
else:
tmp = t_0
return tmp
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(sin(Float64(0.011111111111111112 * Float64(pi * angle))) * Float64(Float64(b * b) - Float64(a * a)))
tmp = 0.0
if (Float64(angle / 180.0) <= -2e-8)
tmp = t_0;
elseif (Float64(angle / 180.0) <= 5e-33)
tmp = Float64(2.0 * Float64(Float64(b + a) * Float64(Float64(Float64(b - a) * 0.5) * Float64(angle * Float64(pi * 0.011111111111111112)))));
else
tmp = t_0;
end
return tmp
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_2 = code(a, b, angle)
t_0 = sin((0.011111111111111112 * (pi * angle))) * ((b * b) - (a * a));
tmp = 0.0;
if ((angle / 180.0) <= -2e-8)
tmp = t_0;
elseif ((angle / 180.0) <= 5e-33)
tmp = 2.0 * ((b + a) * (((b - a) * 0.5) * (angle * (pi * 0.011111111111111112))));
else
tmp = t_0;
end
tmp_2 = tmp;
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[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e-8], t$95$0, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e-33], N[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * 0.5), $MachinePrecision] * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\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 := \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-33}:\\
\;\;\;\;2 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot 0.5\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
Alternatives Alternative 1 Error 21.9 Cost 33472
\[\begin{array}{l}
t_0 := \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot 0.5\\
2 \cdot \mathsf{fma}\left(b + a, \left(b - a\right) \cdot t_0, 0 \cdot t_0\right)
\end{array}
\]
Alternative 2 Error 23.3 Cost 14088
\[\begin{array}{l}
t_0 := 2 \cdot \frac{\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}{\frac{2}{b \cdot b}}\\
\mathbf{if}\;\frac{angle}{180} \leq -0.1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot 0.5\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 3 Error 23.1 Cost 13832
\[\begin{array}{l}
t_0 := 2 \cdot \left(-0.5 \cdot \left(a \cdot \left(a \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\right)\\
\mathbf{if}\;angle \leq -48:\\
\;\;\;\;t_0\\
\mathbf{elif}\;angle \leq 0.17:\\
\;\;\;\;2 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot 0.5\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 23.3 Cost 13832
\[\begin{array}{l}
t_0 := angle \cdot \left(\pi \cdot 0.011111111111111112\right)\\
t_1 := 2 \cdot \left(b \cdot \left(b \cdot \left(0.5 \cdot \sin t_0\right)\right)\right)\\
\mathbf{if}\;angle \leq -0.0062:\\
\;\;\;\;t_1\\
\mathbf{elif}\;angle \leq 7.8 \cdot 10^{-8}:\\
\;\;\;\;2 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot 0.5\right) \cdot t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 23.3 Cost 13832
\[\begin{array}{l}
t_0 := 2 \cdot \left(b \cdot \left(b \cdot \left(0.5 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\right)\\
\mathbf{if}\;angle \leq -0.0067:\\
\;\;\;\;t_0\\
\mathbf{elif}\;angle \leq 7.8 \cdot 10^{-8}:\\
\;\;\;\;2 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot 0.5\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 6 Error 21.9 Cost 13824
\[2 \cdot \left(\left(b + a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b - a\right) \cdot 0.5\right)\right)\right)
\]
Alternative 7 Error 24.4 Cost 7688
\[\begin{array}{l}
\mathbf{if}\;angle \leq -520000:\\
\;\;\;\;\left(a \cdot \left(a \cdot \pi\right)\right) \cdot \left(angle \cdot -0.011111111111111112\right)\\
\mathbf{elif}\;angle \leq 4.5 \cdot 10^{+16}:\\
\;\;\;\;2 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot 0.5\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(1 + \pi \cdot \left(b \cdot b\right)\right) + -1\right)\right)\\
\end{array}
\]
Alternative 8 Error 30.4 Cost 7432
\[\begin{array}{l}
t_0 := -0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot \left(a \cdot angle\right)\right)\right)\\
\mathbf{if}\;a \leq -6.6 \cdot 10^{+43}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+144}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 9 Error 24.7 Cost 7432
\[\begin{array}{l}
\mathbf{if}\;angle \leq -520000:\\
\;\;\;\;\left(a \cdot \left(a \cdot \pi\right)\right) \cdot \left(angle \cdot -0.011111111111111112\right)\\
\mathbf{elif}\;angle \leq 7.8 \cdot 10^{-8}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(1 + \pi \cdot \left(b \cdot b\right)\right) + -1\right)\right)\\
\end{array}
\]
Alternative 10 Error 39.3 Cost 7176
\[\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\
\mathbf{if}\;b \leq -2 \cdot 10^{-129}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 7800000:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 11 Error 34.0 Cost 7176
\[\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{-128}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-23}:\\
\;\;\;\;angle \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 12 Error 34.0 Cost 7176
\[\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{-128}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 1.02 \cdot 10^{-22}:\\
\;\;\;\;\left(a \cdot \left(a \cdot \pi\right)\right) \cdot \left(angle \cdot -0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 13 Error 34.0 Cost 7176
\[\begin{array}{l}
t_0 := angle \cdot \left(b \cdot \pi\right)\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{-128}:\\
\;\;\;\;t_0 \cdot \left(b \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;b \leq 3.1 \cdot 10^{-22}:\\
\;\;\;\;\left(a \cdot \left(a \cdot \pi\right)\right) \cdot \left(angle \cdot -0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot t_0\right)\\
\end{array}
\]
Alternative 14 Error 33.3 Cost 7176
\[\begin{array}{l}
t_0 := -0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot \left(a \cdot angle\right)\right)\right)\\
\mathbf{if}\;a \leq -1.82 \cdot 10^{-25}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-68}:\\
\;\;\;\;\pi \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 15 Error 44.2 Cost 6912
\[0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
\]