
(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))))))
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)));
}
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
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)));
}
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)))
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 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
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]
\begin{array}{l}
\\
\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)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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))))))
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)));
}
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
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)));
}
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)))
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 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
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]
\begin{array}{l}
\\
\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)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.5e+62)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 58000000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.5e+62) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 58000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -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
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.5d+62)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 58000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-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) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.5e+62) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 58000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.5e+62: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 58000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.5e+62) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 58000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.5e+62) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 58000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.5e+62], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 58000000.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] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.5 \cdot 10^{+62}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 58000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.3)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.36)
(+ (* x (/ -1.0 (tan B))) (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.3) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.36) {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.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
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.3d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.36d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.3) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.36) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.3: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.36: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.3) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.36) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.3) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.36) tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.3], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.36], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.3:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.36:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(t_1 (/ 1.0 (sin B)))
(t_2 (- (* (* F t_1) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B)))
(t_3 (/ x (tan B))))
(if (<= F -0.00019)
(- (/ -1.0 (sin B)) t_3)
(if (<= F -4.15e-32)
t_2
(if (<= F 3.8e-76)
t_0
(if (<= F 6.6e-31) t_2 (if (<= F 26500000.0) t_0 (- t_1 t_3))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
double t_1 = 1.0 / sin(B);
double t_2 = ((F * t_1) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_3 = x / tan(B);
double tmp;
if (F <= -0.00019) {
tmp = (-1.0 / sin(B)) - t_3;
} else if (F <= -4.15e-32) {
tmp = t_2;
} else if (F <= 3.8e-76) {
tmp = t_0;
} else if (F <= 6.6e-31) {
tmp = t_2;
} else if (F <= 26500000.0) {
tmp = t_0;
} else {
tmp = t_1 - t_3;
}
return tmp;
}
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
t_1 = 1.0d0 / sin(b)
t_2 = ((f * t_1) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
t_3 = x / tan(b)
if (f <= (-0.00019d0)) then
tmp = ((-1.0d0) / sin(b)) - t_3
else if (f <= (-4.15d-32)) then
tmp = t_2
else if (f <= 3.8d-76) then
tmp = t_0
else if (f <= 6.6d-31) then
tmp = t_2
else if (f <= 26500000.0d0) then
tmp = t_0
else
tmp = t_1 - t_3
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
double t_1 = 1.0 / Math.sin(B);
double t_2 = ((F * t_1) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_3 = x / Math.tan(B);
double tmp;
if (F <= -0.00019) {
tmp = (-1.0 / Math.sin(B)) - t_3;
} else if (F <= -4.15e-32) {
tmp = t_2;
} else if (F <= 3.8e-76) {
tmp = t_0;
} else if (F <= 6.6e-31) {
tmp = t_2;
} else if (F <= 26500000.0) {
tmp = t_0;
} else {
tmp = t_1 - t_3;
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) t_1 = 1.0 / math.sin(B) t_2 = ((F * t_1) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) t_3 = x / math.tan(B) tmp = 0 if F <= -0.00019: tmp = (-1.0 / math.sin(B)) - t_3 elif F <= -4.15e-32: tmp = t_2 elif F <= 3.8e-76: tmp = t_0 elif F <= 6.6e-31: tmp = t_2 elif F <= 26500000.0: tmp = t_0 else: tmp = t_1 - t_3 return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))) t_1 = Float64(1.0 / sin(B)) t_2 = Float64(Float64(Float64(F * t_1) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_3 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.00019) tmp = Float64(Float64(-1.0 / sin(B)) - t_3); elseif (F <= -4.15e-32) tmp = t_2; elseif (F <= 3.8e-76) tmp = t_0; elseif (F <= 6.6e-31) tmp = t_2; elseif (F <= 26500000.0) tmp = t_0; else tmp = Float64(t_1 - t_3); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)); t_1 = 1.0 / sin(B); t_2 = ((F * t_1) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); t_3 = x / tan(B); tmp = 0.0; if (F <= -0.00019) tmp = (-1.0 / sin(B)) - t_3; elseif (F <= -4.15e-32) tmp = t_2; elseif (F <= 3.8e-76) tmp = t_0; elseif (F <= 6.6e-31) tmp = t_2; elseif (F <= 26500000.0) tmp = t_0; else tmp = t_1 - t_3; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(F * t$95$1), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00019], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[F, -4.15e-32], t$95$2, If[LessEqual[F, 3.8e-76], t$95$0, If[LessEqual[F, 6.6e-31], t$95$2, If[LessEqual[F, 26500000.0], t$95$0, N[(t$95$1 - t$95$3), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
t_1 := \frac{1}{\sin B}\\
t_2 := \left(F \cdot t_1\right) \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
t_3 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00019:\\
\;\;\;\;\frac{-1}{\sin B} - t_3\\
\mathbf{elif}\;F \leq -4.15 \cdot 10^{-32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-76}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 26500000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 - t_3\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -0.0006)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -6e-84)
(- (* (* F t_0) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 1.1e-174)
(/ (- x) (tan B))
(if (<= F 26500000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ x B))
(- t_0 t_1)))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.0006) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -6e-84) {
tmp = ((F * t_0) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.1e-174) {
tmp = -x / tan(B);
} else if (F <= 26500000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = t_0 - t_1;
}
return tmp;
}
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) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-0.0006d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-6d-84)) then
tmp = ((f * t_0) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 1.1d-174) then
tmp = -x / tan(b)
else if (f <= 26500000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.0006) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -6e-84) {
tmp = ((F * t_0) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.1e-174) {
tmp = -x / Math.tan(B);
} else if (F <= 26500000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.0006: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -6e-84: tmp = ((F * t_0) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 1.1e-174: tmp = -x / math.tan(B) elif F <= 26500000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0006) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -6e-84) tmp = Float64(Float64(Float64(F * t_0) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 1.1e-174) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 26500000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.0006) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -6e-84) tmp = ((F * t_0) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 1.1e-174) tmp = -x / tan(B); elseif (F <= 26500000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0006], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -6e-84], N[(N[(N[(F * t$95$0), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e-174], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 26500000.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 / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0006:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -6 \cdot 10^{-84}:\\
\;\;\;\;\left(F \cdot t_0\right) \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-174}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 26500000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 - t_1\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B)))
(t_1 (- (* (* F t_0) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B)))
(t_2 (/ x (tan B))))
(if (<= F -5.5e-5)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -5.4e-83)
t_1
(if (<= F 9e-175)
(/ (- x) (tan B))
(if (<= F 0.022) t_1 (- t_0 t_2)))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = ((F * t_0) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_2 = x / tan(B);
double tmp;
if (F <= -5.5e-5) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -5.4e-83) {
tmp = t_1;
} else if (F <= 9e-175) {
tmp = -x / tan(B);
} else if (F <= 0.022) {
tmp = t_1;
} else {
tmp = t_0 - t_2;
}
return tmp;
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = ((f * t_0) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
t_2 = x / tan(b)
if (f <= (-5.5d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-5.4d-83)) then
tmp = t_1
else if (f <= 9d-175) then
tmp = -x / tan(b)
else if (f <= 0.022d0) then
tmp = t_1
else
tmp = t_0 - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = ((F * t_0) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -5.5e-5) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -5.4e-83) {
tmp = t_1;
} else if (F <= 9e-175) {
tmp = -x / Math.tan(B);
} else if (F <= 0.022) {
tmp = t_1;
} else {
tmp = t_0 - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = ((F * t_0) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) t_2 = x / math.tan(B) tmp = 0 if F <= -5.5e-5: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -5.4e-83: tmp = t_1 elif F <= 9e-175: tmp = -x / math.tan(B) elif F <= 0.022: tmp = t_1 else: tmp = t_0 - t_2 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(Float64(Float64(F * t_0) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.5e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -5.4e-83) tmp = t_1; elseif (F <= 9e-175) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.022) tmp = t_1; else tmp = Float64(t_0 - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = ((F * t_0) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); t_2 = x / tan(B); tmp = 0.0; if (F <= -5.5e-5) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -5.4e-83) tmp = t_1; elseif (F <= 9e-175) tmp = -x / tan(B); elseif (F <= 0.022) tmp = t_1; else tmp = t_0 - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F * t$95$0), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.5e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -5.4e-83], t$95$1, If[LessEqual[F, 9e-175], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.022], t$95$1, N[(t$95$0 - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \left(F \cdot t_0\right) \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t_2\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-83}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-175}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.022:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 - t_2\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B)))
(t_1 (- (* (* F (/ 1.0 (sin B))) (/ 1.0 F)) (/ x B))))
(if (<= F -7.2e-33)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 4.3e+18)
t_0
(if (<= F 5e+105)
t_1
(if (<= F 1.92e+164)
t_0
(if (<= F 1.85e+236) t_1 (/ (- x) (/ (sin B) (cos B))))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = ((F * (1.0 / sin(B))) * (1.0 / F)) - (x / B);
double tmp;
if (F <= -7.2e-33) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 4.3e+18) {
tmp = t_0;
} else if (F <= 5e+105) {
tmp = t_1;
} else if (F <= 1.92e+164) {
tmp = t_0;
} else if (F <= 1.85e+236) {
tmp = t_1;
} else {
tmp = -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
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = ((f * (1.0d0 / sin(b))) * (1.0d0 / f)) - (x / b)
if (f <= (-7.2d-33)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 4.3d+18) then
tmp = t_0
else if (f <= 5d+105) then
tmp = t_1
else if (f <= 1.92d+164) then
tmp = t_0
else if (f <= 1.85d+236) then
tmp = t_1
else
tmp = -x / (sin(b) / cos(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double t_1 = ((F * (1.0 / Math.sin(B))) * (1.0 / F)) - (x / B);
double tmp;
if (F <= -7.2e-33) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 4.3e+18) {
tmp = t_0;
} else if (F <= 5e+105) {
tmp = t_1;
} else if (F <= 1.92e+164) {
tmp = t_0;
} else if (F <= 1.85e+236) {
tmp = t_1;
} else {
tmp = -x / (Math.sin(B) / Math.cos(B));
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = ((F * (1.0 / math.sin(B))) * (1.0 / F)) - (x / B) tmp = 0 if F <= -7.2e-33: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 4.3e+18: tmp = t_0 elif F <= 5e+105: tmp = t_1 elif F <= 1.92e+164: tmp = t_0 elif F <= 1.85e+236: tmp = t_1 else: tmp = -x / (math.sin(B) / math.cos(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(Float64(Float64(F * Float64(1.0 / sin(B))) * Float64(1.0 / F)) - Float64(x / B)) tmp = 0.0 if (F <= -7.2e-33) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 4.3e+18) tmp = t_0; elseif (F <= 5e+105) tmp = t_1; elseif (F <= 1.92e+164) tmp = t_0; elseif (F <= 1.85e+236) tmp = t_1; else tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = ((F * (1.0 / sin(B))) * (1.0 / F)) - (x / B); tmp = 0.0; if (F <= -7.2e-33) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 4.3e+18) tmp = t_0; elseif (F <= 5e+105) tmp = t_1; elseif (F <= 1.92e+164) tmp = t_0; elseif (F <= 1.85e+236) tmp = t_1; else tmp = -x / (sin(B) / cos(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F * N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.2e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e+18], t$95$0, If[LessEqual[F, 5e+105], t$95$1, If[LessEqual[F, 1.92e+164], t$95$0, If[LessEqual[F, 1.85e+236], t$95$1, N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \left(F \cdot \frac{1}{\sin B}\right) \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{if}\;F \leq -7.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{+18}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.92 \cdot 10^{+164}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{+236}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.65e-34)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.5e-84) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.65e-34) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.5e-84) {
tmp = -x / tan(B);
} 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
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.65d-34)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.5d-84) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.65e-34) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.5e-84) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.65e-34: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.5e-84: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.65e-34) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.5e-84) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.65e-34) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.5e-84) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.65e-34], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.5e-84], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.65 \cdot 10^{-34}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ 1.0 (sin B)))))
(if (<= F -1.15)
(- (* t_0 (/ -1.0 F)) (/ x B))
(if (or (<= F 4.3e+18)
(not
(or (<= F 4.3e+105)
(and (not (<= F 1.92e+164)) (<= F 1.12e+236)))))
(/ (- x) (tan B))
(- (* t_0 (/ 1.0 F)) (/ x B))))))
double code(double F, double B, double x) {
double t_0 = F * (1.0 / sin(B));
double tmp;
if (F <= -1.15) {
tmp = (t_0 * (-1.0 / F)) - (x / B);
} else if ((F <= 4.3e+18) || !((F <= 4.3e+105) || (!(F <= 1.92e+164) && (F <= 1.12e+236)))) {
tmp = -x / tan(B);
} else {
tmp = (t_0 * (1.0 / F)) - (x / 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
real(8) :: t_0
real(8) :: tmp
t_0 = f * (1.0d0 / sin(b))
if (f <= (-1.15d0)) then
tmp = (t_0 * ((-1.0d0) / f)) - (x / b)
else if ((f <= 4.3d+18) .or. (.not. (f <= 4.3d+105) .or. (.not. (f <= 1.92d+164)) .and. (f <= 1.12d+236))) then
tmp = -x / tan(b)
else
tmp = (t_0 * (1.0d0 / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (1.0 / Math.sin(B));
double tmp;
if (F <= -1.15) {
tmp = (t_0 * (-1.0 / F)) - (x / B);
} else if ((F <= 4.3e+18) || !((F <= 4.3e+105) || (!(F <= 1.92e+164) && (F <= 1.12e+236)))) {
tmp = -x / Math.tan(B);
} else {
tmp = (t_0 * (1.0 / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F * (1.0 / math.sin(B)) tmp = 0 if F <= -1.15: tmp = (t_0 * (-1.0 / F)) - (x / B) elif (F <= 4.3e+18) or not ((F <= 4.3e+105) or (not (F <= 1.92e+164) and (F <= 1.12e+236))): tmp = -x / math.tan(B) else: tmp = (t_0 * (1.0 / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F * Float64(1.0 / sin(B))) tmp = 0.0 if (F <= -1.15) tmp = Float64(Float64(t_0 * Float64(-1.0 / F)) - Float64(x / B)); elseif ((F <= 4.3e+18) || !((F <= 4.3e+105) || (!(F <= 1.92e+164) && (F <= 1.12e+236)))) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(t_0 * Float64(1.0 / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (1.0 / sin(B)); tmp = 0.0; if (F <= -1.15) tmp = (t_0 * (-1.0 / F)) - (x / B); elseif ((F <= 4.3e+18) || ~(((F <= 4.3e+105) || (~((F <= 1.92e+164)) && (F <= 1.12e+236))))) tmp = -x / tan(B); else tmp = (t_0 * (1.0 / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.15], N[(N[(t$95$0 * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 4.3e+18], N[Not[Or[LessEqual[F, 4.3e+105], And[N[Not[LessEqual[F, 1.92e+164]], $MachinePrecision], LessEqual[F, 1.12e+236]]]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -1.15:\\
\;\;\;\;t_0 \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{+18} \lor \neg \left(F \leq 4.3 \cdot 10^{+105} \lor \neg \left(F \leq 1.92 \cdot 10^{+164}\right) \land F \leq 1.12 \cdot 10^{+236}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{1}{F} - \frac{x}{B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (or (<= x -5.8e-126) (not (<= x 3.55e-186))) (/ (- x) (tan B)) (- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5.8e-126) || !(x <= 3.55e-186)) {
tmp = -x / tan(B);
} else {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / 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
real(8) :: tmp
if ((x <= (-5.8d-126)) .or. (.not. (x <= 3.55d-186))) then
tmp = -x / tan(b)
else
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -5.8e-126) || !(x <= 3.55e-186)) {
tmp = -x / Math.tan(B);
} else {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5.8e-126) or not (x <= 3.55e-186): tmp = -x / math.tan(B) else: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5.8e-126) || !(x <= 3.55e-186)) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -5.8e-126) || ~((x <= 3.55e-186))) tmp = -x / tan(B); else tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5.8e-126], N[Not[LessEqual[x, 3.55e-186]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-126} \lor \neg \left(x \leq 3.55 \cdot 10^{-186}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -1.15)
(- (* (* F (/ 1.0 (sin B))) (/ -1.0 F)) (/ x B))
(if (or (<= F 4.6e+18) (not (<= F 3.25e+237)))
(/ (- x) (tan B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15) {
tmp = ((F * (1.0 / sin(B))) * (-1.0 / F)) - (x / B);
} else if ((F <= 4.6e+18) || !(F <= 3.25e+237)) {
tmp = -x / tan(B);
} else {
tmp = (1.0 - x) / 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
real(8) :: tmp
if (f <= (-1.15d0)) then
tmp = ((f * (1.0d0 / sin(b))) * ((-1.0d0) / f)) - (x / b)
else if ((f <= 4.6d+18) .or. (.not. (f <= 3.25d+237))) then
tmp = -x / tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.15) {
tmp = ((F * (1.0 / Math.sin(B))) * (-1.0 / F)) - (x / B);
} else if ((F <= 4.6e+18) || !(F <= 3.25e+237)) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15: tmp = ((F * (1.0 / math.sin(B))) * (-1.0 / F)) - (x / B) elif (F <= 4.6e+18) or not (F <= 3.25e+237): tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15) tmp = Float64(Float64(Float64(F * Float64(1.0 / sin(B))) * Float64(-1.0 / F)) - Float64(x / B)); elseif ((F <= 4.6e+18) || !(F <= 3.25e+237)) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15) tmp = ((F * (1.0 / sin(B))) * (-1.0 / F)) - (x / B); elseif ((F <= 4.6e+18) || ~((F <= 3.25e+237))) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15], N[(N[(N[(F * N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 4.6e+18], N[Not[LessEqual[F, 3.25e+237]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15:\\
\;\;\;\;\left(F \cdot \frac{1}{\sin B}\right) \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{+18} \lor \neg \left(F \leq 3.25 \cdot 10^{+237}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (or (<= x -5.8e-126) (not (<= x 2.55e-185))) (/ (- x) (tan B)) (/ (- (* F (sqrt 0.5)) x) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5.8e-126) || !(x <= 2.55e-185)) {
tmp = -x / tan(B);
} else {
tmp = ((F * sqrt(0.5)) - x) / 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
real(8) :: tmp
if ((x <= (-5.8d-126)) .or. (.not. (x <= 2.55d-185))) then
tmp = -x / tan(b)
else
tmp = ((f * sqrt(0.5d0)) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -5.8e-126) || !(x <= 2.55e-185)) {
tmp = -x / Math.tan(B);
} else {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5.8e-126) or not (x <= 2.55e-185): tmp = -x / math.tan(B) else: tmp = ((F * math.sqrt(0.5)) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5.8e-126) || !(x <= 2.55e-185)) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -5.8e-126) || ~((x <= 2.55e-185))) tmp = -x / tan(B); else tmp = ((F * sqrt(0.5)) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5.8e-126], N[Not[LessEqual[x, 2.55e-185]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-126} \lor \neg \left(x \leq 2.55 \cdot 10^{-185}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -1.18e+61)
(- (- (/ -1.0 B) (* B 0.16666666666666666)) (/ x B))
(if (or (<= F 5.2e+18) (not (<= F 5.8e+236)))
(/ (- x) (tan B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.18e+61) {
tmp = ((-1.0 / B) - (B * 0.16666666666666666)) - (x / B);
} else if ((F <= 5.2e+18) || !(F <= 5.8e+236)) {
tmp = -x / tan(B);
} else {
tmp = (1.0 - x) / 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
real(8) :: tmp
if (f <= (-1.18d+61)) then
tmp = (((-1.0d0) / b) - (b * 0.16666666666666666d0)) - (x / b)
else if ((f <= 5.2d+18) .or. (.not. (f <= 5.8d+236))) then
tmp = -x / tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.18e+61) {
tmp = ((-1.0 / B) - (B * 0.16666666666666666)) - (x / B);
} else if ((F <= 5.2e+18) || !(F <= 5.8e+236)) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.18e+61: tmp = ((-1.0 / B) - (B * 0.16666666666666666)) - (x / B) elif (F <= 5.2e+18) or not (F <= 5.8e+236): tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.18e+61) tmp = Float64(Float64(Float64(-1.0 / B) - Float64(B * 0.16666666666666666)) - Float64(x / B)); elseif ((F <= 5.2e+18) || !(F <= 5.8e+236)) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.18e+61) tmp = ((-1.0 / B) - (B * 0.16666666666666666)) - (x / B); elseif ((F <= 5.2e+18) || ~((F <= 5.8e+236))) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.18e+61], N[(N[(N[(-1.0 / B), $MachinePrecision] - N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 5.2e+18], N[Not[LessEqual[F, 5.8e+236]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.18 \cdot 10^{+61}:\\
\;\;\;\;\left(\frac{-1}{B} - B \cdot 0.16666666666666666\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{+18} \lor \neg \left(F \leq 5.8 \cdot 10^{+236}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (or (<= x -3.3e-167) (not (<= x 6.4e-186))) (/ (- x) (tan B)) (/ F (/ B (sqrt 0.5)))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.3e-167) || !(x <= 6.4e-186)) {
tmp = -x / tan(B);
} else {
tmp = F / (B / sqrt(0.5));
}
return tmp;
}
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 ((x <= (-3.3d-167)) .or. (.not. (x <= 6.4d-186))) then
tmp = -x / tan(b)
else
tmp = f / (b / sqrt(0.5d0))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -3.3e-167) || !(x <= 6.4e-186)) {
tmp = -x / Math.tan(B);
} else {
tmp = F / (B / Math.sqrt(0.5));
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.3e-167) or not (x <= 6.4e-186): tmp = -x / math.tan(B) else: tmp = F / (B / math.sqrt(0.5)) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.3e-167) || !(x <= 6.4e-186)) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(F / Float64(B / sqrt(0.5))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -3.3e-167) || ~((x <= 6.4e-186))) tmp = -x / tan(B); else tmp = F / (B / sqrt(0.5)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.3e-167], N[Not[LessEqual[x, 6.4e-186]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-167} \lor \neg \left(x \leq 6.4 \cdot 10^{-186}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (or (<= x -7e-171) (not (<= x 2.1e-189))) (/ (- x) (tan B)) (/ (* F (sqrt 0.5)) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -7e-171) || !(x <= 2.1e-189)) {
tmp = -x / tan(B);
} else {
tmp = (F * sqrt(0.5)) / 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
real(8) :: tmp
if ((x <= (-7d-171)) .or. (.not. (x <= 2.1d-189))) then
tmp = -x / tan(b)
else
tmp = (f * sqrt(0.5d0)) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -7e-171) || !(x <= 2.1e-189)) {
tmp = -x / Math.tan(B);
} else {
tmp = (F * Math.sqrt(0.5)) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -7e-171) or not (x <= 2.1e-189): tmp = -x / math.tan(B) else: tmp = (F * math.sqrt(0.5)) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -7e-171) || !(x <= 2.1e-189)) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(F * sqrt(0.5)) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -7e-171) || ~((x <= 2.1e-189))) tmp = -x / tan(B); else tmp = (F * sqrt(0.5)) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -7e-171], N[Not[LessEqual[x, 2.1e-189]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{-171} \lor \neg \left(x \leq 2.1 \cdot 10^{-189}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -6.7e-49)
(/ (- -1.0 x) B)
(if (<= F 2.2e-40)
(- (* B (- (* x -0.16666666666666666) (* x -0.5))) (/ x B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.7e-49) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.2e-40) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = (1.0 - x) / 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
real(8) :: tmp
if (f <= (-6.7d-49)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.2d-40) then
tmp = (b * ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))) - (x / b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.7e-49) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.2e-40) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.7e-49: tmp = (-1.0 - x) / B elif F <= 2.2e-40: tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.7e-49) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.2e-40) tmp = Float64(Float64(B * Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))) - Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.7e-49) tmp = (-1.0 - x) / B; elseif (F <= 2.2e-40) tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.7e-49], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.2e-40], N[(N[(B * N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.7 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-40}:\\
\;\;\;\;B \cdot \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (<= F -2.4e+147) (/ -1.0 B) (if (<= F 2.5e-84) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e+147) {
tmp = -1.0 / B;
} else if (F <= 2.5e-84) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / 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
real(8) :: tmp
if (f <= (-2.4d+147)) then
tmp = (-1.0d0) / b
else if (f <= 2.5d-84) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e+147) {
tmp = -1.0 / B;
} else if (F <= 2.5e-84) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.4e+147: tmp = -1.0 / B elif F <= 2.5e-84: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.4e+147) tmp = Float64(-1.0 / B); elseif (F <= 2.5e-84) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.4e+147) tmp = -1.0 / B; elseif (F <= 2.5e-84) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.4e+147], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 2.5e-84], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{+147}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (<= F -1.4e-46) (/ (- -1.0 x) B) (if (<= F 7.6e-86) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-46) {
tmp = (-1.0 - x) / B;
} else if (F <= 7.6e-86) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / 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
real(8) :: tmp
if (f <= (-1.4d-46)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 7.6d-86) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-46) {
tmp = (-1.0 - x) / B;
} else if (F <= 7.6e-86) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4e-46: tmp = (-1.0 - x) / B elif F <= 7.6e-86: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4e-46) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 7.6e-86) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4e-46) tmp = (-1.0 - x) / B; elseif (F <= 7.6e-86) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4e-46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.6e-86], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{-86}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (or (<= x -3.75e-81) (not (<= x 4.2e-195))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.75e-81) || !(x <= 4.2e-195)) {
tmp = -x / B;
} else {
tmp = -1.0 / 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
real(8) :: tmp
if ((x <= (-3.75d-81)) .or. (.not. (x <= 4.2d-195))) then
tmp = -x / b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -3.75e-81) || !(x <= 4.2e-195)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.75e-81) or not (x <= 4.2e-195): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.75e-81) || !(x <= 4.2e-195)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -3.75e-81) || ~((x <= 4.2e-195))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.75e-81], N[Not[LessEqual[x, 4.2e-195]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.75 \cdot 10^{-81} \lor \neg \left(x \leq 4.2 \cdot 10^{-195}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (<= F 4.1e-60) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 4.1e-60) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / 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
real(8) :: tmp
if (f <= 4.1d-60) then
tmp = (-1.0d0) / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 4.1e-60) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 4.1e-60: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 4.1e-60) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 4.1e-60) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 4.1e-60], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 4.1 \cdot 10^{-60}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
herbie shell --seed 2024010
(FPCore (F B x)
:name "VandenBroeck and Keller, Equation (23)"
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))