
(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 23 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 -126000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 54000000.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 <= -126000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 54000000.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 <= (-126000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 54000000.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 <= -126000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 54000000.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 <= -126000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 54000000.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 <= -126000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 54000000.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 <= -126000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 54000000.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, -126000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 54000000.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 -126000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 54000000:\\
\;\;\;\;\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
(if (<= F -1.0)
(- (/ F (* (sin B) (- (/ -1.0 F) F))) (* x (/ 1.0 (tan B))))
(if (<= F 1.4)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.0) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B)));
} else if (F <= 1.4) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (x / tan(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.0d0)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - (x * (1.0d0 / tan(b)))
else if (f <= 1.4d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.0) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.4) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.0: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / math.tan(B))) elif F <= 1.4: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.0) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.4) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.0) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B))); elseif (F <= 1.4) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -0.92)
(- (/ F (* (sin B) (- (/ -1.0 F) F))) (* x (/ 1.0 (tan B))))
(if (<= F 1.7)
(+ (* x (/ -1.0 (tan B))) (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.92) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B)));
} else if (F <= 1.7) {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (x / tan(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 <= (-0.92d0)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - (x * (1.0d0 / tan(b)))
else if (f <= 1.7d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.92) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.7) {
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)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.92: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / math.tan(B))) elif F <= 1.7: 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)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.92) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.7) 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)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.92) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B))); elseif (F <= 1.7) tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.92], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7], 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] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.92:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.7:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -0.92)
(- (/ F (* (sin B) (- (/ -1.0 F) F))) (* x (/ 1.0 (tan B))))
(if (<= F 1.4)
(+ (* x (/ -1.0 (tan B))) (/ (* F (sqrt 0.5)) (sin B)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.92) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B)));
} else if (F <= 1.4) {
tmp = (x * (-1.0 / tan(B))) + ((F * sqrt(0.5)) / sin(B));
} else {
tmp = (1.0 / sin(B)) - (x / tan(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 <= (-0.92d0)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - (x * (1.0d0 / tan(b)))
else if (f <= 1.4d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f * sqrt(0.5d0)) / sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.92) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.4) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F * Math.sqrt(0.5)) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.92: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / math.tan(B))) elif F <= 1.4: tmp = (x * (-1.0 / math.tan(B))) + ((F * math.sqrt(0.5)) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.92) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.4) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F * sqrt(0.5)) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.92) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B))); elseif (F <= 1.4) tmp = (x * (-1.0 / tan(B))) + ((F * sqrt(0.5)) / sin(B)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.92], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.92:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -0.062)
(- (/ F (* (sin B) (- (/ -1.0 F) F))) (* x (/ 1.0 (tan B))))
(if (<= F 1.02e-119)
(+ (* x (/ -1.0 (tan B))) (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)))
(if (<= F 0.000175)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.062) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B)));
} else if (F <= 1.02e-119) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else if (F <= 0.000175) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(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 <= (-0.062d0)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - (x * (1.0d0 / tan(b)))
else if (f <= 1.02d-119) then
tmp = (x * ((-1.0d0) / tan(b))) + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
else if (f <= 0.000175d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.062) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.02e-119) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else if (F <= 0.000175) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.062: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / math.tan(B))) elif F <= 1.02e-119: tmp = (x * (-1.0 / math.tan(B))) + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) elif F <= 0.000175: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.062) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.02e-119) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))); elseif (F <= 0.000175) 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(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.062) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B))); elseif (F <= 1.02e-119) tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); elseif (F <= 0.000175) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.062], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.02e-119], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.000175], 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[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.062:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{-119}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 0.000175:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(if (<= F -28.5)
(- (/ F (* (sin B) (- (/ -1.0 F) F))) (* x (/ 1.0 (tan B))))
(if (<= F 5.8e-118)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(if (<= F 0.000175)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 1.0 (sin B)) (/ x (tan B))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -28.5) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B)));
} else if (F <= 5.8e-118) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else if (F <= 0.000175) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(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 * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-28.5d0)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - (x * (1.0d0 / tan(b)))
else if (f <= 5.8d-118) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else if (f <= 0.000175d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -28.5) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / Math.tan(B)));
} else if (F <= 5.8e-118) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else if (F <= 0.000175) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) tmp = 0 if F <= -28.5: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / math.tan(B))) elif F <= 5.8e-118: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) elif F <= 0.000175: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -28.5) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 5.8e-118) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); elseif (F <= 0.000175) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -28.5) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B))); elseif (F <= 5.8e-118) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); elseif (F <= 0.000175) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -28.5], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.8e-118], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.000175], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -28.5:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-118}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 0.000175:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -0.115)
(- (/ F (* (sin B) (- (/ -1.0 F) F))) (* x (/ 1.0 (tan B))))
(if (<= F 0.000175)
(+ (* x (/ -1.0 (tan B))) (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.115) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B)));
} else if (F <= 0.000175) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / sin(B)) - (x / tan(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 <= (-0.115d0)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - (x * (1.0d0 / tan(b)))
else if (f <= 0.000175d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.115) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / Math.tan(B)));
} else if (F <= 0.000175) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.115: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / math.tan(B))) elif F <= 0.000175: tmp = (x * (-1.0 / math.tan(B))) + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.115) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 0.000175) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.115) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B))); elseif (F <= 0.000175) tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.115], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.000175], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.115:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 0.000175:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (<= F -1.3e-22) (- (/ -1.0 (sin B)) (/ x (tan B))) (+ (* x (/ -1.0 (tan B))) (/ F (* (sin B) (+ F (/ 1.0 F)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-22) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * (F + (1.0 / F))));
}
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.3d-22)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) * (f + (1.0d0 / f))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-22) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) * (F + (1.0 / F))));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-22: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) * (F + (1.0 / F)))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-22) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) * Float64(F + Float64(1.0 / F))))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e-22) tmp = (-1.0 / sin(B)) - (x / tan(B)); else tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * (F + (1.0 / F)))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \left(F + \frac{1}{F}\right)}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (<= F -1e-156) (- (/ F (* (sin B) (- (/ -1.0 F) F))) (* x (/ 1.0 (tan B)))) (+ (* x (/ -1.0 (tan B))) (/ F (* (sin B) (+ F (/ 1.0 F)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e-156) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B)));
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * (F + (1.0 / F))));
}
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 <= (-1d-156)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - (x * (1.0d0 / tan(b)))
else
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) * (f + (1.0d0 / f))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1e-156) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) * (F + (1.0 / F))));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e-156: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / math.tan(B))) else: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) * (F + (1.0 / F)))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e-156) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) * Float64(F + Float64(1.0 / F))))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1e-156) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - (x * (1.0 / tan(B))); else tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * (F + (1.0 / F)))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e-156], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{-156}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \left(F + \frac{1}{F}\right)}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.5e-14)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.8e-59)
(/ (* x (- (cos B))) (sin 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 <= -9.5e-14) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.8e-59) {
tmp = (x * -cos(B)) / sin(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 <= (-9.5d-14)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.8d-59) then
tmp = (x * -cos(b)) / sin(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 <= -9.5e-14) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.8e-59) {
tmp = (x * -Math.cos(B)) / Math.sin(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 <= -9.5e-14: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.8e-59: tmp = (x * -math.cos(B)) / math.sin(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 <= -9.5e-14) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.8e-59) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(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 <= -9.5e-14) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.8e-59) tmp = (x * -cos(B)) / sin(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, -9.5e-14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.8e-59], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[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 -9.5 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-59}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -72000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.2e-65)
(/ (- x) (/ (sin B) (cos B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -72000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.2e-65) {
tmp = -x / (sin(B) / cos(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (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 <= (-72000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.2d-65) then
tmp = -x / (sin(b) / cos(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -72000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.2e-65) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -72000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.2e-65: tmp = -x / (math.sin(B) / math.cos(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -72000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.2e-65) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -72000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.2e-65) tmp = -x / (sin(B) / cos(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -72000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-65], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -72000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-65}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -72000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 5.4e-64)
(/ (* x (- (cos B))) (sin B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -72000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.4e-64) {
tmp = (x * -cos(B)) / sin(B);
} else {
tmp = (x * (-1.0 / tan(B))) + (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 <= (-72000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.4d-64) then
tmp = (x * -cos(b)) / sin(b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -72000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.4e-64) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -72000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.4e-64: tmp = (x * -math.cos(B)) / math.sin(B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -72000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.4e-64) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -72000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.4e-64) tmp = (x * -cos(B)) / sin(B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -72000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.4e-64], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -72000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-64}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -8.2e-14)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 8.5e-65)
(/ (* x (- (cos B))) (sin B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-14) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 8.5e-65) {
tmp = (x * -cos(B)) / sin(B);
} else {
tmp = (x * (-1.0 / tan(B))) + (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 <= (-8.2d-14)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 8.5d-65) then
tmp = (x * -cos(b)) / sin(b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-14) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 8.5e-65) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.2e-14: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 8.5e-65: tmp = (x * -math.cos(B)) / math.sin(B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.2e-14) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 8.5e-65) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.2e-14) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 8.5e-65) tmp = (x * -cos(B)) / sin(B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.2e-14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-65], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.2 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-65}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(if (<= F -1850.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -9e-157)
(- t_0 (/ x B))
(if (<= F 3.4e-251)
(- (* (/ 1.0 F) (/ F B)) (* x (/ 1.0 (tan B))))
(if (<= F 1.6e-60)
(- t_0 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -1850.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -9e-157) {
tmp = t_0 - (x / B);
} else if (F <= 3.4e-251) {
tmp = ((1.0 / F) * (F / B)) - (x * (1.0 / tan(B)));
} else if (F <= 1.6e-60) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (x * (-1.0 / tan(B))) + (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) :: t_0
real(8) :: tmp
t_0 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
if (f <= (-1850.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-9d-157)) then
tmp = t_0 - (x / b)
else if (f <= 3.4d-251) then
tmp = ((1.0d0 / f) * (f / b)) - (x * (1.0d0 / tan(b)))
else if (f <= 1.6d-60) then
tmp = t_0 - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -1850.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -9e-157) {
tmp = t_0 - (x / B);
} else if (F <= 3.4e-251) {
tmp = ((1.0 / F) * (F / B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.6e-60) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) tmp = 0 if F <= -1850.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -9e-157: tmp = t_0 - (x / B) elif F <= 3.4e-251: tmp = ((1.0 / F) * (F / B)) - (x * (1.0 / math.tan(B))) elif F <= 1.6e-60: tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) tmp = 0.0 if (F <= -1850.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -9e-157) tmp = Float64(t_0 - Float64(x / B)); elseif (F <= 3.4e-251) tmp = Float64(Float64(Float64(1.0 / F) * Float64(F / B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.6e-60) tmp = Float64(t_0 - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); tmp = 0.0; if (F <= -1850.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -9e-157) tmp = t_0 - (x / B); elseif (F <= 3.4e-251) tmp = ((1.0 / F) * (F / B)) - (x * (1.0 / tan(B))); elseif (F <= 1.6e-60) tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = 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]}, If[LessEqual[F, -1850.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9e-157], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-251], N[(N[(N[(1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e-60], N[(t$95$0 - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{if}\;F \leq -1850:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9 \cdot 10^{-157}:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-251}:\\
\;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-60}:\\
\;\;\;\;t_0 - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))))
(if (<= F -210.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.44e-157)
t_0
(if (<= F 2.2e-261)
(- (* (/ 1.0 F) (/ F B)) (* x (/ 1.0 (tan B))))
(if (<= F 3.7e-60) t_0 (+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -210.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.44e-157) {
tmp = t_0;
} else if (F <= 2.2e-261) {
tmp = ((1.0 / F) * (F / B)) - (x * (1.0 / tan(B)));
} else if (F <= 3.7e-60) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (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) :: t_0
real(8) :: tmp
t_0 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
if (f <= (-210.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.44d-157)) then
tmp = t_0
else if (f <= 2.2d-261) then
tmp = ((1.0d0 / f) * (f / b)) - (x * (1.0d0 / tan(b)))
else if (f <= 3.7d-60) then
tmp = t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -210.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.44e-157) {
tmp = t_0;
} else if (F <= 2.2e-261) {
tmp = ((1.0 / F) * (F / B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 3.7e-60) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) tmp = 0 if F <= -210.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.44e-157: tmp = t_0 elif F <= 2.2e-261: tmp = ((1.0 / F) * (F / B)) - (x * (1.0 / math.tan(B))) elif F <= 3.7e-60: tmp = t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) tmp = 0.0 if (F <= -210.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.44e-157) tmp = t_0; elseif (F <= 2.2e-261) tmp = Float64(Float64(Float64(1.0 / F) * Float64(F / B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 3.7e-60) tmp = t_0; else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); tmp = 0.0; if (F <= -210.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.44e-157) tmp = t_0; elseif (F <= 2.2e-261) tmp = ((1.0 / F) * (F / B)) - (x * (1.0 / tan(B))); elseif (F <= 3.7e-60) tmp = t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = 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]}, If[LessEqual[F, -210.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.44e-157], t$95$0, If[LessEqual[F, 2.2e-261], N[(N[(N[(1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-60], t$95$0, N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -210:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.44 \cdot 10^{-157}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-261}:\\
\;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-60}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -4.8e+67)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.4e-251)
(- (* (/ F B) (/ -1.0 F)) (* x (/ 1.0 (tan B))))
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e+67) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.4e-251) {
tmp = ((F / B) * (-1.0 / F)) - (x * (1.0 / tan(B)));
} else {
tmp = (1.0 / B) - (x / tan(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.8d+67)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.4d-251) then
tmp = ((f / b) * ((-1.0d0) / f)) - (x * (1.0d0 / tan(b)))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e+67) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.4e-251) {
tmp = ((F / B) * (-1.0 / F)) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.8e+67: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.4e-251: tmp = ((F / B) * (-1.0 / F)) - (x * (1.0 / math.tan(B))) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.8e+67) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.4e-251) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.8e+67) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.4e-251) tmp = ((F / B) * (-1.0 / F)) - (x * (1.0 / tan(B))); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.8e+67], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-251], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-251}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (<= F -230000000.0) (/ (- -1.0 x) B) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -230000000.0) {
tmp = (-1.0 - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(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 <= (-230000000.0d0)) then
tmp = ((-1.0d0) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -230000000.0) {
tmp = (-1.0 - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -230000000.0: tmp = (-1.0 - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -230000000.0) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -230000000.0) tmp = (-1.0 - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -230000000.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -230000000:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (<= F -72000000.0) (- (/ -1.0 (sin B)) (/ x B)) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -72000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(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 <= (-72000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -72000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -72000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -72000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -72000000.0) tmp = (-1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -72000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -72000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -9e-16)
(/ (- -1.0 x) B)
(if (<= F 1.2e-35)
(- (/ (- x) B) (* -0.3333333333333333 (* B x)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e-16) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.2e-35) {
tmp = (-x / B) - (-0.3333333333333333 * (B * x));
} 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 <= (-9d-16)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.2d-35) then
tmp = (-x / b) - ((-0.3333333333333333d0) * (b * x))
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 <= -9e-16) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.2e-35) {
tmp = (-x / B) - (-0.3333333333333333 * (B * x));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e-16: tmp = (-1.0 - x) / B elif F <= 1.2e-35: tmp = (-x / B) - (-0.3333333333333333 * (B * x)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e-16) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.2e-35) tmp = Float64(Float64(Float64(-x) / B) - Float64(-0.3333333333333333 * Float64(B * x))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9e-16) tmp = (-1.0 - x) / B; elseif (F <= 1.2e-35) tmp = (-x / B) - (-0.3333333333333333 * (B * x)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e-16], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.2e-35], N[(N[((-x) / B), $MachinePrecision] - N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-35}:\\
\;\;\;\;\frac{-x}{B} - -0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -8.5e-23)
(/ (- -1.0 x) B)
(if (<= F 3e-39)
(* x (+ (* B 0.3333333333333333) (/ -1.0 B)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-23) {
tmp = (-1.0 - x) / B;
} else if (F <= 3e-39) {
tmp = x * ((B * 0.3333333333333333) + (-1.0 / 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 <= (-8.5d-23)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3d-39) then
tmp = x * ((b * 0.3333333333333333d0) + ((-1.0d0) / 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 <= -8.5e-23) {
tmp = (-1.0 - x) / B;
} else if (F <= 3e-39) {
tmp = x * ((B * 0.3333333333333333) + (-1.0 / B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-23: tmp = (-1.0 - x) / B elif F <= 3e-39: tmp = x * ((B * 0.3333333333333333) + (-1.0 / B)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-23) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3e-39) tmp = Float64(x * Float64(Float64(B * 0.3333333333333333) + Float64(-1.0 / 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 <= -8.5e-23) tmp = (-1.0 - x) / B; elseif (F <= 3e-39) tmp = x * ((B * 0.3333333333333333) + (-1.0 / B)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-23], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3e-39], N[(x * N[(N[(B * 0.3333333333333333), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-39}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333 + \frac{-1}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (if (<= F -2.3e-182) (/ (- -1.0 x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-182) {
tmp = (-1.0 - 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.3d-182)) then
tmp = ((-1.0d0) - 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.3e-182) {
tmp = (-1.0 - x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.3e-182: tmp = (-1.0 - x) / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.3e-182) tmp = Float64(Float64(-1.0 - 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.3e-182) tmp = (-1.0 - x) / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.3e-182], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-182}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
(FPCore (F B x) :precision binary64 (/ (- 1.0 x) B))
double code(double F, double B, double x) {
return (1.0 - x) / 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 - x) / b
end function
public static double code(double F, double B, double x) {
return (1.0 - x) / B;
}
def code(F, B, x): return (1.0 - x) / B
function code(F, B, x) return Float64(Float64(1.0 - x) / B) end
function tmp = code(F, B, x) tmp = (1.0 - x) / B; end
code[F_, B_, x_] := N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1 - x}{B}
\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 2023343
(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))))))