VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.9% → 99.6%
Time: 24.4s
Alternatives: 25
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 25 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: 76.9% 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.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -100000000:\\ \;\;\;\;t_0 - t_1\\ \mathbf{elif}\;F \leq 14600000000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \left(t_0 \cdot \cos B\right)\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ -1.0 (sin B))) (t_1 (/ x (tan B))))
   (if (<= F -100000000.0)
     (- t_0 t_1)
     (if (<= F 14600000000.0)
       (- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_1)
       (+ (/ 1.0 (sin B)) (* x (* t_0 (cos B))))))))
double code(double F, double B, double x) {
	double t_0 = -1.0 / sin(B);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -100000000.0) {
		tmp = t_0 - t_1;
	} else if (F <= 14600000000.0) {
		tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_1;
	} else {
		tmp = (1.0 / sin(B)) + (x * (t_0 * cos(B)));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (-1.0d0) / sin(b)
    t_1 = x / tan(b)
    if (f <= (-100000000.0d0)) then
        tmp = t_0 - t_1
    else if (f <= 14600000000.0d0) then
        tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_1
    else
        tmp = (1.0d0 / sin(b)) + (x * (t_0 * cos(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 t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -100000000.0) {
		tmp = t_0 - t_1;
	} else if (F <= 14600000000.0) {
		tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_1;
	} else {
		tmp = (1.0 / Math.sin(B)) + (x * (t_0 * Math.cos(B)));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = -1.0 / math.sin(B)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -100000000.0:
		tmp = t_0 - t_1
	elif F <= 14600000000.0:
		tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_1
	else:
		tmp = (1.0 / math.sin(B)) + (x * (t_0 * math.cos(B)))
	return tmp
function code(F, B, x)
	t_0 = Float64(-1.0 / sin(B))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -100000000.0)
		tmp = Float64(t_0 - t_1);
	elseif (F <= 14600000000.0)
		tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_1);
	else
		tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(t_0 * cos(B))));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = -1.0 / sin(B);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -100000000.0)
		tmp = t_0 - t_1;
	elseif (F <= 14600000000.0)
		tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_1;
	else
		tmp = (1.0 / sin(B)) + (x * (t_0 * cos(B)));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -100000000.0], N[(t$95$0 - t$95$1), $MachinePrecision], If[LessEqual[F, 14600000000.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$1), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(t$95$0 * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \left(t_0 \cdot \cos B\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1e8

    1. Initial program 68.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 99.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv99.9%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg99.9%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]

    if -1e8 < F < 1.46e10

    1. Initial program 99.4%

      \[\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)} \]
    2. Step-by-step derivation
      1. div-inv99.6%

        \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. expm1-log1p-u74.5%

        \[\leadsto \left(-\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{\tan B}\right)\right)}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      3. expm1-udef55.3%

        \[\leadsto \left(-\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{x}{\tan B}\right)} - 1\right)}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Applied egg-rr55.3%

      \[\leadsto \left(-\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{x}{\tan B}\right)} - 1\right)}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. expm1-def74.5%

        \[\leadsto \left(-\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{\tan B}\right)\right)}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. expm1-log1p99.6%

        \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    5. Simplified99.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]

    if 1.46e10 < F

    1. Initial program 51.6%

      \[\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)} \]
    2. Taylor expanded in F around inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Step-by-step derivation
      1. tan-quot99.7%

        \[\leadsto \left(-x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}}\right) + \frac{1}{\sin B} \]
      2. associate-/r/99.8%

        \[\leadsto \left(-x \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \cos B\right)}\right) + \frac{1}{\sin B} \]
    4. Applied egg-rr99.8%

      \[\leadsto \left(-x \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \cos B\right)}\right) + \frac{1}{\sin B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -100000000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 14600000000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \left(\frac{-1}{\sin B} \cdot \cos B\right)\\ \end{array} \]

Alternative 2: 99.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1 + \frac{1}{{F}^{2}}}{\sin B}\\ \mathbf{elif}\;F \leq 1.45:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \left(\frac{-1}{\sin B} \cdot \cos B\right)\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -1.42)
   (+ (* x (/ -1.0 (tan B))) (/ (+ -1.0 (/ 1.0 (pow F 2.0))) (sin B)))
   (if (<= F 1.45)
     (- (/ F (* (sin B) (sqrt 2.0))) (/ x (tan B)))
     (+ (/ 1.0 (sin B)) (* x (* (/ -1.0 (sin B)) (cos B)))))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.42) {
		tmp = (x * (-1.0 / tan(B))) + ((-1.0 + (1.0 / pow(F, 2.0))) / sin(B));
	} else if (F <= 1.45) {
		tmp = (F / (sin(B) * sqrt(2.0))) - (x / tan(B));
	} else {
		tmp = (1.0 / sin(B)) + (x * ((-1.0 / sin(B)) * cos(B)));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-1.42d0)) then
        tmp = (x * ((-1.0d0) / tan(b))) + (((-1.0d0) + (1.0d0 / (f ** 2.0d0))) / sin(b))
    else if (f <= 1.45d0) then
        tmp = (f / (sin(b) * sqrt(2.0d0))) - (x / tan(b))
    else
        tmp = (1.0d0 / sin(b)) + (x * (((-1.0d0) / sin(b)) * cos(b)))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.42) {
		tmp = (x * (-1.0 / Math.tan(B))) + ((-1.0 + (1.0 / Math.pow(F, 2.0))) / Math.sin(B));
	} else if (F <= 1.45) {
		tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - (x / Math.tan(B));
	} else {
		tmp = (1.0 / Math.sin(B)) + (x * ((-1.0 / Math.sin(B)) * Math.cos(B)));
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -1.42:
		tmp = (x * (-1.0 / math.tan(B))) + ((-1.0 + (1.0 / math.pow(F, 2.0))) / math.sin(B))
	elif F <= 1.45:
		tmp = (F / (math.sin(B) * math.sqrt(2.0))) - (x / math.tan(B))
	else:
		tmp = (1.0 / math.sin(B)) + (x * ((-1.0 / math.sin(B)) * math.cos(B)))
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -1.42)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(-1.0 + Float64(1.0 / (F ^ 2.0))) / sin(B)));
	elseif (F <= 1.45)
		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - Float64(x / tan(B)));
	else
		tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(Float64(-1.0 / sin(B)) * cos(B))));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -1.42)
		tmp = (x * (-1.0 / tan(B))) + ((-1.0 + (1.0 / (F ^ 2.0))) / sin(B));
	elseif (F <= 1.45)
		tmp = (F / (sin(B) * sqrt(2.0))) - (x / tan(B));
	else
		tmp = (1.0 / sin(B)) + (x * ((-1.0 / sin(B)) * cos(B)));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -1.42], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 + N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1 + \frac{1}{{F}^{2}}}{\sin B}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.4199999999999999

    1. Initial program 69.0%

      \[\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)} \]
    2. Step-by-step derivation
      1. associate-*l/78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} \]
      2. +-commutative78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}}{\sin B} \]
      3. *-commutative78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \]
      4. fma-udef78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\color{blue}{\left(\mathsf{fma}\left(x, 2, F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}}{\sin B} \]
      5. fma-def78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \]
      6. metadata-eval78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\color{blue}{0.5}\right)}}{\sin B} \]
      7. metadata-eval78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{-0.5}}}{\sin B} \]
      8. fma-def78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}{\sin B} \]
      9. fma-udef78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}{\sin B} \]
      10. *-commutative78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}{\sin B} \]
      11. fma-def78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}{\sin B} \]
      12. fma-def78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}{\sin B} \]
    3. Applied egg-rr78.3%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} \]
    4. Taylor expanded in x around 0 78.3%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
    5. Step-by-step derivation
      1. +-commutative78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} \]
      2. unpow278.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} \]
      3. fma-udef78.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}}{\sin B} \]
    6. Simplified78.3%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}{\sin B} \]
    7. Taylor expanded in F around -inf 99.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\frac{1}{{F}^{2}} - 1}}{\sin B} \]

    if -1.4199999999999999 < F < 1.44999999999999996

    1. Initial program 99.4%

      \[\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)} \]
    2. Taylor expanded in F around 0 98.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Step-by-step derivation
      1. +-commutative98.7%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv98.9%

        \[\leadsto \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg98.9%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - \frac{x}{\tan B}} \]
      4. *-commutative98.9%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot \frac{F}{\sin B}} - \frac{x}{\tan B} \]
      5. sqrt-div98.8%

        \[\leadsto \color{blue}{\frac{\sqrt{1}}{\sqrt{2 + 2 \cdot x}}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
      6. metadata-eval98.8%

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{2 + 2 \cdot x}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
      7. frac-times98.9%

        \[\leadsto \color{blue}{\frac{1 \cdot F}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{\tan B} \]
      8. *-un-lft-identity98.9%

        \[\leadsto \frac{\color{blue}{F}}{\sqrt{2 + 2 \cdot x} \cdot \sin B} - \frac{x}{\tan B} \]
      9. +-commutative98.9%

        \[\leadsto \frac{F}{\sqrt{\color{blue}{2 \cdot x + 2}} \cdot \sin B} - \frac{x}{\tan B} \]
      10. fma-def98.9%

        \[\leadsto \frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}} \cdot \sin B} - \frac{x}{\tan B} \]
    4. Applied egg-rr98.9%

      \[\leadsto \color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 2\right)} \cdot \sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in x around 0 98.9%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2}}} - \frac{x}{\tan B} \]

    if 1.44999999999999996 < F

    1. Initial program 52.4%

      \[\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)} \]
    2. Taylor expanded in F around inf 98.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Step-by-step derivation
      1. tan-quot98.7%

        \[\leadsto \left(-x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}}\right) + \frac{1}{\sin B} \]
      2. associate-/r/98.8%

        \[\leadsto \left(-x \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \cos B\right)}\right) + \frac{1}{\sin B} \]
    4. Applied egg-rr98.8%

      \[\leadsto \left(-x \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \cos B\right)}\right) + \frac{1}{\sin B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1 + \frac{1}{{F}^{2}}}{\sin B}\\ \mathbf{elif}\;F \leq 1.45:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \left(\frac{-1}{\sin B} \cdot \cos B\right)\\ \end{array} \]

Alternative 3: 99.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;t_0 - t_1\\ \mathbf{elif}\;F \leq 1.5:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \left(t_0 \cdot \cos B\right)\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ -1.0 (sin B))) (t_1 (/ x (tan B))))
   (if (<= F -1.42)
     (- t_0 t_1)
     (if (<= F 1.5)
       (- (/ F (* (sin B) (sqrt 2.0))) t_1)
       (+ (/ 1.0 (sin B)) (* x (* t_0 (cos B))))))))
double code(double F, double B, double x) {
	double t_0 = -1.0 / sin(B);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -1.42) {
		tmp = t_0 - t_1;
	} else if (F <= 1.5) {
		tmp = (F / (sin(B) * sqrt(2.0))) - t_1;
	} else {
		tmp = (1.0 / sin(B)) + (x * (t_0 * cos(B)));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (-1.0d0) / sin(b)
    t_1 = x / tan(b)
    if (f <= (-1.42d0)) then
        tmp = t_0 - t_1
    else if (f <= 1.5d0) then
        tmp = (f / (sin(b) * sqrt(2.0d0))) - t_1
    else
        tmp = (1.0d0 / sin(b)) + (x * (t_0 * cos(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 t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -1.42) {
		tmp = t_0 - t_1;
	} else if (F <= 1.5) {
		tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - t_1;
	} else {
		tmp = (1.0 / Math.sin(B)) + (x * (t_0 * Math.cos(B)));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = -1.0 / math.sin(B)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -1.42:
		tmp = t_0 - t_1
	elif F <= 1.5:
		tmp = (F / (math.sin(B) * math.sqrt(2.0))) - t_1
	else:
		tmp = (1.0 / math.sin(B)) + (x * (t_0 * math.cos(B)))
	return tmp
function code(F, B, x)
	t_0 = Float64(-1.0 / sin(B))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1.42)
		tmp = Float64(t_0 - t_1);
	elseif (F <= 1.5)
		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - t_1);
	else
		tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(t_0 * cos(B))));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = -1.0 / sin(B);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -1.42)
		tmp = t_0 - t_1;
	elseif (F <= 1.5)
		tmp = (F / (sin(B) * sqrt(2.0))) - t_1;
	else
		tmp = (1.0 / sin(B)) + (x * (t_0 * cos(B)));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(t$95$0 - t$95$1), $MachinePrecision], If[LessEqual[F, 1.5], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(t$95$0 * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 1.5:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \left(t_0 \cdot \cos B\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.4199999999999999

    1. Initial program 69.0%

      \[\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)} \]
    2. Taylor expanded in F around -inf 98.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative98.9%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv99.1%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg99.1%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr99.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]

    if -1.4199999999999999 < F < 1.5

    1. Initial program 99.4%

      \[\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)} \]
    2. Taylor expanded in F around 0 98.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Step-by-step derivation
      1. +-commutative98.7%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv98.9%

        \[\leadsto \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg98.9%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - \frac{x}{\tan B}} \]
      4. *-commutative98.9%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot \frac{F}{\sin B}} - \frac{x}{\tan B} \]
      5. sqrt-div98.8%

        \[\leadsto \color{blue}{\frac{\sqrt{1}}{\sqrt{2 + 2 \cdot x}}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
      6. metadata-eval98.8%

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{2 + 2 \cdot x}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
      7. frac-times98.9%

        \[\leadsto \color{blue}{\frac{1 \cdot F}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{\tan B} \]
      8. *-un-lft-identity98.9%

        \[\leadsto \frac{\color{blue}{F}}{\sqrt{2 + 2 \cdot x} \cdot \sin B} - \frac{x}{\tan B} \]
      9. +-commutative98.9%

        \[\leadsto \frac{F}{\sqrt{\color{blue}{2 \cdot x + 2}} \cdot \sin B} - \frac{x}{\tan B} \]
      10. fma-def98.9%

        \[\leadsto \frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}} \cdot \sin B} - \frac{x}{\tan B} \]
    4. Applied egg-rr98.9%

      \[\leadsto \color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 2\right)} \cdot \sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in x around 0 98.9%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2}}} - \frac{x}{\tan B} \]

    if 1.5 < F

    1. Initial program 52.4%

      \[\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)} \]
    2. Taylor expanded in F around inf 98.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Step-by-step derivation
      1. tan-quot98.7%

        \[\leadsto \left(-x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}}\right) + \frac{1}{\sin B} \]
      2. associate-/r/98.8%

        \[\leadsto \left(-x \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \cos B\right)}\right) + \frac{1}{\sin B} \]
    4. Applied egg-rr98.8%

      \[\leadsto \left(-x \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \cos B\right)}\right) + \frac{1}{\sin B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.5:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \left(\frac{-1}{\sin B} \cdot \cos B\right)\\ \end{array} \]

Alternative 4: 99.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.5:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -1.42)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 1.5)
       (- (/ F (* (sin B) (sqrt 2.0))) t_0)
       (+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B))))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -1.42) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 1.5) {
		tmp = (F / (sin(B) * sqrt(2.0))) - t_0;
	} else {
		tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-1.42d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 1.5d0) then
        tmp = (f / (sin(b) * sqrt(2.0d0))) - t_0
    else
        tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -1.42) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 1.5) {
		tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -1.42:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 1.5:
		tmp = (F / (math.sin(B) * math.sqrt(2.0))) - t_0
	else:
		tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1.42)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 1.5)
		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - t_0);
	else
		tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -1.42)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 1.5)
		tmp = (F / (sin(B) * sqrt(2.0))) - t_0;
	else
		tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 1.5:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.4199999999999999

    1. Initial program 69.0%

      \[\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)} \]
    2. Taylor expanded in F around -inf 98.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative98.9%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv99.1%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg99.1%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr99.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]

    if -1.4199999999999999 < F < 1.5

    1. Initial program 99.4%

      \[\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)} \]
    2. Taylor expanded in F around 0 98.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Step-by-step derivation
      1. +-commutative98.7%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv98.9%

        \[\leadsto \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg98.9%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - \frac{x}{\tan B}} \]
      4. *-commutative98.9%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot \frac{F}{\sin B}} - \frac{x}{\tan B} \]
      5. sqrt-div98.8%

        \[\leadsto \color{blue}{\frac{\sqrt{1}}{\sqrt{2 + 2 \cdot x}}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
      6. metadata-eval98.8%

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{2 + 2 \cdot x}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
      7. frac-times98.9%

        \[\leadsto \color{blue}{\frac{1 \cdot F}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{\tan B} \]
      8. *-un-lft-identity98.9%

        \[\leadsto \frac{\color{blue}{F}}{\sqrt{2 + 2 \cdot x} \cdot \sin B} - \frac{x}{\tan B} \]
      9. +-commutative98.9%

        \[\leadsto \frac{F}{\sqrt{\color{blue}{2 \cdot x + 2}} \cdot \sin B} - \frac{x}{\tan B} \]
      10. fma-def98.9%

        \[\leadsto \frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}} \cdot \sin B} - \frac{x}{\tan B} \]
    4. Applied egg-rr98.9%

      \[\leadsto \color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 2\right)} \cdot \sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in x around 0 98.9%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2}}} - \frac{x}{\tan B} \]

    if 1.5 < F

    1. Initial program 52.4%

      \[\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)} \]
    2. Taylor expanded in F around inf 98.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.5:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \]

Alternative 5: 92.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1 \cdot 10^{-21}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{-106}:\\ \;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - t_0\\ \mathbf{elif}\;F \leq 8000000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -1e-21)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 4.7e-106)
       (- (/ F (* B (sqrt (+ 2.0 (* x 2.0))))) t_0)
       (if (<= F 8000000.0)
         (- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
         (+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B)))))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -1e-21) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 4.7e-106) {
		tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_0;
	} else if (F <= 8000000.0) {
		tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
	} else {
		tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-1d-21)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 4.7d-106) then
        tmp = (f / (b * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
    else if (f <= 8000000.0d0) then
        tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
    else
        tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -1e-21) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 4.7e-106) {
		tmp = (F / (B * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
	} else if (F <= 8000000.0) {
		tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
	} else {
		tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -1e-21:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 4.7e-106:
		tmp = (F / (B * math.sqrt((2.0 + (x * 2.0))))) - t_0
	elif F <= 8000000.0:
		tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B)
	else:
		tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1e-21)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 4.7e-106)
		tmp = Float64(Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0);
	elseif (F <= 8000000.0)
		tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -1e-21)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 4.7e-106)
		tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_0;
	elseif (F <= 8000000.0)
		tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B);
	else
		tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.7e-106], N[(N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -9.99999999999999908e-22

    1. Initial program 70.0%

      \[\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)} \]
    2. Taylor expanded in F around -inf 97.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative97.0%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv97.1%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg97.1%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr97.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]

    if -9.99999999999999908e-22 < F < 4.6999999999999999e-106

    1. Initial program 99.5%

      \[\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)} \]
    2. Taylor expanded in F around 0 99.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Step-by-step derivation
      1. +-commutative99.5%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv99.7%

        \[\leadsto \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg99.7%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - \frac{x}{\tan B}} \]
      4. *-commutative99.7%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot \frac{F}{\sin B}} - \frac{x}{\tan B} \]
      5. sqrt-div99.6%

        \[\leadsto \color{blue}{\frac{\sqrt{1}}{\sqrt{2 + 2 \cdot x}}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
      6. metadata-eval99.6%

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{2 + 2 \cdot x}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
      7. frac-times99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot F}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{\tan B} \]
      8. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{F}}{\sqrt{2 + 2 \cdot x} \cdot \sin B} - \frac{x}{\tan B} \]
      9. +-commutative99.7%

        \[\leadsto \frac{F}{\sqrt{\color{blue}{2 \cdot x + 2}} \cdot \sin B} - \frac{x}{\tan B} \]
      10. fma-def99.7%

        \[\leadsto \frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}} \cdot \sin B} - \frac{x}{\tan B} \]
    4. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 2\right)} \cdot \sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in B around 0 85.4%

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{\tan B} \]

    if 4.6999999999999999e-106 < F < 8e6

    1. Initial program 99.2%

      \[\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)} \]
    2. Taylor expanded in B around 0 91.3%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]

    if 8e6 < F

    1. Initial program 51.6%

      \[\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)} \]
    2. Taylor expanded in F around inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification93.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{-21}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{-106}:\\ \;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 8000000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \]

Alternative 6: 92.6% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq 3.65 \cdot 10^{-109}:\\
\;\;\;\;t_0 + t_1 \cdot \frac{F}{B}\\

\mathbf{elif}\;F \leq 45000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_1 - \frac{x}{B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -128000

    1. Initial program 68.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 99.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv99.9%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg99.9%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]

    if -128000 < F < 3.6500000000000002e-109

    1. Initial program 99.4%

      \[\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)} \]
    2. Taylor expanded in B around 0 83.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]

    if 3.6500000000000002e-109 < F < 45000

    1. Initial program 99.2%

      \[\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)} \]
    2. Taylor expanded in B around 0 91.3%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]

    if 45000 < F

    1. Initial program 51.6%

      \[\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)} \]
    2. Taylor expanded in F around inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification93.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -128000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.65 \cdot 10^{-109}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 45000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \]

Alternative 7: 89.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{B}\\ \mathbf{if}\;F \leq -0.45:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -5 \cdot 10^{-77}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-187}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 3.8 \cdot 10^{-16}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (- (/ F (/ (sin B) (sqrt 0.5))) (/ x B))))
   (if (<= F -0.45)
     (- (/ -1.0 (sin B)) (/ x (tan B)))
     (if (<= F -5e-77)
       t_0
       (if (<= F 8e-187)
         (/ (* (cos B) (- x)) (sin B))
         (if (<= F 3.8e-16)
           t_0
           (+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B))))))))))
double code(double F, double B, double x) {
	double t_0 = (F / (sin(B) / sqrt(0.5))) - (x / B);
	double tmp;
	if (F <= -0.45) {
		tmp = (-1.0 / sin(B)) - (x / tan(B));
	} else if (F <= -5e-77) {
		tmp = t_0;
	} else if (F <= 8e-187) {
		tmp = (cos(B) * -x) / sin(B);
	} else if (F <= 3.8e-16) {
		tmp = t_0;
	} else {
		tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (f / (sin(b) / sqrt(0.5d0))) - (x / b)
    if (f <= (-0.45d0)) then
        tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
    else if (f <= (-5d-77)) then
        tmp = t_0
    else if (f <= 8d-187) then
        tmp = (cos(b) * -x) / sin(b)
    else if (f <= 3.8d-16) then
        tmp = t_0
    else
        tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = (F / (Math.sin(B) / Math.sqrt(0.5))) - (x / B);
	double tmp;
	if (F <= -0.45) {
		tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
	} else if (F <= -5e-77) {
		tmp = t_0;
	} else if (F <= 8e-187) {
		tmp = (Math.cos(B) * -x) / Math.sin(B);
	} else if (F <= 3.8e-16) {
		tmp = t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = (F / (math.sin(B) / math.sqrt(0.5))) - (x / B)
	tmp = 0
	if F <= -0.45:
		tmp = (-1.0 / math.sin(B)) - (x / math.tan(B))
	elif F <= -5e-77:
		tmp = t_0
	elif F <= 8e-187:
		tmp = (math.cos(B) * -x) / math.sin(B)
	elif F <= 3.8e-16:
		tmp = t_0
	else:
		tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - Float64(x / B))
	tmp = 0.0
	if (F <= -0.45)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B)));
	elseif (F <= -5e-77)
		tmp = t_0;
	elseif (F <= 8e-187)
		tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B));
	elseif (F <= 3.8e-16)
		tmp = t_0;
	else
		tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = (F / (sin(B) / sqrt(0.5))) - (x / B);
	tmp = 0.0;
	if (F <= -0.45)
		tmp = (-1.0 / sin(B)) - (x / tan(B));
	elseif (F <= -5e-77)
		tmp = t_0;
	elseif (F <= 8e-187)
		tmp = (cos(B) * -x) / sin(B);
	elseif (F <= 3.8e-16)
		tmp = t_0;
	else
		tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5e-77], t$95$0, If[LessEqual[F, 8e-187], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.8e-16], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq -5 \cdot 10^{-77}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;F \leq 3.8 \cdot 10^{-16}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -0.450000000000000011

    1. Initial program 69.0%

      \[\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)} \]
    2. Taylor expanded in F around -inf 98.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative98.9%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv99.1%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg99.1%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr99.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]

    if -0.450000000000000011 < F < -4.99999999999999963e-77 or 8.0000000000000001e-187 < F < 3.80000000000000012e-16

    1. Initial program 99.4%

      \[\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)} \]
    2. Taylor expanded in F around 0 98.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Taylor expanded in x around 0 98.2%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-/l*98.1%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    5. Simplified98.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    6. Taylor expanded in B around 0 76.2%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\frac{\sin B}{\sqrt{0.5}}} \]

    if -4.99999999999999963e-77 < F < 8.0000000000000001e-187

    1. Initial program 99.4%

      \[\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)} \]
    2. Taylor expanded in F around -inf 39.2%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in x around inf 83.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-*r/83.0%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
      2. *-commutative83.0%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(\cos B \cdot x\right)}}{\sin B} \]
      3. neg-mul-183.0%

        \[\leadsto \frac{\color{blue}{-\cos B \cdot x}}{\sin B} \]
      4. distribute-lft-neg-in83.0%

        \[\leadsto \frac{\color{blue}{\left(-\cos B\right) \cdot x}}{\sin B} \]
    5. Simplified83.0%

      \[\leadsto \color{blue}{\frac{\left(-\cos B\right) \cdot x}{\sin B}} \]

    if 3.80000000000000012e-16 < F

    1. Initial program 54.6%

      \[\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)} \]
    2. Taylor expanded in F around inf 97.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification90.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -0.45:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -5 \cdot 10^{-77}:\\ \;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-187}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 3.8 \cdot 10^{-16}:\\ \;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \]

Alternative 8: 91.4% accurate, 1.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -9.99999999999999908e-22

    1. Initial program 70.0%

      \[\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)} \]
    2. Taylor expanded in F around -inf 97.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative97.0%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv97.1%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg97.1%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr97.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]

    if -9.99999999999999908e-22 < F < 2.0499999999999999e-29

    1. Initial program 99.4%

      \[\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)} \]
    2. Taylor expanded in F around 0 99.4%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv99.7%

        \[\leadsto \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg99.7%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - \frac{x}{\tan B}} \]
      4. *-commutative99.7%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot \frac{F}{\sin B}} - \frac{x}{\tan B} \]
      5. sqrt-div99.6%

        \[\leadsto \color{blue}{\frac{\sqrt{1}}{\sqrt{2 + 2 \cdot x}}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
      6. metadata-eval99.6%

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{2 + 2 \cdot x}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
      7. frac-times99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot F}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{\tan B} \]
      8. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{F}}{\sqrt{2 + 2 \cdot x} \cdot \sin B} - \frac{x}{\tan B} \]
      9. +-commutative99.7%

        \[\leadsto \frac{F}{\sqrt{\color{blue}{2 \cdot x + 2}} \cdot \sin B} - \frac{x}{\tan B} \]
      10. fma-def99.7%

        \[\leadsto \frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}} \cdot \sin B} - \frac{x}{\tan B} \]
    4. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 2\right)} \cdot \sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in B around 0 83.6%

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{\tan B} \]

    if 2.0499999999999999e-29 < F

    1. Initial program 55.3%

      \[\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)} \]
    2. Taylor expanded in F around inf 96.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{-21}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-29}:\\ \;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \]

Alternative 9: 71.7% accurate, 1.5× speedup?

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

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

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

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

\mathbf{elif}\;F \leq -7.2 \cdot 10^{-76}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\

\mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -3.8999999999999998e77 or -2.25e27 < F < -1.70000000000000007e-10

    1. Initial program 66.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 97.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative97.8%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv97.9%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg97.9%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr97.9%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in B around 0 79.2%

      \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]

    if -3.8999999999999998e77 < F < -2.25e27

    1. Initial program 99.7%

      \[\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)} \]
    2. Taylor expanded in F around -inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 99.8%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]

    if -1.70000000000000007e-10 < F < -7.2000000000000001e-76

    1. Initial program 99.5%

      \[\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)} \]
    2. Taylor expanded in F around 0 99.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Taylor expanded in x around 0 99.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-/l*99.1%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    5. Simplified99.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    6. Taylor expanded in x around 0 64.5%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    7. Step-by-step derivation
      1. associate-*l/64.5%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{0.5}} \]
      2. *-commutative64.5%

        \[\leadsto \color{blue}{\sqrt{0.5} \cdot \frac{F}{\sin B}} \]
    8. Simplified64.5%

      \[\leadsto \color{blue}{\sqrt{0.5} \cdot \frac{F}{\sin B}} \]

    if -7.2000000000000001e-76 < F < 4.1e18

    1. Initial program 98.4%

      \[\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)} \]
    2. Taylor expanded in F around -inf 39.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in x around inf 74.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    4. Step-by-step derivation
      1. mul-1-neg74.6%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. *-commutative74.6%

        \[\leadsto -\frac{\color{blue}{\cos B \cdot x}}{\sin B} \]
      3. associate-*r/74.6%

        \[\leadsto -\color{blue}{\cos B \cdot \frac{x}{\sin B}} \]
      4. distribute-rgt-neg-in74.6%

        \[\leadsto \color{blue}{\cos B \cdot \left(-\frac{x}{\sin B}\right)} \]
      5. *-lft-identity74.6%

        \[\leadsto \cos B \cdot \left(-\color{blue}{1 \cdot \frac{x}{\sin B}}\right) \]
      6. metadata-eval74.6%

        \[\leadsto \cos B \cdot \left(-\color{blue}{\frac{-1}{-1}} \cdot \frac{x}{\sin B}\right) \]
      7. times-frac74.6%

        \[\leadsto \cos B \cdot \left(-\color{blue}{\frac{-1 \cdot x}{-1 \cdot \sin B}}\right) \]
      8. neg-mul-174.6%

        \[\leadsto \cos B \cdot \left(-\frac{\color{blue}{-x}}{-1 \cdot \sin B}\right) \]
      9. neg-mul-174.6%

        \[\leadsto \cos B \cdot \left(-\frac{-x}{\color{blue}{-\sin B}}\right) \]
      10. distribute-frac-neg74.6%

        \[\leadsto \cos B \cdot \color{blue}{\frac{-\left(-x\right)}{-\sin B}} \]
      11. remove-double-neg74.6%

        \[\leadsto \cos B \cdot \frac{\color{blue}{x}}{-\sin B} \]
    5. Simplified74.6%

      \[\leadsto \color{blue}{\cos B \cdot \frac{x}{-\sin B}} \]

    if 4.1e18 < F

    1. Initial program 51.7%

      \[\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)} \]
    2. Taylor expanded in F around inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 81.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{1}{\sin B} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification77.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.9 \cdot 10^{+77}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.25 \cdot 10^{+27}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.7 \cdot 10^{-10}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -7.2 \cdot 10^{-76}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\ \;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]

Alternative 10: 71.7% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;F \leq -8.8 \cdot 10^{-7}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq -7.5 \cdot 10^{-77}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -6.5999999999999996e77 or -5.8000000000000002e28 < F < -8.8000000000000004e-7

    1. Initial program 66.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 97.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative97.8%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv97.9%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg97.9%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr97.9%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in B around 0 79.2%

      \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]

    if -6.5999999999999996e77 < F < -5.8000000000000002e28

    1. Initial program 99.7%

      \[\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)} \]
    2. Taylor expanded in F around -inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 99.8%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]

    if -8.8000000000000004e-7 < F < -7.5000000000000006e-77

    1. Initial program 99.5%

      \[\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)} \]
    2. Taylor expanded in F around 0 99.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Taylor expanded in x around 0 99.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-/l*99.1%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    5. Simplified99.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    6. Taylor expanded in x around 0 64.5%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    7. Step-by-step derivation
      1. associate-*l/64.5%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{0.5}} \]
      2. *-commutative64.5%

        \[\leadsto \color{blue}{\sqrt{0.5} \cdot \frac{F}{\sin B}} \]
    8. Simplified64.5%

      \[\leadsto \color{blue}{\sqrt{0.5} \cdot \frac{F}{\sin B}} \]

    if -7.5000000000000006e-77 < F < 4.1e18

    1. Initial program 98.4%

      \[\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)} \]
    2. Taylor expanded in F around -inf 39.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in x around inf 74.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-*r/74.6%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
      2. *-commutative74.6%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(\cos B \cdot x\right)}}{\sin B} \]
      3. neg-mul-174.6%

        \[\leadsto \frac{\color{blue}{-\cos B \cdot x}}{\sin B} \]
      4. distribute-lft-neg-in74.6%

        \[\leadsto \frac{\color{blue}{\left(-\cos B\right) \cdot x}}{\sin B} \]
    5. Simplified74.6%

      \[\leadsto \color{blue}{\frac{\left(-\cos B\right) \cdot x}{\sin B}} \]

    if 4.1e18 < F

    1. Initial program 51.7%

      \[\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)} \]
    2. Taylor expanded in F around inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 81.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{1}{\sin B} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification77.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.6 \cdot 10^{+77}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -5.8 \cdot 10^{+28}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -8.8 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{-77}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]

Alternative 11: 85.6% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -9 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.02 \cdot 10^{-75}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-31}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -9e-7)
   (- (/ -1.0 (sin B)) (/ x (tan B)))
   (if (<= F -1.02e-75)
     (* (/ F (sin B)) (sqrt 0.5))
     (if (<= F 3.7e-31)
       (/ (* (cos B) (- x)) (sin B))
       (+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B))))))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -9e-7) {
		tmp = (-1.0 / sin(B)) - (x / tan(B));
	} else if (F <= -1.02e-75) {
		tmp = (F / sin(B)) * sqrt(0.5);
	} else if (F <= 3.7e-31) {
		tmp = (cos(B) * -x) / sin(B);
	} else {
		tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-9d-7)) then
        tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
    else if (f <= (-1.02d-75)) then
        tmp = (f / sin(b)) * sqrt(0.5d0)
    else if (f <= 3.7d-31) then
        tmp = (cos(b) * -x) / sin(b)
    else
        tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -9e-7) {
		tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
	} else if (F <= -1.02e-75) {
		tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
	} else if (F <= 3.7e-31) {
		tmp = (Math.cos(B) * -x) / Math.sin(B);
	} else {
		tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -9e-7:
		tmp = (-1.0 / math.sin(B)) - (x / math.tan(B))
	elif F <= -1.02e-75:
		tmp = (F / math.sin(B)) * math.sqrt(0.5)
	elif F <= 3.7e-31:
		tmp = (math.cos(B) * -x) / math.sin(B)
	else:
		tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -9e-7)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B)));
	elseif (F <= -1.02e-75)
		tmp = Float64(Float64(F / sin(B)) * sqrt(0.5));
	elseif (F <= 3.7e-31)
		tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B));
	else
		tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -9e-7)
		tmp = (-1.0 / sin(B)) - (x / tan(B));
	elseif (F <= -1.02e-75)
		tmp = (F / sin(B)) * sqrt(0.5);
	elseif (F <= 3.7e-31)
		tmp = (cos(B) * -x) / sin(B);
	else
		tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -9e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.02e-75], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-31], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\

\mathbf{elif}\;F \leq -1.02 \cdot 10^{-75}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -8.99999999999999959e-7

    1. Initial program 69.7%

      \[\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)} \]
    2. Taylor expanded in F around -inf 98.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative98.0%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv98.1%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg98.1%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr98.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]

    if -8.99999999999999959e-7 < F < -1.01999999999999997e-75

    1. Initial program 99.5%

      \[\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)} \]
    2. Taylor expanded in F around 0 99.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Taylor expanded in x around 0 99.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-/l*99.1%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    5. Simplified99.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    6. Taylor expanded in x around 0 64.5%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    7. Step-by-step derivation
      1. associate-*l/64.5%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{0.5}} \]
      2. *-commutative64.5%

        \[\leadsto \color{blue}{\sqrt{0.5} \cdot \frac{F}{\sin B}} \]
    8. Simplified64.5%

      \[\leadsto \color{blue}{\sqrt{0.5} \cdot \frac{F}{\sin B}} \]

    if -1.01999999999999997e-75 < F < 3.6999999999999998e-31

    1. Initial program 99.4%

      \[\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)} \]
    2. Taylor expanded in F around -inf 38.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in x around inf 75.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-*r/75.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
      2. *-commutative75.9%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(\cos B \cdot x\right)}}{\sin B} \]
      3. neg-mul-175.9%

        \[\leadsto \frac{\color{blue}{-\cos B \cdot x}}{\sin B} \]
      4. distribute-lft-neg-in75.9%

        \[\leadsto \frac{\color{blue}{\left(-\cos B\right) \cdot x}}{\sin B} \]
    5. Simplified75.9%

      \[\leadsto \color{blue}{\frac{\left(-\cos B\right) \cdot x}{\sin B}} \]

    if 3.6999999999999998e-31 < F

    1. Initial program 55.3%

      \[\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)} \]
    2. Taylor expanded in F around inf 96.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification88.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -9 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.02 \cdot 10^{-75}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-31}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \]

Alternative 12: 78.6% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.7 \cdot 10^{-8}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.2 \cdot 10^{-76}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -3.7e-8)
   (- (/ -1.0 (sin B)) (/ x (tan B)))
   (if (<= F -1.2e-76)
     (* (/ F (sin B)) (sqrt 0.5))
     (if (<= F 4.1e+18)
       (/ (* (cos B) (- x)) (sin B))
       (- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -3.7e-8) {
		tmp = (-1.0 / sin(B)) - (x / tan(B));
	} else if (F <= -1.2e-76) {
		tmp = (F / sin(B)) * sqrt(0.5);
	} else if (F <= 4.1e+18) {
		tmp = (cos(B) * -x) / sin(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 <= (-3.7d-8)) then
        tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
    else if (f <= (-1.2d-76)) then
        tmp = (f / sin(b)) * sqrt(0.5d0)
    else if (f <= 4.1d+18) then
        tmp = (cos(b) * -x) / sin(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 <= -3.7e-8) {
		tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
	} else if (F <= -1.2e-76) {
		tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
	} else if (F <= 4.1e+18) {
		tmp = (Math.cos(B) * -x) / Math.sin(B);
	} else {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -3.7e-8:
		tmp = (-1.0 / math.sin(B)) - (x / math.tan(B))
	elif F <= -1.2e-76:
		tmp = (F / math.sin(B)) * math.sqrt(0.5)
	elif F <= 4.1e+18:
		tmp = (math.cos(B) * -x) / math.sin(B)
	else:
		tmp = (1.0 / math.sin(B)) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -3.7e-8)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B)));
	elseif (F <= -1.2e-76)
		tmp = Float64(Float64(F / sin(B)) * sqrt(0.5));
	elseif (F <= 4.1e+18)
		tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(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 <= -3.7e-8)
		tmp = (-1.0 / sin(B)) - (x / tan(B));
	elseif (F <= -1.2e-76)
		tmp = (F / sin(B)) * sqrt(0.5);
	elseif (F <= 4.1e+18)
		tmp = (cos(B) * -x) / sin(B);
	else
		tmp = (1.0 / sin(B)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -3.7e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.2e-76], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e+18], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[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 -3.7 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\

\mathbf{elif}\;F \leq -1.2 \cdot 10^{-76}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -3.7e-8

    1. Initial program 69.7%

      \[\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)} \]
    2. Taylor expanded in F around -inf 98.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative98.0%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv98.1%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg98.1%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr98.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]

    if -3.7e-8 < F < -1.20000000000000007e-76

    1. Initial program 99.5%

      \[\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)} \]
    2. Taylor expanded in F around 0 99.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Taylor expanded in x around 0 99.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-/l*99.1%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    5. Simplified99.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    6. Taylor expanded in x around 0 64.5%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    7. Step-by-step derivation
      1. associate-*l/64.5%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{0.5}} \]
      2. *-commutative64.5%

        \[\leadsto \color{blue}{\sqrt{0.5} \cdot \frac{F}{\sin B}} \]
    8. Simplified64.5%

      \[\leadsto \color{blue}{\sqrt{0.5} \cdot \frac{F}{\sin B}} \]

    if -1.20000000000000007e-76 < F < 4.1e18

    1. Initial program 98.4%

      \[\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)} \]
    2. Taylor expanded in F around -inf 39.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in x around inf 74.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-*r/74.6%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
      2. *-commutative74.6%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(\cos B \cdot x\right)}}{\sin B} \]
      3. neg-mul-174.6%

        \[\leadsto \frac{\color{blue}{-\cos B \cdot x}}{\sin B} \]
      4. distribute-lft-neg-in74.6%

        \[\leadsto \frac{\color{blue}{\left(-\cos B\right) \cdot x}}{\sin B} \]
    5. Simplified74.6%

      \[\leadsto \color{blue}{\frac{\left(-\cos B\right) \cdot x}{\sin B}} \]

    if 4.1e18 < F

    1. Initial program 51.7%

      \[\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)} \]
    2. Taylor expanded in F around inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 81.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{1}{\sin B} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification83.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.7 \cdot 10^{-8}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.2 \cdot 10^{-76}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]

Alternative 13: 58.5% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{if}\;x \leq -2.7 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-301}:\\ \;\;\;\;t_0 - \frac{x}{B}\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-251}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-48}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ -1.0 (sin B))) (t_1 (- (/ 1.0 B) (* x (/ 1.0 (tan B))))))
   (if (<= x -2.7e-84)
     t_1
     (if (<= x -2.2e-301)
       (- t_0 (/ x B))
       (if (<= x 6e-251)
         (* (/ F (sin B)) (sqrt 0.5))
         (if (<= x 6.5e-48) t_0 t_1))))))
double code(double F, double B, double x) {
	double t_0 = -1.0 / sin(B);
	double t_1 = (1.0 / B) - (x * (1.0 / tan(B)));
	double tmp;
	if (x <= -2.7e-84) {
		tmp = t_1;
	} else if (x <= -2.2e-301) {
		tmp = t_0 - (x / B);
	} else if (x <= 6e-251) {
		tmp = (F / sin(B)) * sqrt(0.5);
	} else if (x <= 6.5e-48) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (-1.0d0) / sin(b)
    t_1 = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
    if (x <= (-2.7d-84)) then
        tmp = t_1
    else if (x <= (-2.2d-301)) then
        tmp = t_0 - (x / b)
    else if (x <= 6d-251) then
        tmp = (f / sin(b)) * sqrt(0.5d0)
    else if (x <= 6.5d-48) then
        tmp = t_0
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = -1.0 / Math.sin(B);
	double t_1 = (1.0 / B) - (x * (1.0 / Math.tan(B)));
	double tmp;
	if (x <= -2.7e-84) {
		tmp = t_1;
	} else if (x <= -2.2e-301) {
		tmp = t_0 - (x / B);
	} else if (x <= 6e-251) {
		tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
	} else if (x <= 6.5e-48) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = -1.0 / math.sin(B)
	t_1 = (1.0 / B) - (x * (1.0 / math.tan(B)))
	tmp = 0
	if x <= -2.7e-84:
		tmp = t_1
	elif x <= -2.2e-301:
		tmp = t_0 - (x / B)
	elif x <= 6e-251:
		tmp = (F / math.sin(B)) * math.sqrt(0.5)
	elif x <= 6.5e-48:
		tmp = t_0
	else:
		tmp = t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(-1.0 / sin(B))
	t_1 = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B))))
	tmp = 0.0
	if (x <= -2.7e-84)
		tmp = t_1;
	elseif (x <= -2.2e-301)
		tmp = Float64(t_0 - Float64(x / B));
	elseif (x <= 6e-251)
		tmp = Float64(Float64(F / sin(B)) * sqrt(0.5));
	elseif (x <= 6.5e-48)
		tmp = t_0;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = -1.0 / sin(B);
	t_1 = (1.0 / B) - (x * (1.0 / tan(B)));
	tmp = 0.0;
	if (x <= -2.7e-84)
		tmp = t_1;
	elseif (x <= -2.2e-301)
		tmp = t_0 - (x / B);
	elseif (x <= 6e-251)
		tmp = (F / sin(B)) * sqrt(0.5);
	elseif (x <= 6.5e-48)
		tmp = t_0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.7e-84], t$95$1, If[LessEqual[x, -2.2e-301], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e-251], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-48], t$95$0, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
t_1 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;x \leq -2.7 \cdot 10^{-84}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -2.2 \cdot 10^{-301}:\\
\;\;\;\;t_0 - \frac{x}{B}\\

\mathbf{elif}\;x \leq 6 \cdot 10^{-251}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\

\mathbf{elif}\;x \leq 6.5 \cdot 10^{-48}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.6999999999999999e-84 or 6.5e-48 < x

    1. Initial program 85.7%

      \[\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)} \]
    2. Taylor expanded in F around inf 85.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 87.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{B}} \]

    if -2.6999999999999999e-84 < x < -2.2e-301

    1. Initial program 69.8%

      \[\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)} \]
    2. Taylor expanded in F around -inf 41.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 41.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]

    if -2.2e-301 < x < 5.9999999999999997e-251

    1. Initial program 77.3%

      \[\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)} \]
    2. Taylor expanded in F around 0 63.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Taylor expanded in x around 0 63.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-/l*63.9%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    5. Simplified63.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    6. Taylor expanded in x around 0 55.7%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    7. Step-by-step derivation
      1. associate-*l/55.5%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{0.5}} \]
      2. *-commutative55.5%

        \[\leadsto \color{blue}{\sqrt{0.5} \cdot \frac{F}{\sin B}} \]
    8. Simplified55.5%

      \[\leadsto \color{blue}{\sqrt{0.5} \cdot \frac{F}{\sin B}} \]

    if 5.9999999999999997e-251 < x < 6.5e-48

    1. Initial program 66.2%

      \[\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)} \]
    2. Taylor expanded in F around -inf 38.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative38.6%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv38.6%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg38.6%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr38.6%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in x around 0 38.6%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification66.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-84}:\\ \;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-301}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-251}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-48}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\ \end{array} \]

Alternative 14: 58.6% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{if}\;x \leq -6.8 \cdot 10^{-83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.7 \cdot 10^{-303}:\\ \;\;\;\;t_0 - \frac{x}{B}\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{-254}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{-43}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ -1.0 (sin B))) (t_1 (- (/ 1.0 B) (* x (/ 1.0 (tan B))))))
   (if (<= x -6.8e-83)
     t_1
     (if (<= x -1.7e-303)
       (- t_0 (/ x B))
       (if (<= x 7.6e-254)
         (/ (* F (sqrt 0.5)) (sin B))
         (if (<= x 6.8e-43) t_0 t_1))))))
double code(double F, double B, double x) {
	double t_0 = -1.0 / sin(B);
	double t_1 = (1.0 / B) - (x * (1.0 / tan(B)));
	double tmp;
	if (x <= -6.8e-83) {
		tmp = t_1;
	} else if (x <= -1.7e-303) {
		tmp = t_0 - (x / B);
	} else if (x <= 7.6e-254) {
		tmp = (F * sqrt(0.5)) / sin(B);
	} else if (x <= 6.8e-43) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (-1.0d0) / sin(b)
    t_1 = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
    if (x <= (-6.8d-83)) then
        tmp = t_1
    else if (x <= (-1.7d-303)) then
        tmp = t_0 - (x / b)
    else if (x <= 7.6d-254) then
        tmp = (f * sqrt(0.5d0)) / sin(b)
    else if (x <= 6.8d-43) then
        tmp = t_0
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = -1.0 / Math.sin(B);
	double t_1 = (1.0 / B) - (x * (1.0 / Math.tan(B)));
	double tmp;
	if (x <= -6.8e-83) {
		tmp = t_1;
	} else if (x <= -1.7e-303) {
		tmp = t_0 - (x / B);
	} else if (x <= 7.6e-254) {
		tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
	} else if (x <= 6.8e-43) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = -1.0 / math.sin(B)
	t_1 = (1.0 / B) - (x * (1.0 / math.tan(B)))
	tmp = 0
	if x <= -6.8e-83:
		tmp = t_1
	elif x <= -1.7e-303:
		tmp = t_0 - (x / B)
	elif x <= 7.6e-254:
		tmp = (F * math.sqrt(0.5)) / math.sin(B)
	elif x <= 6.8e-43:
		tmp = t_0
	else:
		tmp = t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(-1.0 / sin(B))
	t_1 = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B))))
	tmp = 0.0
	if (x <= -6.8e-83)
		tmp = t_1;
	elseif (x <= -1.7e-303)
		tmp = Float64(t_0 - Float64(x / B));
	elseif (x <= 7.6e-254)
		tmp = Float64(Float64(F * sqrt(0.5)) / sin(B));
	elseif (x <= 6.8e-43)
		tmp = t_0;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = -1.0 / sin(B);
	t_1 = (1.0 / B) - (x * (1.0 / tan(B)));
	tmp = 0.0;
	if (x <= -6.8e-83)
		tmp = t_1;
	elseif (x <= -1.7e-303)
		tmp = t_0 - (x / B);
	elseif (x <= 7.6e-254)
		tmp = (F * sqrt(0.5)) / sin(B);
	elseif (x <= 6.8e-43)
		tmp = t_0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e-83], t$95$1, If[LessEqual[x, -1.7e-303], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.6e-254], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e-43], t$95$0, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
t_1 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{-83}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -1.7 \cdot 10^{-303}:\\
\;\;\;\;t_0 - \frac{x}{B}\\

\mathbf{elif}\;x \leq 7.6 \cdot 10^{-254}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\

\mathbf{elif}\;x \leq 6.8 \cdot 10^{-43}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -6.7999999999999995e-83 or 6.8000000000000001e-43 < x

    1. Initial program 85.7%

      \[\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)} \]
    2. Taylor expanded in F around inf 85.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 87.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{B}} \]

    if -6.7999999999999995e-83 < x < -1.7e-303

    1. Initial program 69.8%

      \[\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)} \]
    2. Taylor expanded in F around -inf 41.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 41.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]

    if -1.7e-303 < x < 7.6000000000000002e-254

    1. Initial program 77.3%

      \[\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)} \]
    2. Taylor expanded in F around 0 63.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Taylor expanded in x around 0 63.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-/l*63.9%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    5. Simplified63.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    6. Taylor expanded in x around 0 55.7%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]

    if 7.6000000000000002e-254 < x < 6.8000000000000001e-43

    1. Initial program 66.2%

      \[\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)} \]
    2. Taylor expanded in F around -inf 38.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative38.6%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv38.6%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg38.6%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr38.6%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in x around 0 38.6%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification66.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{-83}:\\ \;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;x \leq -1.7 \cdot 10^{-303}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{-254}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{-43}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\ \end{array} \]

Alternative 15: 54.4% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{-52}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x \leq 4 \cdot 10^{-75}:\\
\;\;\;\;\frac{-1}{\sin B}\\

\mathbf{elif}\;x \leq 2.05 \cdot 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\

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

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -9.19999999999999977e-52 or 2.9e50 < x

    1. Initial program 88.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 90.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative90.5%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv90.7%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg90.7%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr90.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in B around 0 93.2%

      \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]

    if -9.19999999999999977e-52 < x < 3.9999999999999998e-75

    1. Initial program 68.0%

      \[\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)} \]
    2. Taylor expanded in F around -inf 36.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative36.5%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv36.5%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg36.5%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr36.5%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in x around 0 36.5%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

    if 3.9999999999999998e-75 < x < 2.0499999999999999e-6

    1. Initial program 88.4%

      \[\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)} \]
    2. Taylor expanded in F around 0 68.2%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    3. Taylor expanded in x around 0 68.2%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    4. Step-by-step derivation
      1. associate-/l*68.2%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    5. Simplified68.2%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\frac{\sin B}{\sqrt{0.5}}}} \]
    6. Taylor expanded in B around 0 47.1%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5} - x}{B}} \]

    if 2.0499999999999999e-6 < x < 2.9e50

    1. Initial program 63.2%

      \[\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)} \]
    2. Taylor expanded in F around inf 83.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 76.1%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification62.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{-52}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-75}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{-6}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{+50}:\\ \;\;\;\;\frac{1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 16: 62.4% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -8.0000000000000004e76 or -3.55e28 < F < 4.1e18

    1. Initial program 85.1%

      \[\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)} \]
    2. Taylor expanded in F around -inf 63.2%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative63.2%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv63.3%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg63.3%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr63.3%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in B around 0 59.6%

      \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]

    if -8.0000000000000004e76 < F < -3.55e28

    1. Initial program 99.7%

      \[\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)} \]
    2. Taylor expanded in F around -inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 99.8%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]

    if 4.1e18 < F

    1. Initial program 51.7%

      \[\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)} \]
    2. Taylor expanded in F around inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 81.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{1}{\sin B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8 \cdot 10^{+76}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3.55 \cdot 10^{+28}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]

Alternative 17: 57.1% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{-81} \lor \neg \left(x \leq 1.7 \cdot 10^{-45}\right):\\ \;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (or (<= x -1.35e-81) (not (<= x 1.7e-45)))
   (- (/ 1.0 B) (* x (/ 1.0 (tan B))))
   (/ -1.0 (sin B))))
double code(double F, double B, double x) {
	double tmp;
	if ((x <= -1.35e-81) || !(x <= 1.7e-45)) {
		tmp = (1.0 / B) - (x * (1.0 / tan(B)));
	} else {
		tmp = -1.0 / sin(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.35d-81)) .or. (.not. (x <= 1.7d-45))) then
        tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
    else
        tmp = (-1.0d0) / sin(b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if ((x <= -1.35e-81) || !(x <= 1.7e-45)) {
		tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
	} else {
		tmp = -1.0 / Math.sin(B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if (x <= -1.35e-81) or not (x <= 1.7e-45):
		tmp = (1.0 / B) - (x * (1.0 / math.tan(B)))
	else:
		tmp = -1.0 / math.sin(B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if ((x <= -1.35e-81) || !(x <= 1.7e-45))
		tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B))));
	else
		tmp = Float64(-1.0 / sin(B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if ((x <= -1.35e-81) || ~((x <= 1.7e-45)))
		tmp = (1.0 / B) - (x * (1.0 / tan(B)));
	else
		tmp = -1.0 / sin(B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.35e-81], N[Not[LessEqual[x, 1.7e-45]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{-81} \lor \neg \left(x \leq 1.7 \cdot 10^{-45}\right):\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.34999999999999995e-81 or 1.70000000000000002e-45 < x

    1. Initial program 85.7%

      \[\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)} \]
    2. Taylor expanded in F around inf 85.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 87.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{B}} \]

    if -1.34999999999999995e-81 < x < 1.70000000000000002e-45

    1. Initial program 69.8%

      \[\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)} \]
    2. Taylor expanded in F around -inf 36.4%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative36.4%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv36.4%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg36.4%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr36.4%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in x around 0 36.4%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{-81} \lor \neg \left(x \leq 1.7 \cdot 10^{-45}\right):\\ \;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \end{array} \]

Alternative 18: 57.4% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{-52} \lor \neg \left(x \leq 2.7 \cdot 10^{-89}\right):\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (or (<= x -8e-52) (not (<= x 2.7e-89)))
   (- (/ -1.0 B) (/ x (tan B)))
   (/ -1.0 (sin B))))
double code(double F, double B, double x) {
	double tmp;
	if ((x <= -8e-52) || !(x <= 2.7e-89)) {
		tmp = (-1.0 / B) - (x / tan(B));
	} else {
		tmp = -1.0 / sin(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 <= (-8d-52)) .or. (.not. (x <= 2.7d-89))) then
        tmp = ((-1.0d0) / b) - (x / tan(b))
    else
        tmp = (-1.0d0) / sin(b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if ((x <= -8e-52) || !(x <= 2.7e-89)) {
		tmp = (-1.0 / B) - (x / Math.tan(B));
	} else {
		tmp = -1.0 / Math.sin(B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if (x <= -8e-52) or not (x <= 2.7e-89):
		tmp = (-1.0 / B) - (x / math.tan(B))
	else:
		tmp = -1.0 / math.sin(B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if ((x <= -8e-52) || !(x <= 2.7e-89))
		tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B)));
	else
		tmp = Float64(-1.0 / sin(B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if ((x <= -8e-52) || ~((x <= 2.7e-89)))
		tmp = (-1.0 / B) - (x / tan(B));
	else
		tmp = -1.0 / sin(B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[Or[LessEqual[x, -8e-52], N[Not[LessEqual[x, 2.7e-89]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{-52} \lor \neg \left(x \leq 2.7 \cdot 10^{-89}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.0000000000000001e-52 or 2.69999999999999988e-89 < x

    1. Initial program 86.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 79.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative79.1%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv79.3%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg79.3%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr79.3%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in B around 0 82.3%

      \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]

    if -8.0000000000000001e-52 < x < 2.69999999999999988e-89

    1. Initial program 68.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 36.2%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative36.2%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv36.2%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg36.2%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr36.2%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in x around 0 36.2%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{-52} \lor \neg \left(x \leq 2.7 \cdot 10^{-89}\right):\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \end{array} \]

Alternative 19: 43.5% accurate, 3.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00185:\\
\;\;\;\;\frac{-1}{\sin B}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -0.0018500000000000001

    1. Initial program 69.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 98.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Step-by-step derivation
      1. +-commutative98.0%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
      2. div-inv98.1%

        \[\leadsto \frac{-1}{\sin B} + \left(-\color{blue}{\frac{x}{\tan B}}\right) \]
      3. unsub-neg98.1%

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    4. Applied egg-rr98.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
    5. Taylor expanded in x around 0 54.3%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

    if -0.0018500000000000001 < F < 4.1e18

    1. Initial program 98.6%

      \[\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)} \]
    2. Taylor expanded in F around -inf 38.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 18.6%

      \[\leadsto \left(-x \cdot \color{blue}{\left(-0.3333333333333333 \cdot B + \frac{1}{B}\right)}\right) + \frac{-1}{\sin B} \]
    4. Taylor expanded in x around inf 32.2%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-0.3333333333333333 \cdot B + \frac{1}{B}\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*32.2%

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot \left(-0.3333333333333333 \cdot B + \frac{1}{B}\right)} \]
      2. neg-mul-132.2%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-0.3333333333333333 \cdot B + \frac{1}{B}\right) \]
      3. +-commutative32.2%

        \[\leadsto \left(-x\right) \cdot \color{blue}{\left(\frac{1}{B} + -0.3333333333333333 \cdot B\right)} \]
      4. *-commutative32.2%

        \[\leadsto \left(-x\right) \cdot \left(\frac{1}{B} + \color{blue}{B \cdot -0.3333333333333333}\right) \]
      5. distribute-rgt-in32.2%

        \[\leadsto \color{blue}{\frac{1}{B} \cdot \left(-x\right) + \left(B \cdot -0.3333333333333333\right) \cdot \left(-x\right)} \]
      6. distribute-rgt-neg-in32.2%

        \[\leadsto \color{blue}{\left(-\frac{1}{B} \cdot x\right)} + \left(B \cdot -0.3333333333333333\right) \cdot \left(-x\right) \]
      7. distribute-lft-neg-in32.2%

        \[\leadsto \color{blue}{\left(-\frac{1}{B}\right) \cdot x} + \left(B \cdot -0.3333333333333333\right) \cdot \left(-x\right) \]
      8. distribute-rgt-neg-in32.2%

        \[\leadsto \left(-\frac{1}{B}\right) \cdot x + \color{blue}{\left(-\left(B \cdot -0.3333333333333333\right) \cdot x\right)} \]
      9. distribute-lft-neg-in32.2%

        \[\leadsto \left(-\frac{1}{B}\right) \cdot x + \color{blue}{\left(-B \cdot -0.3333333333333333\right) \cdot x} \]
      10. distribute-rgt-out32.2%

        \[\leadsto \color{blue}{x \cdot \left(\left(-\frac{1}{B}\right) + \left(-B \cdot -0.3333333333333333\right)\right)} \]
      11. distribute-neg-frac32.2%

        \[\leadsto x \cdot \left(\color{blue}{\frac{-1}{B}} + \left(-B \cdot -0.3333333333333333\right)\right) \]
      12. metadata-eval32.2%

        \[\leadsto x \cdot \left(\frac{\color{blue}{-1}}{B} + \left(-B \cdot -0.3333333333333333\right)\right) \]
      13. distribute-rgt-neg-in32.2%

        \[\leadsto x \cdot \left(\frac{-1}{B} + \color{blue}{B \cdot \left(--0.3333333333333333\right)}\right) \]
      14. metadata-eval32.2%

        \[\leadsto x \cdot \left(\frac{-1}{B} + B \cdot \color{blue}{0.3333333333333333}\right) \]
    6. Simplified32.2%

      \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)} \]

    if 4.1e18 < F

    1. Initial program 51.7%

      \[\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)} \]
    2. Taylor expanded in F around inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 58.5%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification45.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -0.00185:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]

Alternative 20: 43.1% accurate, 21.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.10000000000000001e-24

    1. Initial program 70.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 96.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 50.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B} + B \cdot \left(0.3333333333333333 \cdot x - 0.16666666666666666\right)} \]

    if -1.10000000000000001e-24 < F < 4.1e18

    1. Initial program 98.5%

      \[\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)} \]
    2. Taylor expanded in F around -inf 38.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 18.1%

      \[\leadsto \left(-x \cdot \color{blue}{\left(-0.3333333333333333 \cdot B + \frac{1}{B}\right)}\right) + \frac{-1}{\sin B} \]
    4. Taylor expanded in x around inf 32.1%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-0.3333333333333333 \cdot B + \frac{1}{B}\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*32.1%

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot \left(-0.3333333333333333 \cdot B + \frac{1}{B}\right)} \]
      2. neg-mul-132.1%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-0.3333333333333333 \cdot B + \frac{1}{B}\right) \]
      3. +-commutative32.1%

        \[\leadsto \left(-x\right) \cdot \color{blue}{\left(\frac{1}{B} + -0.3333333333333333 \cdot B\right)} \]
      4. *-commutative32.1%

        \[\leadsto \left(-x\right) \cdot \left(\frac{1}{B} + \color{blue}{B \cdot -0.3333333333333333}\right) \]
      5. distribute-rgt-in32.1%

        \[\leadsto \color{blue}{\frac{1}{B} \cdot \left(-x\right) + \left(B \cdot -0.3333333333333333\right) \cdot \left(-x\right)} \]
      6. distribute-rgt-neg-in32.1%

        \[\leadsto \color{blue}{\left(-\frac{1}{B} \cdot x\right)} + \left(B \cdot -0.3333333333333333\right) \cdot \left(-x\right) \]
      7. distribute-lft-neg-in32.1%

        \[\leadsto \color{blue}{\left(-\frac{1}{B}\right) \cdot x} + \left(B \cdot -0.3333333333333333\right) \cdot \left(-x\right) \]
      8. distribute-rgt-neg-in32.1%

        \[\leadsto \left(-\frac{1}{B}\right) \cdot x + \color{blue}{\left(-\left(B \cdot -0.3333333333333333\right) \cdot x\right)} \]
      9. distribute-lft-neg-in32.1%

        \[\leadsto \left(-\frac{1}{B}\right) \cdot x + \color{blue}{\left(-B \cdot -0.3333333333333333\right) \cdot x} \]
      10. distribute-rgt-out32.1%

        \[\leadsto \color{blue}{x \cdot \left(\left(-\frac{1}{B}\right) + \left(-B \cdot -0.3333333333333333\right)\right)} \]
      11. distribute-neg-frac32.1%

        \[\leadsto x \cdot \left(\color{blue}{\frac{-1}{B}} + \left(-B \cdot -0.3333333333333333\right)\right) \]
      12. metadata-eval32.1%

        \[\leadsto x \cdot \left(\frac{\color{blue}{-1}}{B} + \left(-B \cdot -0.3333333333333333\right)\right) \]
      13. distribute-rgt-neg-in32.1%

        \[\leadsto x \cdot \left(\frac{-1}{B} + \color{blue}{B \cdot \left(--0.3333333333333333\right)}\right) \]
      14. metadata-eval32.1%

        \[\leadsto x \cdot \left(\frac{-1}{B} + B \cdot \color{blue}{0.3333333333333333}\right) \]
    6. Simplified32.1%

      \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)} \]

    if 4.1e18 < F

    1. Initial program 51.7%

      \[\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)} \]
    2. Taylor expanded in F around inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 58.5%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.1 \cdot 10^{-24}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]

Alternative 21: 43.0% accurate, 24.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -7.20000000000000001e-45

    1. Initial program 71.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 94.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 48.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    4. Step-by-step derivation
      1. associate-*r/48.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
      2. mul-1-neg48.9%

        \[\leadsto \frac{\color{blue}{-\left(1 + x\right)}}{B} \]
    5. Simplified48.9%

      \[\leadsto \color{blue}{\frac{-\left(1 + x\right)}{B}} \]

    if -7.20000000000000001e-45 < F < 4.1e18

    1. Initial program 98.5%

      \[\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)} \]
    2. Taylor expanded in F around -inf 38.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 18.5%

      \[\leadsto \left(-x \cdot \color{blue}{\left(-0.3333333333333333 \cdot B + \frac{1}{B}\right)}\right) + \frac{-1}{\sin B} \]
    4. Taylor expanded in x around inf 33.0%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-0.3333333333333333 \cdot B + \frac{1}{B}\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*33.0%

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot \left(-0.3333333333333333 \cdot B + \frac{1}{B}\right)} \]
      2. neg-mul-133.0%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-0.3333333333333333 \cdot B + \frac{1}{B}\right) \]
      3. +-commutative33.0%

        \[\leadsto \left(-x\right) \cdot \color{blue}{\left(\frac{1}{B} + -0.3333333333333333 \cdot B\right)} \]
      4. *-commutative33.0%

        \[\leadsto \left(-x\right) \cdot \left(\frac{1}{B} + \color{blue}{B \cdot -0.3333333333333333}\right) \]
      5. distribute-rgt-in33.0%

        \[\leadsto \color{blue}{\frac{1}{B} \cdot \left(-x\right) + \left(B \cdot -0.3333333333333333\right) \cdot \left(-x\right)} \]
      6. distribute-rgt-neg-in33.0%

        \[\leadsto \color{blue}{\left(-\frac{1}{B} \cdot x\right)} + \left(B \cdot -0.3333333333333333\right) \cdot \left(-x\right) \]
      7. distribute-lft-neg-in33.0%

        \[\leadsto \color{blue}{\left(-\frac{1}{B}\right) \cdot x} + \left(B \cdot -0.3333333333333333\right) \cdot \left(-x\right) \]
      8. distribute-rgt-neg-in33.0%

        \[\leadsto \left(-\frac{1}{B}\right) \cdot x + \color{blue}{\left(-\left(B \cdot -0.3333333333333333\right) \cdot x\right)} \]
      9. distribute-lft-neg-in33.0%

        \[\leadsto \left(-\frac{1}{B}\right) \cdot x + \color{blue}{\left(-B \cdot -0.3333333333333333\right) \cdot x} \]
      10. distribute-rgt-out33.0%

        \[\leadsto \color{blue}{x \cdot \left(\left(-\frac{1}{B}\right) + \left(-B \cdot -0.3333333333333333\right)\right)} \]
      11. distribute-neg-frac33.0%

        \[\leadsto x \cdot \left(\color{blue}{\frac{-1}{B}} + \left(-B \cdot -0.3333333333333333\right)\right) \]
      12. metadata-eval33.0%

        \[\leadsto x \cdot \left(\frac{\color{blue}{-1}}{B} + \left(-B \cdot -0.3333333333333333\right)\right) \]
      13. distribute-rgt-neg-in33.0%

        \[\leadsto x \cdot \left(\frac{-1}{B} + \color{blue}{B \cdot \left(--0.3333333333333333\right)}\right) \]
      14. metadata-eval33.0%

        \[\leadsto x \cdot \left(\frac{-1}{B} + B \cdot \color{blue}{0.3333333333333333}\right) \]
    6. Simplified33.0%

      \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)} \]

    if 4.1e18 < F

    1. Initial program 51.7%

      \[\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)} \]
    2. Taylor expanded in F around inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 58.5%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-45}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]

Alternative 22: 37.0% accurate, 35.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0054:\\
\;\;\;\;\frac{-1}{B}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -0.0054000000000000003

    1. Initial program 69.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 98.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 50.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    4. Step-by-step derivation
      1. associate-*r/50.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
      2. mul-1-neg50.9%

        \[\leadsto \frac{\color{blue}{-\left(1 + x\right)}}{B} \]
    5. Simplified50.9%

      \[\leadsto \color{blue}{\frac{-\left(1 + x\right)}{B}} \]
    6. Taylor expanded in x around 0 32.2%

      \[\leadsto \color{blue}{\frac{-1}{B}} \]

    if -0.0054000000000000003 < F < 3.60000000000000019e-35

    1. Initial program 99.4%

      \[\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)} \]
    2. Taylor expanded in F around -inf 37.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 17.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    4. Step-by-step derivation
      1. associate-*r/17.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
      2. mul-1-neg17.7%

        \[\leadsto \frac{\color{blue}{-\left(1 + x\right)}}{B} \]
    5. Simplified17.7%

      \[\leadsto \color{blue}{\frac{-\left(1 + x\right)}{B}} \]
    6. Taylor expanded in x around inf 31.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/31.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
      2. neg-mul-131.8%

        \[\leadsto \frac{\color{blue}{-x}}{B} \]
    8. Simplified31.8%

      \[\leadsto \color{blue}{\frac{-x}{B}} \]

    if 3.60000000000000019e-35 < F

    1. Initial program 55.3%

      \[\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)} \]
    2. Taylor expanded in F around inf 96.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 55.5%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification37.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -0.0054:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-35}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]

Alternative 23: 43.6% accurate, 35.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.1500000000000001e-24

    1. Initial program 70.3%

      \[\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)} \]
    2. Taylor expanded in F around -inf 96.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 50.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    4. Step-by-step derivation
      1. associate-*r/50.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
      2. mul-1-neg50.4%

        \[\leadsto \frac{\color{blue}{-\left(1 + x\right)}}{B} \]
    5. Simplified50.4%

      \[\leadsto \color{blue}{\frac{-\left(1 + x\right)}{B}} \]

    if -1.1500000000000001e-24 < F < 3.4000000000000003e-36

    1. Initial program 99.4%

      \[\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)} \]
    2. Taylor expanded in F around -inf 37.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 17.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    4. Step-by-step derivation
      1. associate-*r/17.1%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
      2. mul-1-neg17.1%

        \[\leadsto \frac{\color{blue}{-\left(1 + x\right)}}{B} \]
    5. Simplified17.1%

      \[\leadsto \color{blue}{\frac{-\left(1 + x\right)}{B}} \]
    6. Taylor expanded in x around inf 31.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/31.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
      2. neg-mul-131.7%

        \[\leadsto \frac{\color{blue}{-x}}{B} \]
    8. Simplified31.7%

      \[\leadsto \color{blue}{\frac{-x}{B}} \]

    if 3.4000000000000003e-36 < F

    1. Initial program 55.3%

      \[\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)} \]
    2. Taylor expanded in F around inf 96.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
    3. Taylor expanded in B around 0 55.5%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.15 \cdot 10^{-24}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{-36}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]

Alternative 24: 30.4% accurate, 39.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.40000000000000005e-68 or 1.3999999999999999e-72 < x

    1. Initial program 87.0%

      \[\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)} \]
    2. Taylor expanded in F around -inf 79.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 37.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    4. Step-by-step derivation
      1. associate-*r/37.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
      2. mul-1-neg37.5%

        \[\leadsto \frac{\color{blue}{-\left(1 + x\right)}}{B} \]
    5. Simplified37.5%

      \[\leadsto \color{blue}{\frac{-\left(1 + x\right)}{B}} \]
    6. Taylor expanded in x around inf 43.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/43.0%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
      2. neg-mul-143.0%

        \[\leadsto \frac{\color{blue}{-x}}{B} \]
    8. Simplified43.0%

      \[\leadsto \color{blue}{\frac{-x}{B}} \]

    if -4.40000000000000005e-68 < x < 1.3999999999999999e-72

    1. Initial program 67.4%

      \[\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)} \]
    2. Taylor expanded in F around -inf 36.2%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. Taylor expanded in B around 0 22.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    4. Step-by-step derivation
      1. associate-*r/22.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
      2. mul-1-neg22.3%

        \[\leadsto \frac{\color{blue}{-\left(1 + x\right)}}{B} \]
    5. Simplified22.3%

      \[\leadsto \color{blue}{\frac{-\left(1 + x\right)}{B}} \]
    6. Taylor expanded in x around 0 22.3%

      \[\leadsto \color{blue}{\frac{-1}{B}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification33.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.4 \cdot 10^{-68} \lor \neg \left(x \leq 1.4 \cdot 10^{-72}\right):\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B}\\ \end{array} \]

Alternative 25: 10.1% 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
  1. Initial program 78.0%

    \[\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)} \]
  2. Taylor expanded in F around -inf 59.3%

    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
  3. Taylor expanded in B around 0 30.5%

    \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
  4. Step-by-step derivation
    1. associate-*r/30.5%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
    2. mul-1-neg30.5%

      \[\leadsto \frac{\color{blue}{-\left(1 + x\right)}}{B} \]
  5. Simplified30.5%

    \[\leadsto \color{blue}{\frac{-\left(1 + x\right)}{B}} \]
  6. Taylor expanded in x around 0 13.4%

    \[\leadsto \color{blue}{\frac{-1}{B}} \]
  7. Final simplification13.4%

    \[\leadsto \frac{-1}{B} \]

Reproduce

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