\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\]
↓
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -48000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 390000000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
(FPCore (F B x)
:precision binary64
(+
(- (* x (/ 1.0 (tan B))))
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
↓
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -48000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 390000000000.0)
(- (* (/ F (sin B)) (pow (+ (* F F) (+ 2.0 (+ x x))) -0.5)) t_0)
(- (/ 1.0 (sin B)) t_0)))))double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
↓
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -48000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 390000000000.0) {
tmp = ((F / sin(B)) * pow(((F * F) + (2.0 + (x + x))), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
↓
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-48000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 390000000000.0d0) then
tmp = ((f / sin(b)) * (((f * f) + (2.0d0 + (x + x))) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
↓
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -48000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 390000000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((F * F) + (2.0 + (x + x))), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x):
return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
↓
def code(F, B, x):
t_0 = x / math.tan(B)
tmp = 0
if F <= -48000000000.0:
tmp = (-1.0 / math.sin(B)) - t_0
elif F <= 390000000000.0:
tmp = ((F / math.sin(B)) * math.pow(((F * F) + (2.0 + (x + x))), -0.5)) - t_0
else:
tmp = (1.0 / math.sin(B)) - t_0
return tmp
function code(F, B, x)
return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))))
end
↓
function code(F, B, x)
t_0 = Float64(x / tan(B))
tmp = 0.0
if (F <= -48000000000.0)
tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
elseif (F <= 390000000000.0)
tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(F * F) + Float64(2.0 + Float64(x + x))) ^ -0.5)) - t_0);
else
tmp = Float64(Float64(1.0 / sin(B)) - t_0);
end
return tmp
end
function tmp = code(F, B, x)
tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0)));
end
↓
function tmp_2 = code(F, B, x)
t_0 = x / tan(B);
tmp = 0.0;
if (F <= -48000000000.0)
tmp = (-1.0 / sin(B)) - t_0;
elseif (F <= 390000000000.0)
tmp = ((F / sin(B)) * (((F * F) + (2.0 + (x + x))) ^ -0.5)) - t_0;
else
tmp = (1.0 / sin(B)) - t_0;
end
tmp_2 = tmp;
end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -48000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 390000000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
↓
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -48000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 390000000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.6 |
|---|
| Cost | 20424 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 \cdot x + 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.6 |
|---|
| Cost | 20296 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 \cdot x + 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 5.8 |
|---|
| Cost | 14216 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -38000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 170000:\\
\;\;\;\;\frac{F}{B} \cdot {\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 6.0 |
|---|
| Cost | 14024 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.88:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.36:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 \cdot x + 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 11.2 |
|---|
| Cost | 13776 |
|---|
\[\begin{array}{l}
t_0 := \frac{F}{B} \cdot {\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -225:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{-175}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-171}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 2550:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 21.1 |
|---|
| Cost | 13580 |
|---|
\[\begin{array}{l}
t_0 := {\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -68000000000:\\
\;\;\;\;\frac{-1}{B} - t_1\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{-177}:\\
\;\;\;\;\left(\frac{1}{B} \cdot F\right) \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.6 \cdot 10^{-174}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 8000:\\
\;\;\;\;\frac{F}{B} \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{+184}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_1\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 15.8 |
|---|
| Cost | 13580 |
|---|
\[\begin{array}{l}
t_0 := \frac{F}{B} \cdot {\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{-176}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-170}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 22000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3.65 \cdot 10^{+183}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_1\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 25.5 |
|---|
| Cost | 7816 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -45000000000:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 27500:\\
\;\;\;\;\frac{F}{B} \cdot {\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{+180}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 25.6 |
|---|
| Cost | 7688 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0085:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 0.36:\\
\;\;\;\;\frac{-x}{B} + \sqrt{\frac{1}{2 + 2 \cdot x}} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{+180}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 29.3 |
|---|
| Cost | 7640 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{1}{B} - t_0\\
t_2 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-137}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-203}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{+32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{+180}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 28.5 |
|---|
| Cost | 7500 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{-136}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-229}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-35}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - t_0\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{+184}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 25.6 |
|---|
| Cost | 7496 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.6 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 0.62:\\
\;\;\;\;\frac{\sqrt{\frac{1}{2 \cdot x + 2}} \cdot F - x}{B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{+184}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 28.6 |
|---|
| Cost | 7376 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{1}{B} - t_0\\
\mathbf{if}\;F \leq -1.05 \cdot 10^{-136}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-201}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{+181}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 30.6 |
|---|
| Cost | 7244 |
|---|
\[\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.25 \cdot 10^{-136}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{-209}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-19}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 34.4 |
|---|
| Cost | 6856 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -5.8 \cdot 10^{-24}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-21}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 37.6 |
|---|
| Cost | 6724 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -2.85 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-81}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 40.3 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-81}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 40.3 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-81}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\]
| Alternative 19 |
|---|
| Error | 45.3 |
|---|
| Cost | 452 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\]
| Alternative 20 |
|---|
| Error | 50.2 |
|---|
| Cost | 256 |
|---|
\[\frac{x}{-B}
\]