VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.3% → 99.7%
Time: 24.0s
Alternatives: 36
Speedup: 1.5×

Specification

?
\[\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
 (+
  (- (* 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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 36 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 77.3% accurate, 1.0× speedup?

\[\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
 (+
  (- (* 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}

Alternative 1: 99.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -100000:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 100000000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\ \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 -100000.0)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 100000000.0)
       (-
        (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
        (/ (* 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 <= -100000.0) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 100000000.0) {
		tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((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 <= (-100000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 100000000.0d0) then
        tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - ((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 <= -100000.0) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 100000000.0) {
		tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((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 <= -100000.0:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 100000000.0:
		tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((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 <= -100000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 100000000.0)
		tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * 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 <= -100000.0)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 100000000.0)
		tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - ((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, -100000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.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[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $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 -100000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 2: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -150000000:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 112000000:\\ \;\;\;\;\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 -150000000.0)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 112000000.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 <= -150000000.0) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 112000000.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 <= (-150000000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 112000000.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 <= -150000000.0) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 112000000.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 <= -150000000.0:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 112000000.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 <= -150000000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 112000000.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 <= -150000000.0)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 112000000.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, -150000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 112000000.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 -150000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 112000000:\\
\;\;\;\;\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}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 3: 99.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.75:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{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 (tan B))))
   (if (<= F -1.4)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 1.75)
       (+
        (* x (/ -1.0 (tan B)))
        (* (/ F (sin B)) (sqrt (/ 1.0 (+ 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.4) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 1.75) {
		tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * sqrt((1.0 / (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.4d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 1.75d0) then
        tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * sqrt((1.0d0 / (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.4) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 1.75) {
		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)) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -1.4:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 1.75:
		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)) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1.4)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 1.75)
		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)) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -1.4)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 1.75)
		tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * sqrt((1.0 / (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.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.75], 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] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 1.75:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 4: 99.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.65:\\ \;\;\;\;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 (tan B))))
   (if (<= F -1.4)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 1.65)
       (+ (* 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.4) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 1.65) {
		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.4d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 1.65d0) 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.4) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 1.65) {
		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.4:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 1.65:
		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.4)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 1.65)
		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.4)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 1.65)
		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.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.65], 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.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 1.65:\\
\;\;\;\;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}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 5: 92.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -80000:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -5.7 \cdot 10^{-95}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.85 \cdot 10^{-121}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{2 + x \cdot 2}}\\ \mathbf{elif}\;F \leq 360:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0
         (-
          (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
          (/ x B)))
        (t_1 (/ x (tan B))))
   (if (<= F -80000.0)
     (- (/ -1.0 (sin B)) t_1)
     (if (<= F -5.7e-95)
       t_0
       (if (<= F 1.85e-121)
         (+ (* x (/ -1.0 (tan B))) (/ F (* B (sqrt (+ 2.0 (* x 2.0))))))
         (if (<= F 360.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
	double t_0 = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -80000.0) {
		tmp = (-1.0 / sin(B)) - t_1;
	} else if (F <= -5.7e-95) {
		tmp = t_0;
	} else if (F <= 1.85e-121) {
		tmp = (x * (-1.0 / tan(B))) + (F / (B * sqrt((2.0 + (x * 2.0)))));
	} else if (F <= 360.0) {
		tmp = t_0;
	} else {
		tmp = (1.0 / sin(B)) - 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 = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
    t_1 = x / tan(b)
    if (f <= (-80000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_1
    else if (f <= (-5.7d-95)) then
        tmp = t_0
    else if (f <= 1.85d-121) then
        tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * sqrt((2.0d0 + (x * 2.0d0)))))
    else if (f <= 360.0d0) then
        tmp = t_0
    else
        tmp = (1.0d0 / sin(b)) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -80000.0) {
		tmp = (-1.0 / Math.sin(B)) - t_1;
	} else if (F <= -5.7e-95) {
		tmp = t_0;
	} else if (F <= 1.85e-121) {
		tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * Math.sqrt((2.0 + (x * 2.0)))));
	} else if (F <= 360.0) {
		tmp = t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -80000.0:
		tmp = (-1.0 / math.sin(B)) - t_1
	elif F <= -5.7e-95:
		tmp = t_0
	elif F <= 1.85e-121:
		tmp = (x * (-1.0 / math.tan(B))) + (F / (B * math.sqrt((2.0 + (x * 2.0)))))
	elif F <= 360.0:
		tmp = t_0
	else:
		tmp = (1.0 / math.sin(B)) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -80000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_1);
	elseif (F <= -5.7e-95)
		tmp = t_0;
	elseif (F <= 1.85e-121)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0))))));
	elseif (F <= 360.0)
		tmp = t_0;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -80000.0)
		tmp = (-1.0 / sin(B)) - t_1;
	elseif (F <= -5.7e-95)
		tmp = t_0;
	elseif (F <= 1.85e-121)
		tmp = (x * (-1.0 / tan(B))) + (F / (B * sqrt((2.0 + (x * 2.0)))));
	elseif (F <= 360.0)
		tmp = t_0;
	else
		tmp = (1.0 / sin(B)) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$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]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -80000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -5.7e-95], t$95$0, If[LessEqual[F, 1.85e-121], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 360.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -80000:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\

\mathbf{elif}\;F \leq -5.7 \cdot 10^{-95}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq 1.85 \cdot 10^{-121}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{2 + x \cdot 2}}\\

\mathbf{elif}\;F \leq 360:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 6: 92.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\ t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ t_2 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -62000:\\ \;\;\;\;\frac{-1}{\sin B} - t_2\\ \mathbf{elif}\;F \leq -3.4 \cdot 10^{-97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.95 \cdot 10^{-121}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 230000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_2\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
        (t_1 (- (* (/ F (sin B)) t_0) (/ x B)))
        (t_2 (/ x (tan B))))
   (if (<= F -62000.0)
     (- (/ -1.0 (sin B)) t_2)
     (if (<= F -3.4e-97)
       t_1
       (if (<= F 1.95e-121)
         (+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
         (if (<= F 230000.0) t_1 (- (/ 1.0 (sin B)) t_2)))))))
double code(double F, double B, double x) {
	double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
	double t_1 = ((F / sin(B)) * t_0) - (x / B);
	double t_2 = x / tan(B);
	double tmp;
	if (F <= -62000.0) {
		tmp = (-1.0 / sin(B)) - t_2;
	} else if (F <= -3.4e-97) {
		tmp = t_1;
	} else if (F <= 1.95e-121) {
		tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
	} else if (F <= 230000.0) {
		tmp = t_1;
	} else {
		tmp = (1.0 / sin(B)) - 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 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
    t_1 = ((f / sin(b)) * t_0) - (x / b)
    t_2 = x / tan(b)
    if (f <= (-62000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_2
    else if (f <= (-3.4d-97)) then
        tmp = t_1
    else if (f <= 1.95d-121) then
        tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
    else if (f <= 230000.0d0) then
        tmp = t_1
    else
        tmp = (1.0d0 / sin(b)) - t_2
    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 t_1 = ((F / Math.sin(B)) * t_0) - (x / B);
	double t_2 = x / Math.tan(B);
	double tmp;
	if (F <= -62000.0) {
		tmp = (-1.0 / Math.sin(B)) - t_2;
	} else if (F <= -3.4e-97) {
		tmp = t_1;
	} else if (F <= 1.95e-121) {
		tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
	} else if (F <= 230000.0) {
		tmp = t_1;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_2;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)
	t_1 = ((F / math.sin(B)) * t_0) - (x / B)
	t_2 = x / math.tan(B)
	tmp = 0
	if F <= -62000.0:
		tmp = (-1.0 / math.sin(B)) - t_2
	elif F <= -3.4e-97:
		tmp = t_1
	elif F <= 1.95e-121:
		tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B))
	elif F <= 230000.0:
		tmp = t_1
	else:
		tmp = (1.0 / math.sin(B)) - t_2
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5
	t_1 = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B))
	t_2 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -62000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_2);
	elseif (F <= -3.4e-97)
		tmp = t_1;
	elseif (F <= 1.95e-121)
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B)));
	elseif (F <= 230000.0)
		tmp = t_1;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_2);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5;
	t_1 = ((F / sin(B)) * t_0) - (x / B);
	t_2 = x / tan(B);
	tmp = 0.0;
	if (F <= -62000.0)
		tmp = (-1.0 / sin(B)) - t_2;
	elseif (F <= -3.4e-97)
		tmp = t_1;
	elseif (F <= 1.95e-121)
		tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
	elseif (F <= 230000.0)
		tmp = t_1;
	else
		tmp = (1.0 / sin(B)) - t_2;
	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]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -62000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -3.4e-97], t$95$1, If[LessEqual[F, 1.95e-121], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 230000.0], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -62000:\\
\;\;\;\;\frac{-1}{\sin B} - t_2\\

\mathbf{elif}\;F \leq -3.4 \cdot 10^{-97}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;F \leq 1.95 \cdot 10^{-121}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\

\mathbf{elif}\;F \leq 230000:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_2\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 7: 92.1% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 + x \cdot 2\\ t_1 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{t_0}} - \frac{x}{B}\\ t_2 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.058:\\ \;\;\;\;\frac{-1}{\sin B} - t_2\\ \mathbf{elif}\;F \leq -5.5 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 2 \cdot 10^{-121}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{t_0}}\\ \mathbf{elif}\;F \leq 0.165:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_2\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (+ 2.0 (* x 2.0)))
        (t_1 (- (* (/ F (sin B)) (sqrt (/ 1.0 t_0))) (/ x B)))
        (t_2 (/ x (tan B))))
   (if (<= F -0.058)
     (- (/ -1.0 (sin B)) t_2)
     (if (<= F -5.5e-95)
       t_1
       (if (<= F 2e-121)
         (+ (* x (/ -1.0 (tan B))) (/ F (* B (sqrt t_0))))
         (if (<= F 0.165) t_1 (- (/ 1.0 (sin B)) t_2)))))))
double code(double F, double B, double x) {
	double t_0 = 2.0 + (x * 2.0);
	double t_1 = ((F / sin(B)) * sqrt((1.0 / t_0))) - (x / B);
	double t_2 = x / tan(B);
	double tmp;
	if (F <= -0.058) {
		tmp = (-1.0 / sin(B)) - t_2;
	} else if (F <= -5.5e-95) {
		tmp = t_1;
	} else if (F <= 2e-121) {
		tmp = (x * (-1.0 / tan(B))) + (F / (B * sqrt(t_0)));
	} else if (F <= 0.165) {
		tmp = t_1;
	} else {
		tmp = (1.0 / sin(B)) - 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 = 2.0d0 + (x * 2.0d0)
    t_1 = ((f / sin(b)) * sqrt((1.0d0 / t_0))) - (x / b)
    t_2 = x / tan(b)
    if (f <= (-0.058d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_2
    else if (f <= (-5.5d-95)) then
        tmp = t_1
    else if (f <= 2d-121) then
        tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * sqrt(t_0)))
    else if (f <= 0.165d0) then
        tmp = t_1
    else
        tmp = (1.0d0 / sin(b)) - t_2
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = 2.0 + (x * 2.0);
	double t_1 = ((F / Math.sin(B)) * Math.sqrt((1.0 / t_0))) - (x / B);
	double t_2 = x / Math.tan(B);
	double tmp;
	if (F <= -0.058) {
		tmp = (-1.0 / Math.sin(B)) - t_2;
	} else if (F <= -5.5e-95) {
		tmp = t_1;
	} else if (F <= 2e-121) {
		tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * Math.sqrt(t_0)));
	} else if (F <= 0.165) {
		tmp = t_1;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_2;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = 2.0 + (x * 2.0)
	t_1 = ((F / math.sin(B)) * math.sqrt((1.0 / t_0))) - (x / B)
	t_2 = x / math.tan(B)
	tmp = 0
	if F <= -0.058:
		tmp = (-1.0 / math.sin(B)) - t_2
	elif F <= -5.5e-95:
		tmp = t_1
	elif F <= 2e-121:
		tmp = (x * (-1.0 / math.tan(B))) + (F / (B * math.sqrt(t_0)))
	elif F <= 0.165:
		tmp = t_1
	else:
		tmp = (1.0 / math.sin(B)) - t_2
	return tmp
function code(F, B, x)
	t_0 = Float64(2.0 + Float64(x * 2.0))
	t_1 = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / t_0))) - Float64(x / B))
	t_2 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -0.058)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_2);
	elseif (F <= -5.5e-95)
		tmp = t_1;
	elseif (F <= 2e-121)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * sqrt(t_0))));
	elseif (F <= 0.165)
		tmp = t_1;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_2);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = 2.0 + (x * 2.0);
	t_1 = ((F / sin(B)) * sqrt((1.0 / t_0))) - (x / B);
	t_2 = x / tan(B);
	tmp = 0.0;
	if (F <= -0.058)
		tmp = (-1.0 / sin(B)) - t_2;
	elseif (F <= -5.5e-95)
		tmp = t_1;
	elseif (F <= 2e-121)
		tmp = (x * (-1.0 / tan(B))) + (F / (B * sqrt(t_0)));
	elseif (F <= 0.165)
		tmp = t_1;
	else
		tmp = (1.0 / sin(B)) - t_2;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.058], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -5.5e-95], t$95$1, If[LessEqual[F, 2e-121], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.165], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{t_0}} - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.058:\\
\;\;\;\;\frac{-1}{\sin B} - t_2\\

\mathbf{elif}\;F \leq -5.5 \cdot 10^{-95}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;F \leq 2 \cdot 10^{-121}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{t_0}}\\

\mathbf{elif}\;F \leq 0.165:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_2\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 8: 91.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{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 (tan B))))
   (if (<= F -4.5e-8)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 9.5e-26)
       (+ (* x (/ -1.0 (tan B))) (/ F (* 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 <= -4.5e-8) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 9.5e-26) {
		tmp = (x * (-1.0 / tan(B))) + (F / (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 <= (-4.5d-8)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 9.5d-26) then
        tmp = (x * ((-1.0d0) / tan(b))) + (f / (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 <= -4.5e-8) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 9.5e-26) {
		tmp = (x * (-1.0 / Math.tan(B))) + (F / (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 <= -4.5e-8:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 9.5e-26:
		tmp = (x * (-1.0 / math.tan(B))) + (F / (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 <= -4.5e-8)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 9.5e-26)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(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 <= -4.5e-8)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 9.5e-26)
		tmp = (x * (-1.0 / tan(B))) + (F / (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, -4.5e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9.5e-26], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * 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 -4.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 9.5 \cdot 10^{-26}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{2 + x \cdot 2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 9: 71.3% accurate, 1.5× speedup?

\[\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 -9 \cdot 10^{+270}:\\ \;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -175000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.6 \cdot 10^{-89}:\\ \;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.08 \cdot 10^{-173}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-26}:\\ \;\;\;\;t_0 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{+158}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{F \cdot 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 -9e+270)
     (- (/ F (* B (- (/ (- -1.0 x) F) F))) (/ x (tan B)))
     (if (<= F -175000.0)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F -3.6e-89)
         (- (* t_0 (/ F B)) (/ x B))
         (if (<= F 1.08e-173)
           (/ (* x (- (cos B))) (sin B))
           (if (<= F 9.5e-26)
             (- (* t_0 (+ (/ F B) (* 0.16666666666666666 (* F B)))) (/ x B))
             (if (<= F 1.3e+158)
               (- (/ 1.0 (sin B)) (/ x B))
               (+ (* x (/ -1.0 (tan B))) (/ F (* F 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 <= -9e+270) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / tan(B));
	} else if (F <= -175000.0) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= -3.6e-89) {
		tmp = (t_0 * (F / B)) - (x / B);
	} else if (F <= 1.08e-173) {
		tmp = (x * -cos(B)) / sin(B);
	} else if (F <= 9.5e-26) {
		tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
	} else if (F <= 1.3e+158) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (x * (-1.0 / tan(B))) + (F / (F * 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 <= (-9d+270)) then
        tmp = (f / (b * ((((-1.0d0) - x) / f) - f))) - (x / tan(b))
    else if (f <= (-175000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= (-3.6d-89)) then
        tmp = (t_0 * (f / b)) - (x / b)
    else if (f <= 1.08d-173) then
        tmp = (x * -cos(b)) / sin(b)
    else if (f <= 9.5d-26) then
        tmp = (t_0 * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
    else if (f <= 1.3d+158) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (x * ((-1.0d0) / tan(b))) + (f / (f * 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 <= -9e+270) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / Math.tan(B));
	} else if (F <= -175000.0) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= -3.6e-89) {
		tmp = (t_0 * (F / B)) - (x / B);
	} else if (F <= 1.08e-173) {
		tmp = (x * -Math.cos(B)) / Math.sin(B);
	} else if (F <= 9.5e-26) {
		tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
	} else if (F <= 1.3e+158) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (x * (-1.0 / Math.tan(B))) + (F / (F * 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 <= -9e+270:
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / math.tan(B))
	elif F <= -175000.0:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= -3.6e-89:
		tmp = (t_0 * (F / B)) - (x / B)
	elif F <= 1.08e-173:
		tmp = (x * -math.cos(B)) / math.sin(B)
	elif F <= 9.5e-26:
		tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B)
	elif F <= 1.3e+158:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (x * (-1.0 / math.tan(B))) + (F / (F * 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 <= -9e+270)
		tmp = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(x / tan(B)));
	elseif (F <= -175000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= -3.6e-89)
		tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B));
	elseif (F <= 1.08e-173)
		tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B));
	elseif (F <= 9.5e-26)
		tmp = Float64(Float64(t_0 * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B));
	elseif (F <= 1.3e+158)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(F * 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 <= -9e+270)
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / tan(B));
	elseif (F <= -175000.0)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= -3.6e-89)
		tmp = (t_0 * (F / B)) - (x / B);
	elseif (F <= 1.08e-173)
		tmp = (x * -cos(B)) / sin(B);
	elseif (F <= 9.5e-26)
		tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
	elseif (F <= 1.3e+158)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (x * (-1.0 / tan(B))) + (F / (F * 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, -9e+270], N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -175000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.6e-89], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.08e-173], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-26], N[(N[(t$95$0 * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e+158], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(F * 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 -9 \cdot 10^{+270}:\\
\;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{\tan B}\\

\mathbf{elif}\;F \leq -175000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -3.6 \cdot 10^{-89}:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.08 \cdot 10^{-173}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\

\mathbf{elif}\;F \leq 9.5 \cdot 10^{-26}:\\
\;\;\;\;t_0 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.3 \cdot 10^{+158}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{F \cdot B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 10: 84.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -22500:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -3.8 \cdot 10^{-88}:\\ \;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-65}:\\ \;\;\;\;\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
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -22500.0)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F -3.8e-88)
       (- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
       (if (<= F 3.7e-65)
         (/ (* 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 <= -22500.0) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= -3.8e-88) {
		tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
	} else if (F <= 3.7e-65) {
		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 <= (-22500.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= (-3.8d-88)) then
        tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
    else if (f <= 3.7d-65) 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 <= -22500.0) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= -3.8e-88) {
		tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
	} else if (F <= 3.7e-65) {
		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 <= -22500.0:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= -3.8e-88:
		tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B)
	elif F <= 3.7e-65:
		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 <= -22500.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= -3.8e-88)
		tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B));
	elseif (F <= 3.7e-65)
		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 <= -22500.0)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= -3.8e-88)
		tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B);
	elseif (F <= 3.7e-65)
		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, -22500.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.8e-88], 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, 3.7e-65], 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 -22500:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq -3.8 \cdot 10^{-88}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 3.7 \cdot 10^{-65}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 11: 77.4% accurate, 1.5× speedup?

\[\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 -22500:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -8 \cdot 10^{-91}:\\ \;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-174}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-26}:\\ \;\;\;\;t_0 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{+155}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{F \cdot 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 -22500.0)
     (- (/ -1.0 (sin B)) (/ x (tan B)))
     (if (<= F -8e-91)
       (- (* t_0 (/ F B)) (/ x B))
       (if (<= F 8.5e-174)
         (/ (* x (- (cos B))) (sin B))
         (if (<= F 9.5e-26)
           (- (* t_0 (+ (/ F B) (* 0.16666666666666666 (* F B)))) (/ x B))
           (if (<= F 2.9e+155)
             (- (/ 1.0 (sin B)) (/ x B))
             (+ (* x (/ -1.0 (tan B))) (/ F (* F 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 <= -22500.0) {
		tmp = (-1.0 / sin(B)) - (x / tan(B));
	} else if (F <= -8e-91) {
		tmp = (t_0 * (F / B)) - (x / B);
	} else if (F <= 8.5e-174) {
		tmp = (x * -cos(B)) / sin(B);
	} else if (F <= 9.5e-26) {
		tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
	} else if (F <= 2.9e+155) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (x * (-1.0 / tan(B))) + (F / (F * 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 <= (-22500.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
    else if (f <= (-8d-91)) then
        tmp = (t_0 * (f / b)) - (x / b)
    else if (f <= 8.5d-174) then
        tmp = (x * -cos(b)) / sin(b)
    else if (f <= 9.5d-26) then
        tmp = (t_0 * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
    else if (f <= 2.9d+155) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (x * ((-1.0d0) / tan(b))) + (f / (f * 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 <= -22500.0) {
		tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
	} else if (F <= -8e-91) {
		tmp = (t_0 * (F / B)) - (x / B);
	} else if (F <= 8.5e-174) {
		tmp = (x * -Math.cos(B)) / Math.sin(B);
	} else if (F <= 9.5e-26) {
		tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
	} else if (F <= 2.9e+155) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (x * (-1.0 / Math.tan(B))) + (F / (F * 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 <= -22500.0:
		tmp = (-1.0 / math.sin(B)) - (x / math.tan(B))
	elif F <= -8e-91:
		tmp = (t_0 * (F / B)) - (x / B)
	elif F <= 8.5e-174:
		tmp = (x * -math.cos(B)) / math.sin(B)
	elif F <= 9.5e-26:
		tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B)
	elif F <= 2.9e+155:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (x * (-1.0 / math.tan(B))) + (F / (F * 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 <= -22500.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B)));
	elseif (F <= -8e-91)
		tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B));
	elseif (F <= 8.5e-174)
		tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B));
	elseif (F <= 9.5e-26)
		tmp = Float64(Float64(t_0 * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B));
	elseif (F <= 2.9e+155)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(F * 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 <= -22500.0)
		tmp = (-1.0 / sin(B)) - (x / tan(B));
	elseif (F <= -8e-91)
		tmp = (t_0 * (F / B)) - (x / B);
	elseif (F <= 8.5e-174)
		tmp = (x * -cos(B)) / sin(B);
	elseif (F <= 9.5e-26)
		tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
	elseif (F <= 2.9e+155)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (x * (-1.0 / tan(B))) + (F / (F * 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, -22500.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8e-91], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-174], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-26], N[(N[(t$95$0 * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e+155], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(F * 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 -22500:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\

\mathbf{elif}\;F \leq -8 \cdot 10^{-91}:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 8.5 \cdot 10^{-174}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\

\mathbf{elif}\;F \leq 9.5 \cdot 10^{-26}:\\
\;\;\;\;t_0 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\

\mathbf{elif}\;F \leq 2.9 \cdot 10^{+155}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{F \cdot B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 12: 71.3% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{\tan B}\\ t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\ \mathbf{if}\;F \leq -4.5 \cdot 10^{+273}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -205000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -2.1 \cdot 10^{-90}:\\ \;\;\;\;t_1 \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.08 \cdot 10^{-173}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-26}:\\ \;\;\;\;t_1 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{+158}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{F \cdot B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (- (/ F (* B (- (/ (- -1.0 x) F) F))) (/ x (tan B))))
        (t_1 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
   (if (<= F -4.5e+273)
     t_0
     (if (<= F -205000.0)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F -2.1e-90)
         (- (* t_1 (/ F B)) (/ x B))
         (if (<= F 1.08e-173)
           t_0
           (if (<= F 9.5e-26)
             (- (* t_1 (+ (/ F B) (* 0.16666666666666666 (* F B)))) (/ x B))
             (if (<= F 1.75e+158)
               (- (/ 1.0 (sin B)) (/ x B))
               (+ (* x (/ -1.0 (tan B))) (/ F (* F B)))))))))))
double code(double F, double B, double x) {
	double t_0 = (F / (B * (((-1.0 - x) / F) - F))) - (x / tan(B));
	double t_1 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
	double tmp;
	if (F <= -4.5e+273) {
		tmp = t_0;
	} else if (F <= -205000.0) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= -2.1e-90) {
		tmp = (t_1 * (F / B)) - (x / B);
	} else if (F <= 1.08e-173) {
		tmp = t_0;
	} else if (F <= 9.5e-26) {
		tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
	} else if (F <= 1.75e+158) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (x * (-1.0 / tan(B))) + (F / (F * 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 = (f / (b * ((((-1.0d0) - x) / f) - f))) - (x / tan(b))
    t_1 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
    if (f <= (-4.5d+273)) then
        tmp = t_0
    else if (f <= (-205000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= (-2.1d-90)) then
        tmp = (t_1 * (f / b)) - (x / b)
    else if (f <= 1.08d-173) then
        tmp = t_0
    else if (f <= 9.5d-26) then
        tmp = (t_1 * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
    else if (f <= 1.75d+158) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (x * ((-1.0d0) / tan(b))) + (f / (f * b))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = (F / (B * (((-1.0 - x) / F) - F))) - (x / Math.tan(B));
	double t_1 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
	double tmp;
	if (F <= -4.5e+273) {
		tmp = t_0;
	} else if (F <= -205000.0) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= -2.1e-90) {
		tmp = (t_1 * (F / B)) - (x / B);
	} else if (F <= 1.08e-173) {
		tmp = t_0;
	} else if (F <= 9.5e-26) {
		tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
	} else if (F <= 1.75e+158) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (x * (-1.0 / Math.tan(B))) + (F / (F * B));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = (F / (B * (((-1.0 - x) / F) - F))) - (x / math.tan(B))
	t_1 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)
	tmp = 0
	if F <= -4.5e+273:
		tmp = t_0
	elif F <= -205000.0:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= -2.1e-90:
		tmp = (t_1 * (F / B)) - (x / B)
	elif F <= 1.08e-173:
		tmp = t_0
	elif F <= 9.5e-26:
		tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B)
	elif F <= 1.75e+158:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (x * (-1.0 / math.tan(B))) + (F / (F * B))
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(x / tan(B)))
	t_1 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5
	tmp = 0.0
	if (F <= -4.5e+273)
		tmp = t_0;
	elseif (F <= -205000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= -2.1e-90)
		tmp = Float64(Float64(t_1 * Float64(F / B)) - Float64(x / B));
	elseif (F <= 1.08e-173)
		tmp = t_0;
	elseif (F <= 9.5e-26)
		tmp = Float64(Float64(t_1 * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B));
	elseif (F <= 1.75e+158)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(F * B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = (F / (B * (((-1.0 - x) / F) - F))) - (x / tan(B));
	t_1 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5;
	tmp = 0.0;
	if (F <= -4.5e+273)
		tmp = t_0;
	elseif (F <= -205000.0)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= -2.1e-90)
		tmp = (t_1 * (F / B)) - (x / B);
	elseif (F <= 1.08e-173)
		tmp = t_0;
	elseif (F <= 9.5e-26)
		tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
	elseif (F <= 1.75e+158)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (x * (-1.0 / tan(B))) + (F / (F * B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -4.5e+273], t$95$0, If[LessEqual[F, -205000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-90], N[(N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.08e-173], t$95$0, If[LessEqual[F, 9.5e-26], N[(N[(t$95$1 * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e+158], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{\tan B}\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -4.5 \cdot 10^{+273}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq -205000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -2.1 \cdot 10^{-90}:\\
\;\;\;\;t_1 \cdot \frac{F}{B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.08 \cdot 10^{-173}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq 9.5 \cdot 10^{-26}:\\
\;\;\;\;t_1 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.75 \cdot 10^{+158}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{F \cdot B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 13: 71.1% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ t_1 := \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{\tan B}\\ t_2 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -2.15 \cdot 10^{+273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -175000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{-88}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 7.7 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 6.6 \cdot 10^{-44}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 9 \cdot 10^{+74}:\\ \;\;\;\;t_0 + \frac{1}{B}\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{+163}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{F}{F \cdot B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* x (/ -1.0 (tan B))))
        (t_1 (- (/ F (* B (- (/ (- -1.0 x) F) F))) (/ x (tan B))))
        (t_2 (- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))))
   (if (<= F -2.15e+273)
     t_1
     (if (<= F -175000.0)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F -7.5e-88)
         t_2
         (if (<= F 7.7e-174)
           t_1
           (if (<= F 6.6e-44)
             t_2
             (if (<= F 9e+74)
               (+ t_0 (/ 1.0 B))
               (if (<= F 1.3e+163)
                 (- (/ 1.0 (sin B)) (/ x B))
                 (+ t_0 (/ F (* F B))))))))))))
double code(double F, double B, double x) {
	double t_0 = x * (-1.0 / tan(B));
	double t_1 = (F / (B * (((-1.0 - x) / F) - F))) - (x / tan(B));
	double t_2 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
	double tmp;
	if (F <= -2.15e+273) {
		tmp = t_1;
	} else if (F <= -175000.0) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= -7.5e-88) {
		tmp = t_2;
	} else if (F <= 7.7e-174) {
		tmp = t_1;
	} else if (F <= 6.6e-44) {
		tmp = t_2;
	} else if (F <= 9e+74) {
		tmp = t_0 + (1.0 / B);
	} else if (F <= 1.3e+163) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = t_0 + (F / (F * 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) :: t_2
    real(8) :: tmp
    t_0 = x * ((-1.0d0) / tan(b))
    t_1 = (f / (b * ((((-1.0d0) - x) / f) - f))) - (x / tan(b))
    t_2 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
    if (f <= (-2.15d+273)) then
        tmp = t_1
    else if (f <= (-175000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= (-7.5d-88)) then
        tmp = t_2
    else if (f <= 7.7d-174) then
        tmp = t_1
    else if (f <= 6.6d-44) then
        tmp = t_2
    else if (f <= 9d+74) then
        tmp = t_0 + (1.0d0 / b)
    else if (f <= 1.3d+163) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = t_0 + (f / (f * b))
    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));
	double t_1 = (F / (B * (((-1.0 - x) / F) - F))) - (x / Math.tan(B));
	double t_2 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
	double tmp;
	if (F <= -2.15e+273) {
		tmp = t_1;
	} else if (F <= -175000.0) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= -7.5e-88) {
		tmp = t_2;
	} else if (F <= 7.7e-174) {
		tmp = t_1;
	} else if (F <= 6.6e-44) {
		tmp = t_2;
	} else if (F <= 9e+74) {
		tmp = t_0 + (1.0 / B);
	} else if (F <= 1.3e+163) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = t_0 + (F / (F * B));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x * (-1.0 / math.tan(B))
	t_1 = (F / (B * (((-1.0 - x) / F) - F))) - (x / math.tan(B))
	t_2 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B)
	tmp = 0
	if F <= -2.15e+273:
		tmp = t_1
	elif F <= -175000.0:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= -7.5e-88:
		tmp = t_2
	elif F <= 7.7e-174:
		tmp = t_1
	elif F <= 6.6e-44:
		tmp = t_2
	elif F <= 9e+74:
		tmp = t_0 + (1.0 / B)
	elif F <= 1.3e+163:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = t_0 + (F / (F * B))
	return tmp
function code(F, B, x)
	t_0 = Float64(x * Float64(-1.0 / tan(B)))
	t_1 = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(x / tan(B)))
	t_2 = 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 <= -2.15e+273)
		tmp = t_1;
	elseif (F <= -175000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= -7.5e-88)
		tmp = t_2;
	elseif (F <= 7.7e-174)
		tmp = t_1;
	elseif (F <= 6.6e-44)
		tmp = t_2;
	elseif (F <= 9e+74)
		tmp = Float64(t_0 + Float64(1.0 / B));
	elseif (F <= 1.3e+163)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(t_0 + Float64(F / Float64(F * B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x * (-1.0 / tan(B));
	t_1 = (F / (B * (((-1.0 - x) / F) - F))) - (x / tan(B));
	t_2 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B);
	tmp = 0.0;
	if (F <= -2.15e+273)
		tmp = t_1;
	elseif (F <= -175000.0)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= -7.5e-88)
		tmp = t_2;
	elseif (F <= 7.7e-174)
		tmp = t_1;
	elseif (F <= 6.6e-44)
		tmp = t_2;
	elseif (F <= 9e+74)
		tmp = t_0 + (1.0 / B);
	elseif (F <= 1.3e+163)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = t_0 + (F / (F * B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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, -2.15e+273], t$95$1, If[LessEqual[F, -175000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.5e-88], t$95$2, If[LessEqual[F, 7.7e-174], t$95$1, If[LessEqual[F, 6.6e-44], t$95$2, If[LessEqual[F, 9e+74], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e+163], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{\tan B}\\
t_2 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.15 \cdot 10^{+273}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;F \leq -175000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -7.5 \cdot 10^{-88}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;F \leq 7.7 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;F \leq 6.6 \cdot 10^{-44}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;F \leq 9 \cdot 10^{+74}:\\
\;\;\;\;t_0 + \frac{1}{B}\\

\mathbf{elif}\;F \leq 1.3 \cdot 10^{+163}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \frac{F}{F \cdot B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 14: 70.4% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -5.9 \cdot 10^{+271}:\\ \;\;\;\;t_0 + \frac{-1}{B}\\ \mathbf{elif}\;F \leq -5.2 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-65}:\\ \;\;\;\;t_0 + \frac{F}{\frac{-B}{\frac{F}{x + 1}}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* x (/ -1.0 (tan B)))))
   (if (<= F -5.9e+271)
     (+ t_0 (/ -1.0 B))
     (if (<= F -5.2e-65)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F 8.5e-65)
         (+ t_0 (/ F (/ (- B) (/ F (+ x 1.0)))))
         (+ t_0 (/ 1.0 B)))))))
double code(double F, double B, double x) {
	double t_0 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -5.9e+271) {
		tmp = t_0 + (-1.0 / B);
	} else if (F <= -5.2e-65) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 8.5e-65) {
		tmp = t_0 + (F / (-B / (F / (x + 1.0))));
	} else {
		tmp = t_0 + (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 = x * ((-1.0d0) / tan(b))
    if (f <= (-5.9d+271)) then
        tmp = t_0 + ((-1.0d0) / b)
    else if (f <= (-5.2d-65)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= 8.5d-65) then
        tmp = t_0 + (f / (-b / (f / (x + 1.0d0))))
    else
        tmp = t_0 + (1.0d0 / b)
    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));
	double tmp;
	if (F <= -5.9e+271) {
		tmp = t_0 + (-1.0 / B);
	} else if (F <= -5.2e-65) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= 8.5e-65) {
		tmp = t_0 + (F / (-B / (F / (x + 1.0))));
	} else {
		tmp = t_0 + (1.0 / B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x * (-1.0 / math.tan(B))
	tmp = 0
	if F <= -5.9e+271:
		tmp = t_0 + (-1.0 / B)
	elif F <= -5.2e-65:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= 8.5e-65:
		tmp = t_0 + (F / (-B / (F / (x + 1.0))))
	else:
		tmp = t_0 + (1.0 / B)
	return tmp
function code(F, B, x)
	t_0 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -5.9e+271)
		tmp = Float64(t_0 + Float64(-1.0 / B));
	elseif (F <= -5.2e-65)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 8.5e-65)
		tmp = Float64(t_0 + Float64(F / Float64(Float64(-B) / Float64(F / Float64(x + 1.0)))));
	else
		tmp = Float64(t_0 + Float64(1.0 / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x * (-1.0 / tan(B));
	tmp = 0.0;
	if (F <= -5.9e+271)
		tmp = t_0 + (-1.0 / B);
	elseif (F <= -5.2e-65)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= 8.5e-65)
		tmp = t_0 + (F / (-B / (F / (x + 1.0))));
	else
		tmp = t_0 + (1.0 / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.9e+271], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-65], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-65], N[(t$95$0 + N[(F / N[((-B) / N[(F / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -5.9 \cdot 10^{+271}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\

\mathbf{elif}\;F \leq -5.2 \cdot 10^{-65}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 8.5 \cdot 10^{-65}:\\
\;\;\;\;t_0 + \frac{F}{\frac{-B}{\frac{F}{x + 1}}}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 15: 70.9% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -7.8 \cdot 10^{+273}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{+77}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9.6 \cdot 10^{-65}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (- (/ F (* B (- (/ (- -1.0 x) F) F))) (/ x (tan B)))))
   (if (<= F -7.8e+273)
     t_0
     (if (<= F -3.5e+77)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F 9.6e-65) t_0 (+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))))
double code(double F, double B, double x) {
	double t_0 = (F / (B * (((-1.0 - x) / F) - F))) - (x / tan(B));
	double tmp;
	if (F <= -7.8e+273) {
		tmp = t_0;
	} else if (F <= -3.5e+77) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 9.6e-65) {
		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 / (b * ((((-1.0d0) - x) / f) - f))) - (x / tan(b))
    if (f <= (-7.8d+273)) then
        tmp = t_0
    else if (f <= (-3.5d+77)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= 9.6d-65) 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 = (F / (B * (((-1.0 - x) / F) - F))) - (x / Math.tan(B));
	double tmp;
	if (F <= -7.8e+273) {
		tmp = t_0;
	} else if (F <= -3.5e+77) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= 9.6e-65) {
		tmp = t_0;
	} else {
		tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = (F / (B * (((-1.0 - x) / F) - F))) - (x / math.tan(B))
	tmp = 0
	if F <= -7.8e+273:
		tmp = t_0
	elif F <= -3.5e+77:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= 9.6e-65:
		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(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(x / tan(B)))
	tmp = 0.0
	if (F <= -7.8e+273)
		tmp = t_0;
	elseif (F <= -3.5e+77)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 9.6e-65)
		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 / (B * (((-1.0 - x) / F) - F))) - (x / tan(B));
	tmp = 0.0;
	if (F <= -7.8e+273)
		tmp = t_0;
	elseif (F <= -3.5e+77)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= 9.6e-65)
		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[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.8e+273], t$95$0, If[LessEqual[F, -3.5e+77], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.6e-65], 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 := \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.8 \cdot 10^{+273}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq -3.5 \cdot 10^{+77}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 9.6 \cdot 10^{-65}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 16: 70.4% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -6.5 \cdot 10^{+273}:\\ \;\;\;\;t_0 + \frac{-1}{B}\\ \mathbf{elif}\;F \leq -5.2 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-62}:\\ \;\;\;\;t_0 + \frac{F}{\frac{-B}{\frac{F}{x}}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* x (/ -1.0 (tan B)))))
   (if (<= F -6.5e+273)
     (+ t_0 (/ -1.0 B))
     (if (<= F -5.2e-65)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F 8e-62) (+ t_0 (/ F (/ (- B) (/ F x)))) (+ t_0 (/ 1.0 B)))))))
double code(double F, double B, double x) {
	double t_0 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -6.5e+273) {
		tmp = t_0 + (-1.0 / B);
	} else if (F <= -5.2e-65) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 8e-62) {
		tmp = t_0 + (F / (-B / (F / x)));
	} else {
		tmp = t_0 + (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 = x * ((-1.0d0) / tan(b))
    if (f <= (-6.5d+273)) then
        tmp = t_0 + ((-1.0d0) / b)
    else if (f <= (-5.2d-65)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= 8d-62) then
        tmp = t_0 + (f / (-b / (f / x)))
    else
        tmp = t_0 + (1.0d0 / b)
    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));
	double tmp;
	if (F <= -6.5e+273) {
		tmp = t_0 + (-1.0 / B);
	} else if (F <= -5.2e-65) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= 8e-62) {
		tmp = t_0 + (F / (-B / (F / x)));
	} else {
		tmp = t_0 + (1.0 / B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x * (-1.0 / math.tan(B))
	tmp = 0
	if F <= -6.5e+273:
		tmp = t_0 + (-1.0 / B)
	elif F <= -5.2e-65:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= 8e-62:
		tmp = t_0 + (F / (-B / (F / x)))
	else:
		tmp = t_0 + (1.0 / B)
	return tmp
function code(F, B, x)
	t_0 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -6.5e+273)
		tmp = Float64(t_0 + Float64(-1.0 / B));
	elseif (F <= -5.2e-65)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 8e-62)
		tmp = Float64(t_0 + Float64(F / Float64(Float64(-B) / Float64(F / x))));
	else
		tmp = Float64(t_0 + Float64(1.0 / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x * (-1.0 / tan(B));
	tmp = 0.0;
	if (F <= -6.5e+273)
		tmp = t_0 + (-1.0 / B);
	elseif (F <= -5.2e-65)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= 8e-62)
		tmp = t_0 + (F / (-B / (F / x)));
	else
		tmp = t_0 + (1.0 / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.5e+273], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-65], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8e-62], N[(t$95$0 + N[(F / N[((-B) / N[(F / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -6.5 \cdot 10^{+273}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\

\mathbf{elif}\;F \leq -5.2 \cdot 10^{-65}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 8 \cdot 10^{-62}:\\
\;\;\;\;t_0 + \frac{F}{\frac{-B}{\frac{F}{x}}}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 17: 60.9% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -2.3 \cdot 10^{+270}:\\ \;\;\;\;t_0 + \frac{-1}{B}\\ \mathbf{elif}\;F \leq -4.1 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{+108}:\\ \;\;\;\;t_0 + \frac{1}{B}\\ \mathbf{elif}\;F \leq 1.1 \cdot 10^{+158}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{F}{F \cdot B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* x (/ -1.0 (tan B)))))
   (if (<= F -2.3e+270)
     (+ t_0 (/ -1.0 B))
     (if (<= F -4.1e-65)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F 4e+108)
         (+ t_0 (/ 1.0 B))
         (if (<= F 1.1e+158)
           (- (/ 1.0 (sin B)) (/ x B))
           (+ t_0 (/ F (* F B)))))))))
double code(double F, double B, double x) {
	double t_0 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -2.3e+270) {
		tmp = t_0 + (-1.0 / B);
	} else if (F <= -4.1e-65) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 4e+108) {
		tmp = t_0 + (1.0 / B);
	} else if (F <= 1.1e+158) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = t_0 + (F / (F * 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 = x * ((-1.0d0) / tan(b))
    if (f <= (-2.3d+270)) then
        tmp = t_0 + ((-1.0d0) / b)
    else if (f <= (-4.1d-65)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= 4d+108) then
        tmp = t_0 + (1.0d0 / b)
    else if (f <= 1.1d+158) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = t_0 + (f / (f * b))
    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));
	double tmp;
	if (F <= -2.3e+270) {
		tmp = t_0 + (-1.0 / B);
	} else if (F <= -4.1e-65) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= 4e+108) {
		tmp = t_0 + (1.0 / B);
	} else if (F <= 1.1e+158) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = t_0 + (F / (F * B));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x * (-1.0 / math.tan(B))
	tmp = 0
	if F <= -2.3e+270:
		tmp = t_0 + (-1.0 / B)
	elif F <= -4.1e-65:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= 4e+108:
		tmp = t_0 + (1.0 / B)
	elif F <= 1.1e+158:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = t_0 + (F / (F * B))
	return tmp
function code(F, B, x)
	t_0 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -2.3e+270)
		tmp = Float64(t_0 + Float64(-1.0 / B));
	elseif (F <= -4.1e-65)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 4e+108)
		tmp = Float64(t_0 + Float64(1.0 / B));
	elseif (F <= 1.1e+158)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(t_0 + Float64(F / Float64(F * B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x * (-1.0 / tan(B));
	tmp = 0.0;
	if (F <= -2.3e+270)
		tmp = t_0 + (-1.0 / B);
	elseif (F <= -4.1e-65)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= 4e+108)
		tmp = t_0 + (1.0 / B);
	elseif (F <= 1.1e+158)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = t_0 + (F / (F * B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.3e+270], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.1e-65], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e+108], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e+158], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.3 \cdot 10^{+270}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\

\mathbf{elif}\;F \leq -4.1 \cdot 10^{-65}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 4 \cdot 10^{+108}:\\
\;\;\;\;t_0 + \frac{1}{B}\\

\mathbf{elif}\;F \leq 1.1 \cdot 10^{+158}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \frac{F}{F \cdot B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 18: 60.7% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -1.4 \cdot 10^{+273}:\\ \;\;\;\;t_0 + \frac{-1}{B}\\ \mathbf{elif}\;F \leq -5.2 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.35 \cdot 10^{+121}:\\ \;\;\;\;t_0 + \frac{1}{B}\\ \mathbf{elif}\;F \leq 1.18 \cdot 10^{+150}:\\ \;\;\;\;\frac{\frac{1}{F}}{\frac{\sin B}{F}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{F}{F \cdot B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* x (/ -1.0 (tan B)))))
   (if (<= F -1.4e+273)
     (+ t_0 (/ -1.0 B))
     (if (<= F -5.2e-65)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F 1.35e+121)
         (+ t_0 (/ 1.0 B))
         (if (<= F 1.18e+150)
           (- (/ (/ 1.0 F) (/ (sin B) F)) (/ x B))
           (+ t_0 (/ F (* F B)))))))))
double code(double F, double B, double x) {
	double t_0 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -1.4e+273) {
		tmp = t_0 + (-1.0 / B);
	} else if (F <= -5.2e-65) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 1.35e+121) {
		tmp = t_0 + (1.0 / B);
	} else if (F <= 1.18e+150) {
		tmp = ((1.0 / F) / (sin(B) / F)) - (x / B);
	} else {
		tmp = t_0 + (F / (F * 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 = x * ((-1.0d0) / tan(b))
    if (f <= (-1.4d+273)) then
        tmp = t_0 + ((-1.0d0) / b)
    else if (f <= (-5.2d-65)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= 1.35d+121) then
        tmp = t_0 + (1.0d0 / b)
    else if (f <= 1.18d+150) then
        tmp = ((1.0d0 / f) / (sin(b) / f)) - (x / b)
    else
        tmp = t_0 + (f / (f * b))
    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));
	double tmp;
	if (F <= -1.4e+273) {
		tmp = t_0 + (-1.0 / B);
	} else if (F <= -5.2e-65) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= 1.35e+121) {
		tmp = t_0 + (1.0 / B);
	} else if (F <= 1.18e+150) {
		tmp = ((1.0 / F) / (Math.sin(B) / F)) - (x / B);
	} else {
		tmp = t_0 + (F / (F * B));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x * (-1.0 / math.tan(B))
	tmp = 0
	if F <= -1.4e+273:
		tmp = t_0 + (-1.0 / B)
	elif F <= -5.2e-65:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= 1.35e+121:
		tmp = t_0 + (1.0 / B)
	elif F <= 1.18e+150:
		tmp = ((1.0 / F) / (math.sin(B) / F)) - (x / B)
	else:
		tmp = t_0 + (F / (F * B))
	return tmp
function code(F, B, x)
	t_0 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -1.4e+273)
		tmp = Float64(t_0 + Float64(-1.0 / B));
	elseif (F <= -5.2e-65)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 1.35e+121)
		tmp = Float64(t_0 + Float64(1.0 / B));
	elseif (F <= 1.18e+150)
		tmp = Float64(Float64(Float64(1.0 / F) / Float64(sin(B) / F)) - Float64(x / B));
	else
		tmp = Float64(t_0 + Float64(F / Float64(F * B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x * (-1.0 / tan(B));
	tmp = 0.0;
	if (F <= -1.4e+273)
		tmp = t_0 + (-1.0 / B);
	elseif (F <= -5.2e-65)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= 1.35e+121)
		tmp = t_0 + (1.0 / B);
	elseif (F <= 1.18e+150)
		tmp = ((1.0 / F) / (sin(B) / F)) - (x / B);
	else
		tmp = t_0 + (F / (F * B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4e+273], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-65], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35e+121], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.18e+150], N[(N[(N[(1.0 / F), $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{+273}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\

\mathbf{elif}\;F \leq -5.2 \cdot 10^{-65}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.35 \cdot 10^{+121}:\\
\;\;\;\;t_0 + \frac{1}{B}\\

\mathbf{elif}\;F \leq 1.18 \cdot 10^{+150}:\\
\;\;\;\;\frac{\frac{1}{F}}{\frac{\sin B}{F}} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \frac{F}{F \cdot B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 19: 45.3% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -4.5 \cdot 10^{+199}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -7 \cdot 10^{+95}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 10^{-6}:\\ \;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{+224}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.42 \cdot 10^{+299}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ 1.0 (sin B))))
   (if (<= F -4.5e+199)
     (/ (- -1.0 x) B)
     (if (<= F -7e+95)
       (/ -1.0 (sin B))
       (if (<= F 1e-6)
         (-
          (/ F (* B (- (/ (- -1.0 x) F) F)))
          (+ (/ x B) (* -0.3333333333333333 (* B x))))
         (if (<= F 3.7e+224)
           t_0
           (if (<= F 1.42e+299)
             (- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B))
             (+ t_0 (/ x B)))))))))
double code(double F, double B, double x) {
	double t_0 = 1.0 / sin(B);
	double tmp;
	if (F <= -4.5e+199) {
		tmp = (-1.0 - x) / B;
	} else if (F <= -7e+95) {
		tmp = -1.0 / sin(B);
	} else if (F <= 1e-6) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	} else if (F <= 3.7e+224) {
		tmp = t_0;
	} else if (F <= 1.42e+299) {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	} else {
		tmp = t_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) :: t_0
    real(8) :: tmp
    t_0 = 1.0d0 / sin(b)
    if (f <= (-4.5d+199)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= (-7d+95)) then
        tmp = (-1.0d0) / sin(b)
    else if (f <= 1d-6) then
        tmp = (f / (b * ((((-1.0d0) - x) / f) - f))) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
    else if (f <= 3.7d+224) then
        tmp = t_0
    else if (f <= 1.42d+299) then
        tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
    else
        tmp = t_0 + (x / b)
    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 tmp;
	if (F <= -4.5e+199) {
		tmp = (-1.0 - x) / B;
	} else if (F <= -7e+95) {
		tmp = -1.0 / Math.sin(B);
	} else if (F <= 1e-6) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	} else if (F <= 3.7e+224) {
		tmp = t_0;
	} else if (F <= 1.42e+299) {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	} else {
		tmp = t_0 + (x / B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = 1.0 / math.sin(B)
	tmp = 0
	if F <= -4.5e+199:
		tmp = (-1.0 - x) / B
	elif F <= -7e+95:
		tmp = -1.0 / math.sin(B)
	elif F <= 1e-6:
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)))
	elif F <= 3.7e+224:
		tmp = t_0
	elif F <= 1.42e+299:
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B)
	else:
		tmp = t_0 + (x / B)
	return tmp
function code(F, B, x)
	t_0 = Float64(1.0 / sin(B))
	tmp = 0.0
	if (F <= -4.5e+199)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= -7e+95)
		tmp = Float64(-1.0 / sin(B));
	elseif (F <= 1e-6)
		tmp = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))));
	elseif (F <= 3.7e+224)
		tmp = t_0;
	elseif (F <= 1.42e+299)
		tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B));
	else
		tmp = Float64(t_0 + Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = 1.0 / sin(B);
	tmp = 0.0;
	if (F <= -4.5e+199)
		tmp = (-1.0 - x) / B;
	elseif (F <= -7e+95)
		tmp = -1.0 / sin(B);
	elseif (F <= 1e-6)
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	elseif (F <= 3.7e+224)
		tmp = t_0;
	elseif (F <= 1.42e+299)
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	else
		tmp = t_0 + (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.5e+199], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -7e+95], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e+224], t$95$0, If[LessEqual[F, 1.42e+299], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -4.5 \cdot 10^{+199}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq -7 \cdot 10^{+95}:\\
\;\;\;\;\frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\

\mathbf{elif}\;F \leq 3.7 \cdot 10^{+224}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq 1.42 \cdot 10^{+299}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 20: 60.8% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -1.7 \cdot 10^{+269}:\\ \;\;\;\;t_0 + \frac{-1}{B}\\ \mathbf{elif}\;F \leq -4.9 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{+108} \lor \neg \left(F \leq 2.1 \cdot 10^{+163}\right):\\ \;\;\;\;t_0 + \frac{1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* x (/ -1.0 (tan B)))))
   (if (<= F -1.7e+269)
     (+ t_0 (/ -1.0 B))
     (if (<= F -4.9e-65)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (or (<= F 3.2e+108) (not (<= F 2.1e+163)))
         (+ t_0 (/ 1.0 B))
         (- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
	double t_0 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -1.7e+269) {
		tmp = t_0 + (-1.0 / B);
	} else if (F <= -4.9e-65) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if ((F <= 3.2e+108) || !(F <= 2.1e+163)) {
		tmp = t_0 + (1.0 / B);
	} else {
		tmp = (1.0 / sin(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) :: t_0
    real(8) :: tmp
    t_0 = x * ((-1.0d0) / tan(b))
    if (f <= (-1.7d+269)) then
        tmp = t_0 + ((-1.0d0) / b)
    else if (f <= (-4.9d-65)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if ((f <= 3.2d+108) .or. (.not. (f <= 2.1d+163))) then
        tmp = t_0 + (1.0d0 / b)
    else
        tmp = (1.0d0 / sin(b)) - (x / b)
    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));
	double tmp;
	if (F <= -1.7e+269) {
		tmp = t_0 + (-1.0 / B);
	} else if (F <= -4.9e-65) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if ((F <= 3.2e+108) || !(F <= 2.1e+163)) {
		tmp = t_0 + (1.0 / B);
	} else {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x * (-1.0 / math.tan(B))
	tmp = 0
	if F <= -1.7e+269:
		tmp = t_0 + (-1.0 / B)
	elif F <= -4.9e-65:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif (F <= 3.2e+108) or not (F <= 2.1e+163):
		tmp = t_0 + (1.0 / B)
	else:
		tmp = (1.0 / math.sin(B)) - (x / B)
	return tmp
function code(F, B, x)
	t_0 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -1.7e+269)
		tmp = Float64(t_0 + Float64(-1.0 / B));
	elseif (F <= -4.9e-65)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif ((F <= 3.2e+108) || !(F <= 2.1e+163))
		tmp = Float64(t_0 + Float64(1.0 / B));
	else
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x * (-1.0 / tan(B));
	tmp = 0.0;
	if (F <= -1.7e+269)
		tmp = t_0 + (-1.0 / B);
	elseif (F <= -4.9e-65)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif ((F <= 3.2e+108) || ~((F <= 2.1e+163)))
		tmp = t_0 + (1.0 / B);
	else
		tmp = (1.0 / sin(B)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.7e+269], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.9e-65], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.2e+108], N[Not[LessEqual[F, 2.1e+163]], $MachinePrecision]], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.7 \cdot 10^{+269}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\

\mathbf{elif}\;F \leq -4.9 \cdot 10^{-65}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 3.2 \cdot 10^{+108} \lor \neg \left(F \leq 2.1 \cdot 10^{+163}\right):\\
\;\;\;\;t_0 + \frac{1}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 21: 50.7% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -1.6 \cdot 10^{+77}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 6.6 \cdot 10^{-9}:\\ \;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{+223}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 6.2 \cdot 10^{+304}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ 1.0 (sin B))))
   (if (<= F -1.6e+77)
     (- (/ -1.0 (sin B)) (/ x B))
     (if (<= F 6.6e-9)
       (-
        (/ F (* B (- (/ (- -1.0 x) F) F)))
        (+ (/ x B) (* -0.3333333333333333 (* B x))))
       (if (<= F 6.5e+223)
         t_0
         (if (<= F 6.2e+304)
           (- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B))
           (+ t_0 (/ x B))))))))
double code(double F, double B, double x) {
	double t_0 = 1.0 / sin(B);
	double tmp;
	if (F <= -1.6e+77) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 6.6e-9) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	} else if (F <= 6.5e+223) {
		tmp = t_0;
	} else if (F <= 6.2e+304) {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	} else {
		tmp = t_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) :: t_0
    real(8) :: tmp
    t_0 = 1.0d0 / sin(b)
    if (f <= (-1.6d+77)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= 6.6d-9) then
        tmp = (f / (b * ((((-1.0d0) - x) / f) - f))) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
    else if (f <= 6.5d+223) then
        tmp = t_0
    else if (f <= 6.2d+304) then
        tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
    else
        tmp = t_0 + (x / b)
    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 tmp;
	if (F <= -1.6e+77) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= 6.6e-9) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	} else if (F <= 6.5e+223) {
		tmp = t_0;
	} else if (F <= 6.2e+304) {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	} else {
		tmp = t_0 + (x / B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = 1.0 / math.sin(B)
	tmp = 0
	if F <= -1.6e+77:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= 6.6e-9:
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)))
	elif F <= 6.5e+223:
		tmp = t_0
	elif F <= 6.2e+304:
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B)
	else:
		tmp = t_0 + (x / B)
	return tmp
function code(F, B, x)
	t_0 = Float64(1.0 / sin(B))
	tmp = 0.0
	if (F <= -1.6e+77)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 6.6e-9)
		tmp = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))));
	elseif (F <= 6.5e+223)
		tmp = t_0;
	elseif (F <= 6.2e+304)
		tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B));
	else
		tmp = Float64(t_0 + Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = 1.0 / sin(B);
	tmp = 0.0;
	if (F <= -1.6e+77)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= 6.6e-9)
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	elseif (F <= 6.5e+223)
		tmp = t_0;
	elseif (F <= 6.2e+304)
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	else
		tmp = t_0 + (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.6e+77], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.6e-9], N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e+223], t$95$0, If[LessEqual[F, 6.2e+304], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{+77}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 6.6 \cdot 10^{-9}:\\
\;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\

\mathbf{elif}\;F \leq 6.5 \cdot 10^{+223}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq 6.2 \cdot 10^{+304}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 22: 62.1% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{if}\;F \leq -3.4 \cdot 10^{+272}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.36 \cdot 10^{+43}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{-29}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
   (if (<= F -3.4e+272)
     t_0
     (if (<= F -1.36e+43)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F 2e-29) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
	double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
	double tmp;
	if (F <= -3.4e+272) {
		tmp = t_0;
	} else if (F <= -1.36e+43) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 2e-29) {
		tmp = t_0;
	} else {
		tmp = (1.0 / sin(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) :: t_0
    real(8) :: tmp
    t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
    if (f <= (-3.4d+272)) then
        tmp = t_0
    else if (f <= (-1.36d+43)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= 2d-29) then
        tmp = t_0
    else
        tmp = (1.0d0 / sin(b)) - (x / b)
    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))) + (-1.0 / B);
	double tmp;
	if (F <= -3.4e+272) {
		tmp = t_0;
	} else if (F <= -1.36e+43) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= 2e-29) {
		tmp = t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B)
	tmp = 0
	if F <= -3.4e+272:
		tmp = t_0
	elif F <= -1.36e+43:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= 2e-29:
		tmp = t_0
	else:
		tmp = (1.0 / math.sin(B)) - (x / B)
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B))
	tmp = 0.0
	if (F <= -3.4e+272)
		tmp = t_0;
	elseif (F <= -1.36e+43)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 2e-29)
		tmp = t_0;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
	tmp = 0.0;
	if (F <= -3.4e+272)
		tmp = t_0;
	elseif (F <= -1.36e+43)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= 2e-29)
		tmp = t_0;
	else
		tmp = (1.0 / sin(B)) - (x / B);
	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[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.4e+272], t$95$0, If[LessEqual[F, -1.36e+43], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-29], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -3.4 \cdot 10^{+272}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq -1.36 \cdot 10^{+43}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 2 \cdot 10^{-29}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 23: 45.4% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.5 \cdot 10^{+199}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -1.3 \cdot 10^{+94}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.68 \cdot 10^{-6}:\\ \;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\ \mathbf{elif}\;F \leq 3.3 \cdot 10^{+224} \lor \neg \left(F \leq 4 \cdot 10^{+300}\right):\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -6.5e+199)
   (/ (- -1.0 x) B)
   (if (<= F -1.3e+94)
     (/ -1.0 (sin B))
     (if (<= F 1.68e-6)
       (-
        (/ F (* B (- (/ (- -1.0 x) F) F)))
        (+ (/ x B) (* -0.3333333333333333 (* B x))))
       (if (or (<= F 3.3e+224) (not (<= F 4e+300)))
         (/ 1.0 (sin B))
         (- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B)))))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -6.5e+199) {
		tmp = (-1.0 - x) / B;
	} else if (F <= -1.3e+94) {
		tmp = -1.0 / sin(B);
	} else if (F <= 1.68e-6) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	} else if ((F <= 3.3e+224) || !(F <= 4e+300)) {
		tmp = 1.0 / sin(B);
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (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.5d+199)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= (-1.3d+94)) then
        tmp = (-1.0d0) / sin(b)
    else if (f <= 1.68d-6) then
        tmp = (f / (b * ((((-1.0d0) - x) / f) - f))) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
    else if ((f <= 3.3d+224) .or. (.not. (f <= 4d+300))) then
        tmp = 1.0d0 / sin(b)
    else
        tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -6.5e+199) {
		tmp = (-1.0 - x) / B;
	} else if (F <= -1.3e+94) {
		tmp = -1.0 / Math.sin(B);
	} else if (F <= 1.68e-6) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	} else if ((F <= 3.3e+224) || !(F <= 4e+300)) {
		tmp = 1.0 / Math.sin(B);
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -6.5e+199:
		tmp = (-1.0 - x) / B
	elif F <= -1.3e+94:
		tmp = -1.0 / math.sin(B)
	elif F <= 1.68e-6:
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)))
	elif (F <= 3.3e+224) or not (F <= 4e+300):
		tmp = 1.0 / math.sin(B)
	else:
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -6.5e+199)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= -1.3e+94)
		tmp = Float64(-1.0 / sin(B));
	elseif (F <= 1.68e-6)
		tmp = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))));
	elseif ((F <= 3.3e+224) || !(F <= 4e+300))
		tmp = Float64(1.0 / sin(B));
	else
		tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -6.5e+199)
		tmp = (-1.0 - x) / B;
	elseif (F <= -1.3e+94)
		tmp = -1.0 / sin(B);
	elseif (F <= 1.68e-6)
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	elseif ((F <= 3.3e+224) || ~((F <= 4e+300)))
		tmp = 1.0 / sin(B);
	else
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -6.5e+199], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.3e+94], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.68e-6], N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.3e+224], N[Not[LessEqual[F, 4e+300]], $MachinePrecision]], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.5 \cdot 10^{+199}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq -1.3 \cdot 10^{+94}:\\
\;\;\;\;\frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 1.68 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\

\mathbf{elif}\;F \leq 3.3 \cdot 10^{+224} \lor \neg \left(F \leq 4 \cdot 10^{+300}\right):\\
\;\;\;\;\frac{1}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 24: 57.7% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.9 \cdot 10^{+29}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{-65}:\\ \;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -1.9e+29)
   (- (/ -1.0 (sin B)) (/ x B))
   (if (<= F 4.5e-65)
     (- (/ F (* B (- (/ (- -1.0 x) F) F))) (/ x B))
     (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.9e+29) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 4.5e-65) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / B);
	} else {
		tmp = (1.0 / sin(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 (f <= (-1.9d+29)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= 4.5d-65) then
        tmp = (f / (b * ((((-1.0d0) - x) / f) - f))) - (x / b)
    else
        tmp = (1.0d0 / sin(b)) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.9e+29) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= 4.5e-65) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / B);
	} else {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -1.9e+29:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= 4.5e-65:
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / B)
	else:
		tmp = (1.0 / math.sin(B)) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -1.9e+29)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 4.5e-65)
		tmp = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -1.9e+29)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= 4.5e-65)
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / B);
	else
		tmp = (1.0 / sin(B)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -1.9e+29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-65], N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 4.5 \cdot 10^{-65}:\\
\;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 25: 44.4% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.75 \cdot 10^{+199}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -1.1 \cdot 10^{+96}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-56}:\\ \;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -1.75e+199)
   (/ (- -1.0 x) B)
   (if (<= F -1.1e+96)
     (/ -1.0 (sin B))
     (if (<= F 2.4e-56)
       (-
        (/ F (* B (- (/ (- -1.0 x) F) F)))
        (+ (/ x B) (* -0.3333333333333333 (* B x))))
       (- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B))))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.75e+199) {
		tmp = (-1.0 - x) / B;
	} else if (F <= -1.1e+96) {
		tmp = -1.0 / sin(B);
	} else if (F <= 2.4e-56) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (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.75d+199)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= (-1.1d+96)) then
        tmp = (-1.0d0) / sin(b)
    else if (f <= 2.4d-56) then
        tmp = (f / (b * ((((-1.0d0) - x) / f) - f))) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
    else
        tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.75e+199) {
		tmp = (-1.0 - x) / B;
	} else if (F <= -1.1e+96) {
		tmp = -1.0 / Math.sin(B);
	} else if (F <= 2.4e-56) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -1.75e+199:
		tmp = (-1.0 - x) / B
	elif F <= -1.1e+96:
		tmp = -1.0 / math.sin(B)
	elif F <= 2.4e-56:
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)))
	else:
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -1.75e+199)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= -1.1e+96)
		tmp = Float64(-1.0 / sin(B));
	elseif (F <= 2.4e-56)
		tmp = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))));
	else
		tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -1.75e+199)
		tmp = (-1.0 - x) / B;
	elseif (F <= -1.1e+96)
		tmp = -1.0 / sin(B);
	elseif (F <= 2.4e-56)
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	else
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -1.75e+199], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.1e+96], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e-56], N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{+199}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq -1.1 \cdot 10^{+96}:\\
\;\;\;\;\frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 2.4 \cdot 10^{-56}:\\
\;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 26: 44.4% accurate, 14.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 1.25 \cdot 10^{-59}:\\ \;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F 1.25e-59)
   (+
    (/ F (* B (- (/ (- -1.0 x) F) F)))
    (* x (- (/ -1.0 B) (* B -0.3333333333333333))))
   (- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= 1.25e-59) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (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.25d-59) then
        tmp = (f / (b * ((((-1.0d0) - x) / f) - f))) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
    else
        tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= 1.25e-59) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= 1.25e-59:
		tmp = (F / (B * (((-1.0 - x) / F) - F))) + (x * ((-1.0 / B) - (B * -0.3333333333333333)))
	else:
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= 1.25e-59)
		tmp = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))));
	else
		tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= 1.25e-59)
		tmp = (F / (B * (((-1.0 - x) / F) - F))) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
	else
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, 1.25e-59], N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.25 \cdot 10^{-59}:\\
\;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 27: 44.5% accurate, 14.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 7 \cdot 10^{-62}:\\ \;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F 7e-62)
   (-
    (/ F (* B (- (/ (- -1.0 x) F) F)))
    (+ (/ x B) (* -0.3333333333333333 (* B x))))
   (- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= 7e-62) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (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 <= 7d-62) then
        tmp = (f / (b * ((((-1.0d0) - x) / f) - f))) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
    else
        tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= 7e-62) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= 7e-62:
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)))
	else:
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= 7e-62)
		tmp = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))));
	else
		tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= 7e-62)
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - ((x / B) + (-0.3333333333333333 * (B * x)));
	else
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, 7e-62], N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq 7 \cdot 10^{-62}:\\
\;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 28: 44.3% accurate, 19.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 3.1 \cdot 10^{-63}:\\ \;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F 3.1e-63)
   (- (/ F (* B (- (/ (- -1.0 x) F) F))) (/ x B))
   (- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= 3.1e-63) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / B);
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (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 <= 3.1d-63) then
        tmp = (f / (b * ((((-1.0d0) - x) / f) - f))) - (x / b)
    else
        tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= 3.1e-63) {
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / B);
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= 3.1e-63:
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / B)
	else:
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= 3.1e-63)
		tmp = Float64(Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F))) - Float64(x / B));
	else
		tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= 3.1e-63)
		tmp = (F / (B * (((-1.0 - x) / F) - F))) - (x / B);
	else
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, 3.1e-63], N[(N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq 3.1 \cdot 10^{-63}:\\
\;\;\;\;\frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 29: 44.1% accurate, 21.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.2 \cdot 10^{-94}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-56}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -3.2e-94)
   (/ (- -1.0 x) B)
   (if (<= F 5.5e-56)
     (/ (- x) B)
     (- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -3.2e-94) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 5.5e-56) {
		tmp = -x / B;
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (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 <= (-3.2d-94)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 5.5d-56) then
        tmp = -x / b
    else
        tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -3.2e-94) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 5.5e-56) {
		tmp = -x / B;
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -3.2e-94:
		tmp = (-1.0 - x) / B
	elif F <= 5.5e-56:
		tmp = -x / B
	else:
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -3.2e-94)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 5.5e-56)
		tmp = Float64(Float64(-x) / B);
	else
		tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -3.2e-94)
		tmp = (-1.0 - x) / B;
	elseif (F <= 5.5e-56)
		tmp = -x / B;
	else
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -3.2e-94], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.5e-56], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.2 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 5.5 \cdot 10^{-56}:\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 30: 44.2% accurate, 21.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.4 \cdot 10^{-68}:\\ \;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{-56}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -6.4e-68)
   (+ (/ (- -1.0 x) B) (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
   (if (<= F 1.4e-56)
     (/ (- x) B)
     (- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -6.4e-68) {
		tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
	} else if (F <= 1.4e-56) {
		tmp = -x / B;
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (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.4d-68)) then
        tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
    else if (f <= 1.4d-56) then
        tmp = -x / b
    else
        tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -6.4e-68) {
		tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
	} else if (F <= 1.4e-56) {
		tmp = -x / B;
	} else {
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -6.4e-68:
		tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666))
	elif F <= 1.4e-56:
		tmp = -x / B
	else:
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -6.4e-68)
		tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)));
	elseif (F <= 1.4e-56)
		tmp = Float64(Float64(-x) / B);
	else
		tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -6.4e-68)
		tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
	elseif (F <= 1.4e-56)
		tmp = -x / B;
	else
		tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -6.4e-68], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-56], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.4 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\

\mathbf{elif}\;F \leq 1.4 \cdot 10^{-56}:\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 31: 44.0% accurate, 24.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4.4 \cdot 10^{-94}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-62}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -4.4e-94)
   (/ (- -1.0 x) B)
   (if (<= F 1.2e-62)
     (/ (- x) B)
     (+ (* B 0.16666666666666666) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -4.4e-94) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 1.2e-62) {
		tmp = -x / B;
	} else {
		tmp = (B * 0.16666666666666666) + ((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 <= (-4.4d-94)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 1.2d-62) then
        tmp = -x / b
    else
        tmp = (b * 0.16666666666666666d0) + ((1.0d0 - x) / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -4.4e-94) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 1.2e-62) {
		tmp = -x / B;
	} else {
		tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -4.4e-94:
		tmp = (-1.0 - x) / B
	elif F <= 1.2e-62:
		tmp = -x / B
	else:
		tmp = (B * 0.16666666666666666) + ((1.0 - x) / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -4.4e-94)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 1.2e-62)
		tmp = Float64(Float64(-x) / B);
	else
		tmp = Float64(Float64(B * 0.16666666666666666) + Float64(Float64(1.0 - x) / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -4.4e-94)
		tmp = (-1.0 - x) / B;
	elseif (F <= 1.2e-62)
		tmp = -x / B;
	else
		tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -4.4e-94], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.2e-62], N[((-x) / B), $MachinePrecision], N[(N[(B * 0.16666666666666666), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.4 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 1.2 \cdot 10^{-62}:\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 32: 44.0% accurate, 29.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4.7 \cdot 10^{-94}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 5 \cdot 10^{-65}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -4.7e-94)
   (/ (- -1.0 x) B)
   (if (<= F 5e-65) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -4.7e-94) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 5e-65) {
		tmp = -x / B;
	} else {
		tmp = (1.0 / 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 (f <= (-4.7d-94)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 5d-65) then
        tmp = -x / b
    else
        tmp = (1.0d0 / b) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -4.7e-94) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 5e-65) {
		tmp = -x / B;
	} else {
		tmp = (1.0 / B) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -4.7e-94:
		tmp = (-1.0 - x) / B
	elif F <= 5e-65:
		tmp = -x / B
	else:
		tmp = (1.0 / B) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -4.7e-94)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 5e-65)
		tmp = Float64(Float64(-x) / B);
	else
		tmp = Float64(Float64(1.0 / B) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -4.7e-94)
		tmp = (-1.0 - x) / B;
	elseif (F <= 5e-65)
		tmp = -x / B;
	else
		tmp = (1.0 / B) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -4.7e-94], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5e-65], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.7 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 5 \cdot 10^{-65}:\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 33: 44.0% accurate, 35.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.95 \cdot 10^{-94}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-65}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -1.95e-94)
   (/ (- -1.0 x) B)
   (if (<= F 8.5e-65) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.95e-94) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 8.5e-65) {
		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.95d-94)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 8.5d-65) 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.95e-94) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 8.5e-65) {
		tmp = -x / B;
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -1.95e-94:
		tmp = (-1.0 - x) / B
	elif F <= 8.5e-65:
		tmp = -x / B
	else:
		tmp = (1.0 - x) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -1.95e-94)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 8.5e-65)
		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.95e-94)
		tmp = (-1.0 - x) / B;
	elseif (F <= 8.5e-65)
		tmp = -x / B;
	else
		tmp = (1.0 - x) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -1.95e-94], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.5e-65], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.95 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 8.5 \cdot 10^{-65}:\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 34: 31.7% accurate, 39.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{-118} \lor \neg \left(x \leq 1.4 \cdot 10^{-116}\right):\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (or (<= x -1.4e-118) (not (<= x 1.4e-116))) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
	double tmp;
	if ((x <= -1.4e-118) || !(x <= 1.4e-116)) {
		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 <= (-1.4d-118)) .or. (.not. (x <= 1.4d-116))) 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 <= -1.4e-118) || !(x <= 1.4e-116)) {
		tmp = -x / B;
	} else {
		tmp = 1.0 / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if (x <= -1.4e-118) or not (x <= 1.4e-116):
		tmp = -x / B
	else:
		tmp = 1.0 / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if ((x <= -1.4e-118) || !(x <= 1.4e-116))
		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 <= -1.4e-118) || ~((x <= 1.4e-116)))
		tmp = -x / B;
	else
		tmp = 1.0 / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.4e-118], N[Not[LessEqual[x, 1.4e-116]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{-118} \lor \neg \left(x \leq 1.4 \cdot 10^{-116}\right):\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 35: 37.4% accurate, 45.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 8.5 \cdot 10^{-65}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F 8.5e-65) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
	double tmp;
	if (F <= 8.5e-65) {
		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 <= 8.5d-65) 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 <= 8.5e-65) {
		tmp = -x / B;
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= 8.5e-65:
		tmp = -x / B
	else:
		tmp = (1.0 - x) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= 8.5e-65)
		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 <= 8.5e-65)
		tmp = -x / B;
	else
		tmp = (1.0 - x) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, 8.5e-65], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq 8.5 \cdot 10^{-65}:\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 36: 10.3% accurate, 108.0× speedup?

\[\begin{array}{l} \\ \frac{1}{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}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Reproduce

?
herbie shell --seed 2023340 
(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))))))