VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.0% → 99.5%
Time: 16.1s
Alternatives: 20
Speedup: 2.2×

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 20 alternatives:

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

Initial Program: 77.0% 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.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -8 \cdot 10^{+153}:\\ \;\;\;\;t\_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2000000000:\\ \;\;\;\;t\_0 + \frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* x (/ -1.0 (tan B)))))
   (if (<= F -8e+153)
     (+ t_0 (/ -1.0 (sin B)))
     (if (<= F 2000000000.0)
       (+ t_0 (/ F (* (sin B) (sqrt (fma F F 2.0)))))
       (+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
	double t_0 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -8e+153) {
		tmp = t_0 + (-1.0 / sin(B));
	} else if (F <= 2000000000.0) {
		tmp = t_0 + (F / (sin(B) * sqrt(fma(F, F, 2.0))));
	} else {
		tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B));
	}
	return tmp;
}
function code(F, B, x)
	t_0 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -8e+153)
		tmp = Float64(t_0 + Float64(-1.0 / sin(B)));
	elseif (F <= 2000000000.0)
		tmp = Float64(t_0 + Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))));
	else
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B)));
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8e+153], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2000000000.0], N[(t$95$0 + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 2000000000:\\
\;\;\;\;t\_0 + \frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}\\

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


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

    1. Initial program 35.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. Add Preprocessing
    3. Taylor expanded in F around -inf

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
      2. lower-sin.f6499.6

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

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

    if -8e153 < F < 2e9

    1. Initial program 97.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr99.6%

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}}} \cdot \sin B} \]
      4. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{{F}^{2} + 2}} \cdot \sin B} \]
      5. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{F \cdot F} + 2} \cdot \sin B} \]
      6. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \sin B} \]
      7. lower-sin.f6499.7

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

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

    if 2e9 < F

    1. Initial program 61.9%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. clear-numN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      7. lower-/.f6461.9

        \[\leadsto \left(-\frac{1}{\color{blue}{\frac{\tan B}{x}}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Applied egg-rr61.9%

      \[\leadsto \left(-\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    5. Taylor expanded in F around inf

      \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right)\right) + \color{blue}{\frac{1}{\sin B}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right)\right) + \color{blue}{\frac{1}{\sin B}} \]
      2. lower-sin.f6499.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8 \cdot 10^{+153}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2000000000:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 98.9% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq 1.36:\\
\;\;\;\;t\_0 + \frac{F}{\sin B \cdot \sqrt{2}}\\

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


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

    1. Initial program 53.9%

      \[\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. Add Preprocessing
    3. Taylor expanded in F around -inf

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
      2. lower-sin.f6498.9

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

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

    if -1.4199999999999999 < F < 1.3600000000000001

    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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr99.5%

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}}} \cdot \sin B} \]
      4. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{{F}^{2} + 2}} \cdot \sin B} \]
      5. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{F \cdot F} + 2} \cdot \sin B} \]
      6. lower-fma.f64N/A

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

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2}} \cdot \sin B} \]
    10. Step-by-step derivation
      1. lower-sqrt.f6498.9

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

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

    if 1.3600000000000001 < F

    1. Initial program 62.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. clear-numN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      7. lower-/.f6462.4

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

      \[\leadsto \left(-\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    5. Taylor expanded in F around inf

      \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right)\right) + \color{blue}{\frac{1}{\sin B}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right)\right) + \color{blue}{\frac{1}{\sin B}} \]
      2. lower-sin.f6499.4

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

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

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

Alternative 3: 90.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}\\ t_1 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\ \;\;\;\;t\_1 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.55 \cdot 10^{-50}:\\ \;\;\;\;t\_1 + \frac{\frac{F}{B}}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (sqrt (fma F F (fma 2.0 x 2.0)))) (t_1 (* x (/ -1.0 (tan B)))))
   (if (<= F -1.18e-33)
     (+ t_1 (/ -1.0 (sin B)))
     (if (<= F -2e-80)
       (- (/ (/ F (sin B)) t_0) (/ x B))
       (if (<= F 3.55e-50)
         (+ t_1 (/ (/ F B) t_0))
         (+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
	double t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0)));
	double t_1 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -1.18e-33) {
		tmp = t_1 + (-1.0 / sin(B));
	} else if (F <= -2e-80) {
		tmp = ((F / sin(B)) / t_0) - (x / B);
	} else if (F <= 3.55e-50) {
		tmp = t_1 + ((F / B) / t_0);
	} else {
		tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B));
	}
	return tmp;
}
function code(F, B, x)
	t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0)))
	t_1 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -1.18e-33)
		tmp = Float64(t_1 + Float64(-1.0 / sin(B)));
	elseif (F <= -2e-80)
		tmp = Float64(Float64(Float64(F / sin(B)) / t_0) - Float64(x / B));
	elseif (F <= 3.55e-50)
		tmp = Float64(t_1 + Float64(Float64(F / B) / t_0));
	else
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B)));
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.18e-33], N[(t$95$1 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2e-80], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.55e-50], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\
\;\;\;\;t\_1 + \frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 3.55 \cdot 10^{-50}:\\
\;\;\;\;t\_1 + \frac{\frac{F}{B}}{t\_0}\\

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


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

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in F around -inf

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
      2. lower-sin.f6497.8

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

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

    if -1.18e-33 < F < -1.99999999999999992e-80

    1. Initial program 99.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6489.3

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Step-by-step derivation
      1. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot {\left(F \cdot F + \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}^{\frac{-1}{2}}}{\sin B} \]
      2. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot {\color{blue}{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} \]
      3. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} \]
      4. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\color{blue}{\sin B}} \]
      5. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{\color{blue}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F}}{\sin B} \]
    9. Applied egg-rr89.6%

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

    if -1.99999999999999992e-80 < F < 3.5499999999999999e-50

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6485.1

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{2 \cdot x + \color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \]
      2. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      3. frac-2negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}}} \]
      4. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{\color{blue}{-1}}{\mathsf{neg}\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}} \]
      5. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{\color{blue}{\mathsf{neg}\left(1\right)}}{\mathsf{neg}\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}} \]
      6. frac-2negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      7. sqrt-divN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      8. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \frac{\color{blue}{1}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      9. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      10. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      11. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      12. lower-sqrt.f6485.1

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{F}{B}}{\color{blue}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      13. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} \]
      14. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{2 \cdot x} + \mathsf{fma}\left(F, F, 2\right)}} \]
      15. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right) + 2 \cdot x}}} \]
      16. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x}} \]
      17. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x}} \]
      18. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{F \cdot F + \left(2 + 2 \cdot x\right)}}} \]
      19. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}} \]
    7. Applied egg-rr85.1%

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

    if 3.5499999999999999e-50 < F

    1. Initial program 64.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. clear-numN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      7. lower-/.f6464.6

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

      \[\leadsto \left(-\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    5. Taylor expanded in F around inf

      \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right)\right) + \color{blue}{\frac{1}{\sin B}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right)\right) + \color{blue}{\frac{1}{\sin B}} \]
      2. lower-sin.f6495.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.55 \cdot 10^{-50}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 89.7% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}\\ t_1 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\ \;\;\;\;t\_1 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\ \;\;\;\;t\_1 + \frac{\frac{F}{B}}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_1 + \frac{1}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (sqrt (fma F F (fma 2.0 x 2.0)))) (t_1 (* x (/ -1.0 (tan B)))))
   (if (<= F -1.18e-33)
     (+ t_1 (/ -1.0 (sin B)))
     (if (<= F -2e-80)
       (- (/ (/ F (sin B)) t_0) (/ x B))
       (if (<= F 1.82e-63) (+ t_1 (/ (/ F B) t_0)) (+ t_1 (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
	double t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0)));
	double t_1 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -1.18e-33) {
		tmp = t_1 + (-1.0 / sin(B));
	} else if (F <= -2e-80) {
		tmp = ((F / sin(B)) / t_0) - (x / B);
	} else if (F <= 1.82e-63) {
		tmp = t_1 + ((F / B) / t_0);
	} else {
		tmp = t_1 + (1.0 / sin(B));
	}
	return tmp;
}
function code(F, B, x)
	t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0)))
	t_1 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -1.18e-33)
		tmp = Float64(t_1 + Float64(-1.0 / sin(B)));
	elseif (F <= -2e-80)
		tmp = Float64(Float64(Float64(F / sin(B)) / t_0) - Float64(x / B));
	elseif (F <= 1.82e-63)
		tmp = Float64(t_1 + Float64(Float64(F / B) / t_0));
	else
		tmp = Float64(t_1 + Float64(1.0 / sin(B)));
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.18e-33], N[(t$95$1 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2e-80], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.82e-63], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\
\;\;\;\;t\_1 + \frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\
\;\;\;\;t\_1 + \frac{\frac{F}{B}}{t\_0}\\

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


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

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in F around -inf

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
      2. lower-sin.f6497.8

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

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

    if -1.18e-33 < F < -1.99999999999999992e-80

    1. Initial program 99.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6489.3

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Step-by-step derivation
      1. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot {\left(F \cdot F + \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}^{\frac{-1}{2}}}{\sin B} \]
      2. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot {\color{blue}{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} \]
      3. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} \]
      4. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\color{blue}{\sin B}} \]
      5. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{\color{blue}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F}}{\sin B} \]
    9. Applied egg-rr89.6%

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

    if -1.99999999999999992e-80 < F < 1.81999999999999994e-63

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6484.9

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{2 \cdot x + \color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \]
      2. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      3. frac-2negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}}} \]
      4. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{\color{blue}{-1}}{\mathsf{neg}\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}} \]
      5. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{\color{blue}{\mathsf{neg}\left(1\right)}}{\mathsf{neg}\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}} \]
      6. frac-2negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      7. sqrt-divN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      8. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \frac{\color{blue}{1}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      9. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      10. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      11. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      12. lower-sqrt.f6485.0

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{F}{B}}{\color{blue}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      13. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} \]
      14. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{2 \cdot x} + \mathsf{fma}\left(F, F, 2\right)}} \]
      15. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right) + 2 \cdot x}}} \]
      16. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x}} \]
      17. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x}} \]
      18. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{F \cdot F + \left(2 + 2 \cdot x\right)}}} \]
      19. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}} \]
    7. Applied egg-rr85.0%

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

    if 1.81999999999999994e-63 < F

    1. Initial program 65.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. Add Preprocessing
    3. Taylor expanded in F around inf

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{1}{\sin B}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{1}{\sin B}} \]
      2. lower-sin.f6494.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.3% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}\\ t_1 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\ \;\;\;\;t\_1 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\ \;\;\;\;t\_1 + \frac{\frac{F}{B}}{t\_0}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (sqrt (fma F F (fma 2.0 x 2.0)))) (t_1 (* x (/ -1.0 (tan B)))))
   (if (<= F -1.18e-33)
     (+ t_1 (/ -1.0 (sin B)))
     (if (<= F -2e-80)
       (- (/ (/ F (sin B)) t_0) (/ x B))
       (if (<= F 2.9e-58)
         (+ t_1 (/ (/ F B) t_0))
         (if (<= F 7.6e+153)
           (- (/ (* F (sqrt (/ 1.0 (fma F F 2.0)))) (sin B)) (/ x B))
           (- (/ 1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
	double t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0)));
	double t_1 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -1.18e-33) {
		tmp = t_1 + (-1.0 / sin(B));
	} else if (F <= -2e-80) {
		tmp = ((F / sin(B)) / t_0) - (x / B);
	} else if (F <= 2.9e-58) {
		tmp = t_1 + ((F / B) / t_0);
	} else if (F <= 7.6e+153) {
		tmp = ((F * sqrt((1.0 / fma(F, F, 2.0)))) / sin(B)) - (x / B);
	} else {
		tmp = (1.0 / B) - (x / tan(B));
	}
	return tmp;
}
function code(F, B, x)
	t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0)))
	t_1 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -1.18e-33)
		tmp = Float64(t_1 + Float64(-1.0 / sin(B)));
	elseif (F <= -2e-80)
		tmp = Float64(Float64(Float64(F / sin(B)) / t_0) - Float64(x / B));
	elseif (F <= 2.9e-58)
		tmp = Float64(t_1 + Float64(Float64(F / B) / t_0));
	elseif (F <= 7.6e+153)
		tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / fma(F, F, 2.0)))) / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B)));
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.18e-33], N[(t$95$1 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2e-80], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-58], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e+153], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\
\;\;\;\;t\_1 + \frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\
\;\;\;\;t\_1 + \frac{\frac{F}{B}}{t\_0}\\

\mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -1.18e-33

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in F around -inf

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
      2. lower-sin.f6497.8

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

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

    if -1.18e-33 < F < -1.99999999999999992e-80

    1. Initial program 99.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6489.3

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Step-by-step derivation
      1. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot {\left(F \cdot F + \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}^{\frac{-1}{2}}}{\sin B} \]
      2. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot {\color{blue}{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} \]
      3. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} \]
      4. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\color{blue}{\sin B}} \]
      5. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{\color{blue}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F}}{\sin B} \]
    9. Applied egg-rr89.6%

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

    if -1.99999999999999992e-80 < F < 2.8999999999999999e-58

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6485.1

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{2 \cdot x + \color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \]
      2. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      3. frac-2negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}}} \]
      4. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{\color{blue}{-1}}{\mathsf{neg}\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}} \]
      5. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{\color{blue}{\mathsf{neg}\left(1\right)}}{\mathsf{neg}\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}} \]
      6. frac-2negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      7. sqrt-divN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      8. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \frac{\color{blue}{1}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      9. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      10. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      11. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      12. lower-sqrt.f6485.1

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{F}{B}}{\color{blue}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      13. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} \]
      14. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{2 \cdot x} + \mathsf{fma}\left(F, F, 2\right)}} \]
      15. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right) + 2 \cdot x}}} \]
      16. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x}} \]
      17. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x}} \]
      18. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{F \cdot F + \left(2 + 2 \cdot x\right)}}} \]
      19. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}} \]
    7. Applied egg-rr85.1%

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

    if 2.8999999999999999e-58 < F < 7.59999999999999933e153

    1. Initial program 92.9%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr99.6%

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6479.2

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

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

      \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
    9. Step-by-step derivation
      1. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
      3. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} \]
      4. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} \]
      5. lower-fma.f6479.3

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

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

    if 7.59999999999999933e153 < F

    1. Initial program 32.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6432.7

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      5. lower-/.f6432.8

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

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

      \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \color{blue}{\frac{1}{B}} \]
    9. Step-by-step derivation
      1. lower-/.f6482.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 77.6% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.9 \cdot 10^{+200}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\ \;\;\;\;\frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - t\_0\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -4.9e+200)
     (- (/ -1.0 (sin B)) (/ x B))
     (if (<= F 2.9e-58)
       (- (/ F (* B (sqrt (fma F F (fma 2.0 x 2.0))))) t_0)
       (if (<= F 7.6e+153)
         (- (/ (* F (sqrt (/ 1.0 (fma F F 2.0)))) (sin B)) (/ x B))
         (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -4.9e+200) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 2.9e-58) {
		tmp = (F / (B * sqrt(fma(F, F, fma(2.0, x, 2.0))))) - t_0;
	} else if (F <= 7.6e+153) {
		tmp = ((F * sqrt((1.0 / fma(F, F, 2.0)))) / sin(B)) - (x / B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -4.9e+200)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 2.9e-58)
		tmp = Float64(Float64(F / Float64(B * sqrt(fma(F, F, fma(2.0, x, 2.0))))) - t_0);
	elseif (F <= 7.6e+153)
		tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / fma(F, F, 2.0)))) / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / B) - t_0);
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.9e+200], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-58], N[(N[(F / N[(B * N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.6e+153], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - t\_0\\

\mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\

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


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

    1. Initial program 30.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6416.3

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-negN/A

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-1N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right)} - \frac{x}{B} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right) - \frac{x}{B}} \]
      6. distribute-neg-fracN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\sin B}} - \frac{x}{B} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
      8. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      9. lower-sin.f64N/A

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
      10. lower-/.f6472.5

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
    10. Simplified72.5%

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

    if -4.89999999999999982e200 < F < 2.8999999999999999e-58

    1. Initial program 94.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6477.8

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      5. lower-/.f6477.8

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

      \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Step-by-step derivation
      1. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{2 \cdot x + \color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \]
      2. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      3. sqrt-divN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      4. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F}{B} \cdot \frac{\color{blue}{1}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      5. frac-timesN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot 1}{B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      6. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot 1}{B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      7. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{\color{blue}{F \cdot 1}}{B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      8. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F \cdot 1}{\color{blue}{B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      9. lower-sqrt.f6481.3

        \[\leadsto \left(-\frac{x}{\tan B}\right) + \frac{F \cdot 1}{B \cdot \color{blue}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      10. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F \cdot 1}{B \cdot \sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} \]
      11. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F \cdot 1}{B \cdot \sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right) + 2 \cdot x}}} \]
      12. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F \cdot 1}{B \cdot \sqrt{\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x}} \]
      13. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F \cdot 1}{B \cdot \sqrt{\color{blue}{F \cdot F + \left(2 + 2 \cdot x\right)}}} \]
      14. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F \cdot 1}{B \cdot \sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}} \]
      15. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \frac{F \cdot 1}{B \cdot \sqrt{F \cdot F + \color{blue}{\mathsf{fma}\left(2, x, 2\right)}}} \]
      16. lift-fma.f6481.3

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

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

    if 2.8999999999999999e-58 < F < 7.59999999999999933e153

    1. Initial program 92.9%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr99.6%

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6479.2

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

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

      \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
    9. Step-by-step derivation
      1. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
      3. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} \]
      4. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} \]
      5. lower-fma.f6479.3

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

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

    if 7.59999999999999933e153 < F

    1. Initial program 32.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6432.7

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      5. lower-/.f6432.8

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

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

      \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \color{blue}{\frac{1}{B}} \]
    9. Step-by-step derivation
      1. lower-/.f6482.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.9 \cdot 10^{+200}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\ \;\;\;\;\frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 77.6% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4.9 \cdot 10^{+200}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 6 \cdot 10^{-63}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -4.9e+200)
   (- (/ -1.0 (sin B)) (/ x B))
   (if (<= F 6e-63)
     (+ (* x (/ -1.0 (tan B))) (/ F (* B (sqrt (fma F F 2.0)))))
     (if (<= F 7.6e+153)
       (- (/ (* F (sqrt (/ 1.0 (fma F F 2.0)))) (sin B)) (/ x B))
       (- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -4.9e+200) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 6e-63) {
		tmp = (x * (-1.0 / tan(B))) + (F / (B * sqrt(fma(F, F, 2.0))));
	} else if (F <= 7.6e+153) {
		tmp = ((F * sqrt((1.0 / fma(F, F, 2.0)))) / sin(B)) - (x / B);
	} else {
		tmp = (1.0 / B) - (x / tan(B));
	}
	return tmp;
}
function code(F, B, x)
	tmp = 0.0
	if (F <= -4.9e+200)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 6e-63)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * sqrt(fma(F, F, 2.0)))));
	elseif (F <= 7.6e+153)
		tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / fma(F, F, 2.0)))) / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B)));
	end
	return tmp
end
code[F_, B_, x_] := If[LessEqual[F, -4.9e+200], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-63], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e+153], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 6 \cdot 10^{-63}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}\\

\mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\

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


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

    1. Initial program 30.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6416.3

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-negN/A

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-1N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right)} - \frac{x}{B} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right) - \frac{x}{B}} \]
      6. distribute-neg-fracN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\sin B}} - \frac{x}{B} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
      8. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      9. lower-sin.f64N/A

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
      10. lower-/.f6472.5

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
    10. Simplified72.5%

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

    if -4.89999999999999982e200 < F < 5.99999999999999959e-63

    1. Initial program 94.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr97.5%

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}}} \cdot \sin B} \]
      4. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{{F}^{2} + 2}} \cdot \sin B} \]
      5. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{F \cdot F} + 2} \cdot \sin B} \]
      6. lower-fma.f64N/A

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

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B \cdot \color{blue}{\sqrt{2 + {F}^{2}}}} \]
      3. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} \]
      4. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} \]
      5. lower-fma.f6481.3

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

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

    if 5.99999999999999959e-63 < F < 7.59999999999999933e153

    1. Initial program 92.9%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr99.6%

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6479.2

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

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

      \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
    9. Step-by-step derivation
      1. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
      3. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} \]
      4. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} \]
      5. lower-fma.f6479.3

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

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

    if 7.59999999999999933e153 < F

    1. Initial program 32.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6432.7

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      5. lower-/.f6432.8

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

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

      \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \color{blue}{\frac{1}{B}} \]
    9. Step-by-step derivation
      1. lower-/.f6482.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.9 \cdot 10^{+200}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 6 \cdot 10^{-63}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 77.5% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\mathsf{fma}\left(F, F, 2\right)}\\ \mathbf{if}\;F \leq -4.9 \cdot 10^{+200}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot t\_0}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\ \;\;\;\;\frac{F}{\sin B \cdot t\_0} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (sqrt (fma F F 2.0))))
   (if (<= F -4.9e+200)
     (- (/ -1.0 (sin B)) (/ x B))
     (if (<= F 2.9e-58)
       (+ (* x (/ -1.0 (tan B))) (/ F (* B t_0)))
       (if (<= F 7.6e+153)
         (- (/ F (* (sin B) t_0)) (/ x B))
         (- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
	double t_0 = sqrt(fma(F, F, 2.0));
	double tmp;
	if (F <= -4.9e+200) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 2.9e-58) {
		tmp = (x * (-1.0 / tan(B))) + (F / (B * t_0));
	} else if (F <= 7.6e+153) {
		tmp = (F / (sin(B) * t_0)) - (x / B);
	} else {
		tmp = (1.0 / B) - (x / tan(B));
	}
	return tmp;
}
function code(F, B, x)
	t_0 = sqrt(fma(F, F, 2.0))
	tmp = 0.0
	if (F <= -4.9e+200)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 2.9e-58)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * t_0)));
	elseif (F <= 7.6e+153)
		tmp = Float64(Float64(F / Float64(sin(B) * t_0)) - Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B)));
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -4.9e+200], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-58], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e+153], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(F, F, 2\right)}\\
\mathbf{if}\;F \leq -4.9 \cdot 10^{+200}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot t\_0}\\

\mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{F}{\sin B \cdot t\_0} - \frac{x}{B}\\

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


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

    1. Initial program 30.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6416.3

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-negN/A

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-1N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right)} - \frac{x}{B} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right) - \frac{x}{B}} \]
      6. distribute-neg-fracN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\sin B}} - \frac{x}{B} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
      8. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      9. lower-sin.f64N/A

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
      10. lower-/.f6472.5

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
    10. Simplified72.5%

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

    if -4.89999999999999982e200 < F < 2.8999999999999999e-58

    1. Initial program 94.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr97.5%

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}}} \cdot \sin B} \]
      4. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{{F}^{2} + 2}} \cdot \sin B} \]
      5. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{F \cdot F} + 2} \cdot \sin B} \]
      6. lower-fma.f64N/A

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

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B \cdot \color{blue}{\sqrt{2 + {F}^{2}}}} \]
      3. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} \]
      4. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} \]
      5. lower-fma.f6481.3

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

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

    if 2.8999999999999999e-58 < F < 7.59999999999999933e153

    1. Initial program 92.9%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr99.6%

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}}} \cdot \sin B} \]
      4. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{{F}^{2} + 2}} \cdot \sin B} \]
      5. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{F \cdot F} + 2} \cdot \sin B} \]
      6. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \sin B} \]
      7. lower-sin.f6499.5

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)} \cdot \sin B} \]
    10. Step-by-step derivation
      1. lower-/.f6479.1

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)} \cdot \sin B} \]

    if 7.59999999999999933e153 < F

    1. Initial program 32.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6432.7

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      5. lower-/.f6432.8

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

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

      \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \color{blue}{\frac{1}{B}} \]
    9. Step-by-step derivation
      1. lower-/.f6482.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.9 \cdot 10^{+200}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 76.4% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -5.8 \cdot 10^{-56}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-24}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - \frac{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 -5.8e-56)
     t_0
     (if (<= x 2.2e-24)
       (- (/ F (* (sin B) (sqrt (fma F F 2.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 <= -5.8e-56) {
		tmp = t_0;
	} else if (x <= 2.2e-24) {
		tmp = (F / (sin(B) * sqrt(fma(F, F, 2.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 <= -5.8e-56)
		tmp = t_0;
	elseif (x <= 2.2e-24)
		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - Float64(x / B));
	else
		tmp = t_0;
	end
	return 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, -5.8e-56], t$95$0, If[LessEqual[x, 2.2e-24], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{-56}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 2.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.79999999999999982e-56 or 2.20000000000000002e-24 < x

    1. Initial program 81.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6478.8

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      5. lower-/.f6478.8

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

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

      \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \color{blue}{\frac{1}{B}} \]
    9. Step-by-step derivation
      1. lower-/.f6492.8

        \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{1}{B}} \]
    10. Simplified92.8%

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

    if -5.79999999999999982e-56 < x < 2.20000000000000002e-24

    1. Initial program 71.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}} \cdot \sin B}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sqrt{2 + {F}^{2}}} \cdot \sin B} \]
      4. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{{F}^{2} + 2}} \cdot \sin B} \]
      5. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{F \cdot F} + 2} \cdot \sin B} \]
      6. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \sin B} \]
      7. lower-sin.f6473.5

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)} \cdot \sin B} \]
    10. Step-by-step derivation
      1. lower-/.f6461.8

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)} \cdot \sin B} \]
    11. Simplified61.8%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)} \cdot \sin B} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.8 \cdot 10^{-56}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-24}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 68.1% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -2.9 \cdot 10^{-82}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-133}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-97}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{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 -2.9e-82)
     t_0
     (if (<= x 3.2e-133)
       (* (/ F (sin B)) (sqrt (/ 1.0 (fma F F 2.0))))
       (if (<= x 2.4e-97)
         (- (/ -1.0 (sin B)) (/ x B))
         (if (<= x 7.5e-25) (- (/ 1.0 (sin B)) (/ 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 <= -2.9e-82) {
		tmp = t_0;
	} else if (x <= 3.2e-133) {
		tmp = (F / sin(B)) * sqrt((1.0 / fma(F, F, 2.0)));
	} else if (x <= 2.4e-97) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (x <= 7.5e-25) {
		tmp = (1.0 / sin(B)) - (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 <= -2.9e-82)
		tmp = t_0;
	elseif (x <= 3.2e-133)
		tmp = Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / fma(F, F, 2.0))));
	elseif (x <= 2.4e-97)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (x <= 7.5e-25)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = t_0;
	end
	return 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, -2.9e-82], t$95$0, If[LessEqual[x, 3.2e-133], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e-97], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e-25], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -2.9 \cdot 10^{-82}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 3.2 \cdot 10^{-133}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\

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

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

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.89999999999999977e-82 or 7.49999999999999989e-25 < x

    1. Initial program 81.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6478.4

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      5. lower-/.f6478.4

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

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

      \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \color{blue}{\frac{1}{B}} \]
    9. Step-by-step derivation
      1. lower-/.f6489.4

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

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

    if -2.89999999999999977e-82 < x < 3.20000000000000013e-133

    1. Initial program 75.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr76.7%

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6469.2

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\sin B}} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\sin B}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{\sin B} \]
      4. lower-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{\sin B} \]
      5. +-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}} \cdot \frac{F}{\sin B} \]
      6. unpow2N/A

        \[\leadsto \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} \cdot \frac{F}{\sin B} \]
      7. lower-fma.f64N/A

        \[\leadsto \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \cdot \frac{F}{\sin B} \]
      8. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{\sin B}} \]
      9. lower-sin.f6462.0

        \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\color{blue}{\sin B}} \]
    10. Simplified62.0%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B}} \]

    if 3.20000000000000013e-133 < x < 2.4e-97

    1. Initial program 34.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr35.7%

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6419.8

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-negN/A

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-1N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right)} - \frac{x}{B} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right) - \frac{x}{B}} \]
      6. distribute-neg-fracN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\sin B}} - \frac{x}{B} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
      8. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      9. lower-sin.f64N/A

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
      10. lower-/.f6467.2

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
    10. Simplified67.2%

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

    if 2.4e-97 < x < 7.49999999999999989e-25

    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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
    4. Applied egg-rr75.8%

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6451.3

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
    9. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{B} \]
      3. lower-sin.f64N/A

        \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{B} \]
      4. lower-/.f6446.6

        \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{B}} \]
    10. Simplified46.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{-82}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-133}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-97}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 62.4% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.35 \cdot 10^{-161}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -2.35e-161)
   (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
   (if (<= F 1.82e-63)
     (/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
     (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -2.35e-161) {
		tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
	} else if (F <= 1.82e-63) {
		tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
	} else {
		tmp = (1.0 / sin(B)) - (x / B);
	}
	return tmp;
}
function code(F, B, x)
	tmp = 0.0
	if (F <= -2.35e-161)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B));
	elseif (F <= 1.82e-63)
		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B);
	else
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	end
	return tmp
end
code[F_, B_, x_] := If[LessEqual[F, -2.35e-161], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.82e-63], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 -2.35 \cdot 10^{-161}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\

\mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\

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


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

    1. Initial program 68.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6455.2

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{B}} \]
    7. Step-by-step derivation
      1. lower-/.f6469.6

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

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

    if -2.3500000000000002e-161 < F < 1.81999999999999994e-63

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6486.2

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6455.5

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified55.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    9. Applied egg-rr55.6%

      \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}} \]

    if 1.81999999999999994e-63 < F

    1. Initial program 65.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6456.3

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
    9. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{B} \]
      3. lower-sin.f64N/A

        \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{B} \]
      4. lower-/.f6472.9

        \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{B}} \]
    10. Simplified72.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.35 \cdot 10^{-161}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 63.8% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -7.4 \cdot 10^{+25}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\ \;\;\;\;\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -7.4e+25)
   (- (/ -1.0 (sin B)) (/ x B))
   (if (<= F 1.82e-63)
     (- (/ (/ F B) (sqrt (fma F F (fma 2.0 x 2.0)))) (/ x B))
     (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -7.4e+25) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 1.82e-63) {
		tmp = ((F / B) / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - (x / B);
	} else {
		tmp = (1.0 / sin(B)) - (x / B);
	}
	return tmp;
}
function code(F, B, x)
	tmp = 0.0
	if (F <= -7.4e+25)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 1.82e-63)
		tmp = Float64(Float64(Float64(F / B) / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	end
	return tmp
end
code[F_, B_, x_] := If[LessEqual[F, -7.4e+25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.82e-63], N[(N[(N[(F / B), $MachinePrecision] / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\
\;\;\;\;\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - \frac{x}{B}\\

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


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

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6434.1

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-negN/A

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-1N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right)} - \frac{x}{B} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right) - \frac{x}{B}} \]
      6. distribute-neg-fracN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\sin B}} - \frac{x}{B} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
      8. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      9. lower-sin.f64N/A

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
      10. lower-/.f6467.9

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
    10. Simplified67.9%

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

    if -7.3999999999999998e25 < F < 1.81999999999999994e-63

    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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6481.0

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6447.0

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified47.0%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    9. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 \cdot x + \left(F \cdot F + 2\right)}} \]
      2. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{2 \cdot x + \color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \]
      3. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      4. sqrt-divN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      5. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F}{B} \cdot \frac{\color{blue}{1}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      6. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \color{blue}{\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      7. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \color{blue}{\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      8. lower-sqrt.f6447.1

        \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{F}{B}}{\color{blue}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
      9. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} \]
      10. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right) + 2 \cdot x}}} \]
      11. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x}} \]
      12. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{F \cdot F + \left(2 + 2 \cdot x\right)}}} \]
      13. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}} \]
      14. lift-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{\frac{F}{B}}{\sqrt{F \cdot F + \color{blue}{\mathsf{fma}\left(2, x, 2\right)}}} \]
      15. lift-fma.f6447.1

        \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{F}{B}}{\sqrt{\color{blue}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}} \]
    10. Applied egg-rr47.1%

      \[\leadsto \left(-\frac{x}{B}\right) + \color{blue}{\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}} \]

    if 1.81999999999999994e-63 < F

    1. Initial program 65.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6456.3

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
    9. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{B} \]
      3. lower-sin.f64N/A

        \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{B} \]
      4. lower-/.f6472.9

        \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{B}} \]
    10. Simplified72.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.4 \cdot 10^{+25}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\ \;\;\;\;\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 55.5% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 1.3 \cdot 10^{-12}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= B 1.3e-12)
   (/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
   (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
	double tmp;
	if (B <= 1.3e-12) {
		tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
	} else {
		tmp = (1.0 / B) - (x / tan(B));
	}
	return tmp;
}
function code(F, B, x)
	tmp = 0.0
	if (B <= 1.3e-12)
		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B);
	else
		tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B)));
	end
	return tmp
end
code[F_, B_, x_] := If[LessEqual[B, 1.3e-12], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.3 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 1.29999999999999991e-12

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6462.1

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6442.1

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified42.1%

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

      \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}} \]

    if 1.29999999999999991e-12 < B

    1. Initial program 83.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6457.2

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} \]
    6. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      3. un-div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\tan B\right)\right)\right)}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      4. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\color{blue}{\tan B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
      5. lower-/.f6457.3

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

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

      \[\leadsto \left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right) + \color{blue}{\frac{1}{B}} \]
    9. Step-by-step derivation
      1. lower-/.f6449.4

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.3 \cdot 10^{-12}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 58.0% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -7.4 \cdot 10^{+25}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{+144}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \left(B \cdot B\right), x\right)}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -7.4e+25)
   (- (/ -1.0 (sin B)) (/ x B))
   (if (<= F 3.4e+144)
     (/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
     (-
      (/ (fma B (* B 0.16666666666666666) 1.0) B)
      (/ (fma -0.3333333333333333 (* x (* B B)) x) B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -7.4e+25) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 3.4e+144) {
		tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
	} else {
		tmp = (fma(B, (B * 0.16666666666666666), 1.0) / B) - (fma(-0.3333333333333333, (x * (B * B)), x) / B);
	}
	return tmp;
}
function code(F, B, x)
	tmp = 0.0
	if (F <= -7.4e+25)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 3.4e+144)
		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B);
	else
		tmp = Float64(Float64(fma(B, Float64(B * 0.16666666666666666), 1.0) / B) - Float64(fma(-0.3333333333333333, Float64(x * Float64(B * B)), x) / B));
	end
	return tmp
end
code[F_, B_, x_] := If[LessEqual[F, -7.4e+25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e+144], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(B * N[(B * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] - N[(N[(-0.3333333333333333 * N[(x * N[(B * B), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 3.4 \cdot 10^{+144}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \left(B \cdot B\right), x\right)}{B}\\


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

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      3. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
      7. lift-neg.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      8. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      9. associate-*l/N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
      10. lower-/.f64N/A

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} \]
    6. Step-by-step derivation
      1. lower-/.f6434.1

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}{\sin B} \]
    8. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-negN/A

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-1N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right)} - \frac{x}{B} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right) - \frac{x}{B}} \]
      6. distribute-neg-fracN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\sin B}} - \frac{x}{B} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
      8. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      9. lower-sin.f64N/A

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
      10. lower-/.f6467.9

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
    10. Simplified67.9%

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

    if -7.3999999999999998e25 < F < 3.3999999999999999e144

    1. Initial program 97.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6473.9

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6443.5

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified43.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    9. Applied egg-rr45.6%

      \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}} \]

    if 3.3999999999999999e144 < F

    1. Initial program 35.9%

      \[\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. Add Preprocessing
    3. Taylor expanded in F around inf

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
    4. Step-by-step derivation
      1. lower-/.f6466.5

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{1 + \frac{1}{6} \cdot {B}^{2}}{B}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{1 + \frac{1}{6} \cdot {B}^{2}}{B}} \]
      2. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{\frac{1}{6} \cdot {B}^{2} + 1}}{B} \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{{B}^{2} \cdot \frac{1}{6}} + 1}{B} \]
      4. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{1}{6} + 1}{B} \]
      5. associate-*l*N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{B \cdot \left(B \cdot \frac{1}{6}\right)} + 1}{B} \]
      6. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}}{B} \]
      7. lower-*.f6466.5

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B, \color{blue}{B \cdot 0.16666666666666666}, 1\right)}{B} \]
    8. Simplified66.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B}} \]
    9. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x + \frac{-1}{3} \cdot \left({B}^{2} \cdot x\right)}{B}}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
    10. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x + \frac{-1}{3} \cdot \left({B}^{2} \cdot x\right)}{B}}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      2. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{-1}{3} \cdot \left({B}^{2} \cdot x\right) + x}}{B}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      3. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{3}, {B}^{2} \cdot x, x\right)}}{B}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(\frac{-1}{3}, \color{blue}{x \cdot {B}^{2}}, x\right)}{B}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(\frac{-1}{3}, \color{blue}{x \cdot {B}^{2}}, x\right)}{B}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      6. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(\frac{-1}{3}, x \cdot \color{blue}{\left(B \cdot B\right)}, x\right)}{B}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      7. lower-*.f6459.6

        \[\leadsto \left(-\frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \color{blue}{\left(B \cdot B\right)}, x\right)}{B}\right) + \frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} \]
    11. Simplified59.6%

      \[\leadsto \left(-\color{blue}{\frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \left(B \cdot B\right), x\right)}{B}}\right) + \frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.4 \cdot 10^{+25}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{+144}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \left(B \cdot B\right), x\right)}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 51.4% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.8 \cdot 10^{+159}:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{+144}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \left(B \cdot B\right), x\right)}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -3.8e+159)
   (/ (- (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) -1.0) x) B)
   (if (<= F 3.4e+144)
     (/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
     (-
      (/ (fma B (* B 0.16666666666666666) 1.0) B)
      (/ (fma -0.3333333333333333 (* x (* B B)) x) B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -3.8e+159) {
		tmp = (fma(0.5, (fma(2.0, x, 2.0) / (F * F)), -1.0) - x) / B;
	} else if (F <= 3.4e+144) {
		tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
	} else {
		tmp = (fma(B, (B * 0.16666666666666666), 1.0) / B) - (fma(-0.3333333333333333, (x * (B * B)), x) / B);
	}
	return tmp;
}
function code(F, B, x)
	tmp = 0.0
	if (F <= -3.8e+159)
		tmp = Float64(Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), -1.0) - x) / B);
	elseif (F <= 3.4e+144)
		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B);
	else
		tmp = Float64(Float64(fma(B, Float64(B * 0.16666666666666666), 1.0) / B) - Float64(fma(-0.3333333333333333, Float64(x * Float64(B * B)), x) / B));
	end
	return tmp
end
code[F_, B_, x_] := If[LessEqual[F, -3.8e+159], N[(N[(N[(0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.4e+144], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(B * N[(B * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] - N[(N[(-0.3333333333333333 * N[(x * N[(B * B), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{+159}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}\\

\mathbf{elif}\;F \leq 3.4 \cdot 10^{+144}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \left(B \cdot B\right), x\right)}{B}\\


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

    1. Initial program 35.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6435.4

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f646.9

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified6.9%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \left(\frac{1}{B} + \frac{x}{B}\right)} \]
    10. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \frac{1}{B}\right) - \frac{x}{B}} \]
      2. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \frac{1}{B}\right) - \frac{x}{B}} \]
      3. sub-negN/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \left(\mathsf{neg}\left(\frac{1}{B}\right)\right)\right)} - \frac{x}{B} \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{2}, \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}, \mathsf{neg}\left(\frac{1}{B}\right)\right)} - \frac{x}{B} \]
      5. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{B \cdot {F}^{2}}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{B \cdot {F}^{2}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{B \cdot {F}^{2}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{{F}^{2} \cdot B}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{{F}^{2} \cdot B}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      10. unpow2N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{\left(F \cdot F\right)} \cdot B}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      11. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{\left(F \cdot F\right)} \cdot B}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      12. distribute-neg-fracN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{B}}\right) - \frac{x}{B} \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \frac{\color{blue}{-1}}{B}\right) - \frac{x}{B} \]
      14. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \color{blue}{\frac{-1}{B}}\right) - \frac{x}{B} \]
      15. lower-/.f6443.1

        \[\leadsto \mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \frac{-1}{B}\right) - \color{blue}{\frac{x}{B}} \]
    11. Simplified43.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \frac{-1}{B}\right) - \frac{x}{B}} \]
    12. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \left(\frac{1}{B} + \frac{x}{B}\right)} \]
    13. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \frac{1}{B}\right) - \frac{x}{B}} \]
      2. *-commutativeN/A

        \[\leadsto \left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{\color{blue}{{F}^{2} \cdot B}} - \frac{1}{B}\right) - \frac{x}{B} \]
      3. associate-/r*N/A

        \[\leadsto \left(\frac{1}{2} \cdot \color{blue}{\frac{\frac{2 + 2 \cdot x}{{F}^{2}}}{B}} - \frac{1}{B}\right) - \frac{x}{B} \]
      4. associate-/l*N/A

        \[\leadsto \left(\color{blue}{\frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}}{B}} - \frac{1}{B}\right) - \frac{x}{B} \]
      5. div-subN/A

        \[\leadsto \color{blue}{\frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1}{B}} - \frac{x}{B} \]
      6. div-subN/A

        \[\leadsto \color{blue}{\frac{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1\right) - x}{B}} \]
      7. associate--r+N/A

        \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}}{B} \]
      8. lower-/.f64N/A

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}} \]

    if -3.79999999999999965e159 < F < 3.3999999999999999e144

    1. Initial program 95.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6473.1

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6442.5

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified42.5%

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

      \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}} \]

    if 3.3999999999999999e144 < F

    1. Initial program 35.9%

      \[\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. Add Preprocessing
    3. Taylor expanded in F around inf

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
    4. Step-by-step derivation
      1. lower-/.f6466.5

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

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{1 + \frac{1}{6} \cdot {B}^{2}}{B}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{1 + \frac{1}{6} \cdot {B}^{2}}{B}} \]
      2. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{\frac{1}{6} \cdot {B}^{2} + 1}}{B} \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{{B}^{2} \cdot \frac{1}{6}} + 1}{B} \]
      4. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{1}{6} + 1}{B} \]
      5. associate-*l*N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{B \cdot \left(B \cdot \frac{1}{6}\right)} + 1}{B} \]
      6. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}}{B} \]
      7. lower-*.f6466.5

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B, \color{blue}{B \cdot 0.16666666666666666}, 1\right)}{B} \]
    8. Simplified66.5%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B}} \]
    9. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x + \frac{-1}{3} \cdot \left({B}^{2} \cdot x\right)}{B}}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
    10. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x + \frac{-1}{3} \cdot \left({B}^{2} \cdot x\right)}{B}}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      2. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{-1}{3} \cdot \left({B}^{2} \cdot x\right) + x}}{B}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      3. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{3}, {B}^{2} \cdot x, x\right)}}{B}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(\frac{-1}{3}, \color{blue}{x \cdot {B}^{2}}, x\right)}{B}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(\frac{-1}{3}, \color{blue}{x \cdot {B}^{2}}, x\right)}{B}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      6. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(\frac{-1}{3}, x \cdot \color{blue}{\left(B \cdot B\right)}, x\right)}{B}\right)\right) + \frac{\mathsf{fma}\left(B, B \cdot \frac{1}{6}, 1\right)}{B} \]
      7. lower-*.f6459.6

        \[\leadsto \left(-\frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \color{blue}{\left(B \cdot B\right)}, x\right)}{B}\right) + \frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} \]
    11. Simplified59.6%

      \[\leadsto \left(-\color{blue}{\frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \left(B \cdot B\right), x\right)}{B}}\right) + \frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.8 \cdot 10^{+159}:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{+144}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \left(B \cdot B\right), x\right)}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 51.4% accurate, 6.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.8 \cdot 10^{+159}:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}\\ \mathbf{elif}\;F \leq 100000000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -3.8e+159)
   (/ (- (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) -1.0) x) B)
   (if (<= F 100000000.0)
     (/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
     (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -3.8e+159) {
		tmp = (fma(0.5, (fma(2.0, x, 2.0) / (F * F)), -1.0) - x) / B;
	} else if (F <= 100000000.0) {
		tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
	} else {
		tmp = (1.0 / B) - (x / B);
	}
	return tmp;
}
function code(F, B, x)
	tmp = 0.0
	if (F <= -3.8e+159)
		tmp = Float64(Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), -1.0) - x) / B);
	elseif (F <= 100000000.0)
		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B);
	else
		tmp = Float64(Float64(1.0 / B) - Float64(x / B));
	end
	return tmp
end
code[F_, B_, x_] := If[LessEqual[F, -3.8e+159], N[(N[(N[(0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{+159}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}\\

\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\

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


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

    1. Initial program 35.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6435.4

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f646.9

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified6.9%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \left(\frac{1}{B} + \frac{x}{B}\right)} \]
    10. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \frac{1}{B}\right) - \frac{x}{B}} \]
      2. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \frac{1}{B}\right) - \frac{x}{B}} \]
      3. sub-negN/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \left(\mathsf{neg}\left(\frac{1}{B}\right)\right)\right)} - \frac{x}{B} \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{2}, \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}, \mathsf{neg}\left(\frac{1}{B}\right)\right)} - \frac{x}{B} \]
      5. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{B \cdot {F}^{2}}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{B \cdot {F}^{2}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{B \cdot {F}^{2}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{{F}^{2} \cdot B}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{{F}^{2} \cdot B}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      10. unpow2N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{\left(F \cdot F\right)} \cdot B}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      11. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{\left(F \cdot F\right)} \cdot B}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      12. distribute-neg-fracN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{B}}\right) - \frac{x}{B} \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \frac{\color{blue}{-1}}{B}\right) - \frac{x}{B} \]
      14. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \color{blue}{\frac{-1}{B}}\right) - \frac{x}{B} \]
      15. lower-/.f6443.1

        \[\leadsto \mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \frac{-1}{B}\right) - \color{blue}{\frac{x}{B}} \]
    11. Simplified43.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \frac{-1}{B}\right) - \frac{x}{B}} \]
    12. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \left(\frac{1}{B} + \frac{x}{B}\right)} \]
    13. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \frac{1}{B}\right) - \frac{x}{B}} \]
      2. *-commutativeN/A

        \[\leadsto \left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{\color{blue}{{F}^{2} \cdot B}} - \frac{1}{B}\right) - \frac{x}{B} \]
      3. associate-/r*N/A

        \[\leadsto \left(\frac{1}{2} \cdot \color{blue}{\frac{\frac{2 + 2 \cdot x}{{F}^{2}}}{B}} - \frac{1}{B}\right) - \frac{x}{B} \]
      4. associate-/l*N/A

        \[\leadsto \left(\color{blue}{\frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}}{B}} - \frac{1}{B}\right) - \frac{x}{B} \]
      5. div-subN/A

        \[\leadsto \color{blue}{\frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1}{B}} - \frac{x}{B} \]
      6. div-subN/A

        \[\leadsto \color{blue}{\frac{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1\right) - x}{B}} \]
      7. associate--r+N/A

        \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}}{B} \]
      8. lower-/.f64N/A

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}} \]

    if -3.79999999999999965e159 < F < 1e8

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6476.9

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6443.6

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

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

      \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}} \]

    if 1e8 < F

    1. Initial program 61.9%

      \[\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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6445.2

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6424.2

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified24.2%

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

      \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
    10. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{B}} - \frac{x}{B} \]
      3. lower-/.f6453.2

        \[\leadsto \frac{1}{B} - \color{blue}{\frac{x}{B}} \]
    11. Simplified53.2%

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

Alternative 17: 44.4% accurate, 7.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -0.115:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}\\ \mathbf{elif}\;F \leq 7.4 \cdot 10^{-64}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -0.115)
   (/ (- (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) -1.0) x) B)
   (if (<= F 7.4e-64) (- (/ x B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -0.115) {
		tmp = (fma(0.5, (fma(2.0, x, 2.0) / (F * F)), -1.0) - x) / B;
	} else if (F <= 7.4e-64) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 / B) - (x / B);
	}
	return tmp;
}
function code(F, B, x)
	tmp = 0.0
	if (F <= -0.115)
		tmp = Float64(Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), -1.0) - x) / B);
	elseif (F <= 7.4e-64)
		tmp = Float64(-Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / B) - Float64(x / B));
	end
	return tmp
end
code[F_, B_, x_] := If[LessEqual[F, -0.115], N[(N[(N[(0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.4e-64], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.115:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}\\

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

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


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

    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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6449.8

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6419.5

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified19.5%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \left(\frac{1}{B} + \frac{x}{B}\right)} \]
    10. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \frac{1}{B}\right) - \frac{x}{B}} \]
      2. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \frac{1}{B}\right) - \frac{x}{B}} \]
      3. sub-negN/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \left(\mathsf{neg}\left(\frac{1}{B}\right)\right)\right)} - \frac{x}{B} \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{2}, \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}, \mathsf{neg}\left(\frac{1}{B}\right)\right)} - \frac{x}{B} \]
      5. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{B \cdot {F}^{2}}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{B \cdot {F}^{2}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{B \cdot {F}^{2}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{{F}^{2} \cdot B}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{{F}^{2} \cdot B}}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      10. unpow2N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{\left(F \cdot F\right)} \cdot B}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      11. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{\left(F \cdot F\right)} \cdot B}, \mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B} \]
      12. distribute-neg-fracN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{B}}\right) - \frac{x}{B} \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \frac{\color{blue}{-1}}{B}\right) - \frac{x}{B} \]
      14. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \color{blue}{\frac{-1}{B}}\right) - \frac{x}{B} \]
      15. lower-/.f6446.2

        \[\leadsto \mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \frac{-1}{B}\right) - \color{blue}{\frac{x}{B}} \]
    11. Simplified46.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\left(F \cdot F\right) \cdot B}, \frac{-1}{B}\right) - \frac{x}{B}} \]
    12. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \left(\frac{1}{B} + \frac{x}{B}\right)} \]
    13. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} - \frac{1}{B}\right) - \frac{x}{B}} \]
      2. *-commutativeN/A

        \[\leadsto \left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{\color{blue}{{F}^{2} \cdot B}} - \frac{1}{B}\right) - \frac{x}{B} \]
      3. associate-/r*N/A

        \[\leadsto \left(\frac{1}{2} \cdot \color{blue}{\frac{\frac{2 + 2 \cdot x}{{F}^{2}}}{B}} - \frac{1}{B}\right) - \frac{x}{B} \]
      4. associate-/l*N/A

        \[\leadsto \left(\color{blue}{\frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}}{B}} - \frac{1}{B}\right) - \frac{x}{B} \]
      5. div-subN/A

        \[\leadsto \color{blue}{\frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1}{B}} - \frac{x}{B} \]
      6. div-subN/A

        \[\leadsto \color{blue}{\frac{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1\right) - x}{B}} \]
      7. associate--r+N/A

        \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}}{B} \]
      8. lower-/.f64N/A

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}} \]

    if -0.115000000000000005 < F < 7.39999999999999998e-64

    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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6480.8

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6446.9

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified46.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
      2. lower-neg.f64N/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
      3. lower-/.f6430.0

        \[\leadsto -\color{blue}{\frac{x}{B}} \]
    11. Simplified30.0%

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

    if 7.39999999999999998e-64 < F

    1. Initial program 65.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6445.2

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6423.7

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified23.7%

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

      \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
    10. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{B}} - \frac{x}{B} \]
      3. lower-/.f6450.0

        \[\leadsto \frac{1}{B} - \color{blue}{\frac{x}{B}} \]
    11. Simplified50.0%

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

Alternative 18: 43.1% accurate, 9.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4.6 \cdot 10^{-173}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 7.4 \cdot 10^{-64}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -4.6e-173)
   (- (/ -1.0 B) (/ x B))
   (if (<= F 7.4e-64) (- (/ x B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -4.6e-173) {
		tmp = (-1.0 / B) - (x / B);
	} else if (F <= 7.4e-64) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 / B) - (x / B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-4.6d-173)) then
        tmp = ((-1.0d0) / b) - (x / b)
    else if (f <= 7.4d-64) then
        tmp = -(x / b)
    else
        tmp = (1.0d0 / b) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -4.6e-173) {
		tmp = (-1.0 / B) - (x / B);
	} else if (F <= 7.4e-64) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 / B) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -4.6e-173:
		tmp = (-1.0 / B) - (x / B)
	elif F <= 7.4e-64:
		tmp = -(x / B)
	else:
		tmp = (1.0 / B) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -4.6e-173)
		tmp = Float64(Float64(-1.0 / B) - Float64(x / B));
	elseif (F <= 7.4e-64)
		tmp = Float64(-Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / B) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -4.6e-173)
		tmp = (-1.0 / B) - (x / B);
	elseif (F <= 7.4e-64)
		tmp = -(x / B);
	else
		tmp = (1.0 / B) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -4.6e-173], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.4e-64], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 69.9%

      \[\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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6455.9

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6423.1

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified23.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{B} + \frac{x}{B}\right)} \]
    10. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-negN/A

        \[\leadsto -1 \cdot \frac{1}{B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{B} - \frac{x}{B}} \]
      4. neg-mul-1N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{B}\right)\right)} - \frac{x}{B} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B}} \]
      6. distribute-neg-fracN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{B}} - \frac{x}{B} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{-1}}{B} - \frac{x}{B} \]
      8. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{B} \]
      9. lower-/.f6436.0

        \[\leadsto \frac{-1}{B} - \color{blue}{\frac{x}{B}} \]
    11. Simplified36.0%

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

    if -4.59999999999999976e-173 < F < 7.39999999999999998e-64

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6487.9

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6455.9

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified55.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
      2. lower-neg.f64N/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
      3. lower-/.f6437.0

        \[\leadsto -\color{blue}{\frac{x}{B}} \]
    11. Simplified37.0%

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

    if 7.39999999999999998e-64 < F

    1. Initial program 65.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6445.2

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6423.7

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified23.7%

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

      \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
    10. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{B}} - \frac{x}{B} \]
      3. lower-/.f6450.0

        \[\leadsto \frac{1}{B} - \color{blue}{\frac{x}{B}} \]
    11. Simplified50.0%

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

Alternative 19: 35.9% accurate, 11.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4.6 \cdot 10^{-173}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -4.6e-173) (- (/ -1.0 B) (/ x B)) (- (/ x B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -4.6e-173) {
		tmp = (-1.0 / B) - (x / B);
	} else {
		tmp = -(x / B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-4.6d-173)) then
        tmp = ((-1.0d0) / b) - (x / b)
    else
        tmp = -(x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -4.6e-173) {
		tmp = (-1.0 / B) - (x / B);
	} else {
		tmp = -(x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -4.6e-173:
		tmp = (-1.0 / B) - (x / B)
	else:
		tmp = -(x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -4.6e-173)
		tmp = Float64(Float64(-1.0 / B) - Float64(x / B));
	else
		tmp = Float64(-Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -4.6e-173)
		tmp = (-1.0 / B) - (x / B);
	else
		tmp = -(x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -4.6e-173], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], (-N[(x / B), $MachinePrecision])]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < -4.59999999999999976e-173

    1. Initial program 69.9%

      \[\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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6455.9

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6423.1

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified23.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{B} + \frac{x}{B}\right)} \]
    10. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-negN/A

        \[\leadsto -1 \cdot \frac{1}{B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{B} - \frac{x}{B}} \]
      4. neg-mul-1N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{B}\right)\right)} - \frac{x}{B} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{B}\right)\right) - \frac{x}{B}} \]
      6. distribute-neg-fracN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{B}} - \frac{x}{B} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{-1}}{B} - \frac{x}{B} \]
      8. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{B} \]
      9. lower-/.f6436.0

        \[\leadsto \frac{-1}{B} - \color{blue}{\frac{x}{B}} \]
    11. Simplified36.0%

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

    if -4.59999999999999976e-173 < F

    1. Initial program 80.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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      2. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      5. associate-+r+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
      6. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
      7. associate-+l+N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
      8. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
      9. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
      10. unpow2N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
      11. lower-fma.f6464.1

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-/.f6438.0

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
    8. Simplified38.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
      2. lower-neg.f64N/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
      3. lower-/.f6430.2

        \[\leadsto -\color{blue}{\frac{x}{B}} \]
    11. Simplified30.2%

      \[\leadsto \color{blue}{-\frac{x}{B}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 29.8% accurate, 26.3× speedup?

\[\begin{array}{l} \\ -\frac{x}{B} \end{array} \]
(FPCore (F B x) :precision binary64 (- (/ x B)))
double code(double F, double B, double x) {
	return -(x / B);
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    code = -(x / b)
end function
public static double code(double F, double B, double x) {
	return -(x / B);
}
def code(F, B, x):
	return -(x / B)
function code(F, B, x)
	return Float64(-Float64(x / B))
end
function tmp = code(F, B, x)
	tmp = -(x / B);
end
code[F_, B_, x_] := (-N[(x / B), $MachinePrecision])
\begin{array}{l}

\\
-\frac{x}{B}
\end{array}
Derivation
  1. Initial program 76.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. Add Preprocessing
  3. Taylor expanded in B around 0

    \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
  4. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    2. lower-/.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B}} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
    3. lower-sqrt.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. lower-/.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    5. associate-+r+N/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \]
    6. +-commutativeN/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + 2\right)} + {F}^{2}}} \]
    7. associate-+l+N/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left(2 + {F}^{2}\right)}}} \]
    8. lower-fma.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2 + {F}^{2}\right)}}} \]
    9. +-commutativeN/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{{F}^{2} + 2}\right)}} \]
    10. unpow2N/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)}} \]
    11. lower-fma.f6460.7

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

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

    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
  7. Step-by-step derivation
    1. lower-/.f6431.9

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \]
  8. Simplified31.9%

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

    \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
  10. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
    2. lower-neg.f64N/A

      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
    3. lower-/.f6426.1

      \[\leadsto -\color{blue}{\frac{x}{B}} \]
  11. Simplified26.1%

    \[\leadsto \color{blue}{-\frac{x}{B}} \]
  12. Add Preprocessing

Reproduce

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