Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\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}
\mathbf{if}\;F \leq -7.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 12500000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\
\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
(if (<= F -7.5e+21)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 12500000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ x (tan B)))
(- (/ 1.0 (sin B)) (/ x (/ (sin B) (cos B))))))) 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 tmp;
if (F <= -7.5e+21) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 12500000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / tan(B));
} else {
tmp = (1.0 / sin(B)) - (x / (sin(B) / cos(B)));
}
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) :: tmp
if (f <= (-7.5d+21)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 12500000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / tan(b))
else
tmp = (1.0d0 / sin(b)) - (x / (sin(b) / cos(b)))
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 tmp;
if (F <= -7.5e+21) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 12500000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / Math.tan(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / (Math.sin(B) / Math.cos(B)));
}
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):
tmp = 0
if F <= -7.5e+21:
tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B))
elif F <= 12500000.0:
tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / math.tan(B))
else:
tmp = (1.0 / math.sin(B)) - (x / (math.sin(B) / math.cos(B)))
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)
tmp = 0.0
if (F <= -7.5e+21)
tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B)));
elseif (F <= 12500000.0)
tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / tan(B)));
else
tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / Float64(sin(B) / cos(B))));
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)
tmp = 0.0;
if (F <= -7.5e+21)
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
elseif (F <= 12500000.0)
tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / tan(B));
else
tmp = (1.0 / sin(B)) - (x / (sin(B) / cos(B)));
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_] := If[LessEqual[F, -7.5e+21], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 12500000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;F \leq -7.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 12500000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\
\end{array}
Alternatives Alternative 1 Error 1.2 Cost 20552
\[\begin{array}{l}
\mathbf{if}\;F \leq -9.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-20}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\]
Alternative 2 Error 8.0 Cost 14480
\[\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-171}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-168}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-32}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\]
Alternative 3 Error 6.3 Cost 14480
\[\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 10^{-168}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-32}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\]
Alternative 4 Error 6.3 Cost 14480
\[\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1 \cdot 10^{-102}:\\
\;\;\;\;t_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 10^{-168}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\]
Alternative 5 Error 6.3 Cost 14480
\[\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{+21}:\\
\;\;\;\;t_1 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1 \cdot 10^{-102}:\\
\;\;\;\;t_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 10^{-168}:\\
\;\;\;\;t_1 + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\]
Alternative 6 Error 23.4 Cost 13844
\[\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{if}\;F \leq -7.7 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -8.8 \cdot 10^{-123}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 12200000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.6011810901602162 \cdot 10^{+109}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.5348602930244563 \cdot 10^{+181}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 7 Error 18.7 Cost 13844
\[\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -8.8 \cdot 10^{-123}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 12200000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.6011810901602162 \cdot 10^{+109}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.5348602930244563 \cdot 10^{+181}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 8 Error 11.0 Cost 13644
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -8.8 \cdot 10^{-123}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-17}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
Alternative 9 Error 11.0 Cost 13644
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -8.8 \cdot 10^{-123}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-17}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\]
Alternative 10 Error 29.7 Cost 7636
\[\begin{array}{l}
t_0 := \frac{-1}{\frac{\tan B}{x}} + \frac{-1}{B}\\
t_1 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -7.7 \cdot 10^{-16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-124}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 12200000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.6011810901602162 \cdot 10^{+109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 2.652142846827889 \cdot 10^{+186}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 11 Error 29.7 Cost 7636
\[\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{-1}{\frac{\tan B}{x}} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -7.7 \cdot 10^{-16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-124}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 12200000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.6011810901602162 \cdot 10^{+109}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.652142846827889 \cdot 10^{+186}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 12 Error 30.7 Cost 7240
\[\begin{array}{l}
t_0 := \frac{-1}{\frac{\tan B}{x}} + \frac{-1}{B}\\
\mathbf{if}\;x \leq -5.860745021609714 \cdot 10^{-131}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.821847386013864 \cdot 10^{-123}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 13 Error 35.8 Cost 6856
\[\begin{array}{l}
\mathbf{if}\;F \leq -6.4 \cdot 10^{-84}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 12500000:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\]
Alternative 14 Error 38.5 Cost 6724
\[\begin{array}{l}
\mathbf{if}\;F \leq -6.4 \cdot 10^{-84}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} - x}{B}\\
\end{array}
\]
Alternative 15 Error 40.3 Cost 1220
\[\begin{array}{l}
\mathbf{if}\;F \leq -8 \cdot 10^{-101}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} - x}{B}\\
\end{array}
\]
Alternative 16 Error 40.0 Cost 1220
\[\begin{array}{l}
t_0 := \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;F \leq -5 \cdot 10^{-123}:\\
\;\;\;\;\frac{\frac{F}{-0.5 \cdot t_0 - F} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot t_0} - x}{B}\\
\end{array}
\]
Alternative 17 Error 48.6 Cost 584
\[\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;x \leq -1.4055324728939558 \cdot 10^{-95}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 6.307687634846034 \cdot 10^{-49}:\\
\;\;\;\;-1 + \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 18 Error 43.3 Cost 584
\[\begin{array}{l}
\mathbf{if}\;F \leq -6.4 \cdot 10^{-84}:\\
\;\;\;\;-1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-137}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\]
Alternative 19 Error 40.7 Cost 584
\[\begin{array}{l}
\mathbf{if}\;F \leq -8 \cdot 10^{-101}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-137}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\]
Alternative 20 Error 48.3 Cost 388
\[\begin{array}{l}
\mathbf{if}\;F \leq -8 \cdot 10^{-101}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\]
Alternative 21 Error 57.1 Cost 192
\[\frac{-1}{B}
\]