Average Error: 13.5 → 0.5
Time: 1.0min
Precision: binary64
Cost: 20616
\[\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)} \]
\[\begin{array}{l} \mathbf{if}\;F \leq -0.0235:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 16:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \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))))))
(FPCore (F B x)
 :precision binary64
 (if (<= F -0.0235)
   (- (/ -1.0 (sin B)) (/ x (/ (sin B) (cos B))))
   (if (<= F 16.0)
     (-
      (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
      (/ x (tan B)))
     (+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
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)));
}
double code(double F, double B, double x) {
	double tmp;
	if (F <= -0.0235) {
		tmp = (-1.0 / sin(B)) - (x / (sin(B) / cos(B)));
	} else if (F <= 16.0) {
		tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / tan(B));
	} else {
		tmp = (x * (-1.0 / tan(B))) + (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
    code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-0.0235d0)) then
        tmp = ((-1.0d0) / sin(b)) - (x / (sin(b) / cos(b)))
    else if (f <= 16.0d0) then
        tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / tan(b))
    else
        tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
    end if
    code = tmp
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)));
}
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -0.0235) {
		tmp = (-1.0 / Math.sin(B)) - (x / (Math.sin(B) / Math.cos(B)));
	} else if (F <= 16.0) {
		tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / Math.tan(B));
	} else {
		tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
	}
	return tmp;
}
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)))
def code(F, B, x):
	tmp = 0
	if F <= -0.0235:
		tmp = (-1.0 / math.sin(B)) - (x / (math.sin(B) / math.cos(B)))
	elif F <= 16.0:
		tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / math.tan(B))
	else:
		tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B))
	return tmp
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 code(F, B, x)
	tmp = 0.0
	if (F <= -0.0235)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / Float64(sin(B) / cos(B))));
	elseif (F <= 16.0)
		tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / tan(B)));
	else
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B)));
	end
	return tmp
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
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -0.0235)
		tmp = (-1.0 / sin(B)) - (x / (sin(B) / cos(B)));
	elseif (F <= 16.0)
		tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / tan(B));
	else
		tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
	end
	tmp_2 = tmp;
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]
code[F_, B_, x_] := If[LessEqual[F, -0.0235], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 16.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\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)}
\begin{array}{l}
\mathbf{if}\;F \leq -0.0235:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\

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

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if F < -0.0235

    1. Initial program 24.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. Simplified24.5

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
      Proof
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (fma.f64 x 2 (fma.f64 F F 2)) -1/2) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (fma.f64 x 2 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 F F) 2))) -1/2) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 x 2) (+.f64 (*.f64 F F) 2))) -1/2) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 2 x)) (+.f64 (*.f64 F F) 2)) -1/2) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (Rewrite<= +-commutative_binary64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x))) -1/2) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (Rewrite<= metadata-eval (neg.f64 1/2))) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (Rewrite<= metadata-eval (/.f64 1 2)))) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (/.f64 1 2))) (/.f64 (Rewrite<= *-rgt-identity_binary64 (*.f64 (neg.f64 x) 1)) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (/.f64 1 2))) (Rewrite<= associate-*r/_binary64 (*.f64 (neg.f64 x) (/.f64 1 (tan.f64 B))))): 42 points increase in error, 13 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (/.f64 1 2))) (Rewrite<= distribute-lft-neg-in_binary64 (neg.f64 (*.f64 x (/.f64 1 (tan.f64 B)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (/.f64 1 2)))) (neg.f64 (*.f64 x (/.f64 1 (tan.f64 B)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (neg.f64 (*.f64 x (/.f64 1 (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (/.f64 1 2)))))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in F around -inf 0.8

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B} - \frac{1}{\sin B}} \]
    4. Simplified0.8

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}} \]
      Proof
      (-.f64 (/.f64 -1 (sin.f64 B)) (/.f64 x (/.f64 (sin.f64 B) (cos.f64 B)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 (Rewrite<= metadata-eval (neg.f64 1)) (sin.f64 B)) (/.f64 x (/.f64 (sin.f64 B) (cos.f64 B)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= distribute-neg-frac_binary64 (neg.f64 (/.f64 1 (sin.f64 B)))) (/.f64 x (/.f64 (sin.f64 B) (cos.f64 B)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (neg.f64 (/.f64 1 (sin.f64 B))) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 x (cos.f64 B)) (sin.f64 B)))): 15 points increase in error, 14 points decrease in error
      (-.f64 (neg.f64 (/.f64 1 (sin.f64 B))) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (cos.f64 B) x)) (sin.f64 B))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= unsub-neg_binary64 (+.f64 (neg.f64 (/.f64 1 (sin.f64 B))) (neg.f64 (/.f64 (*.f64 (cos.f64 B) x) (sin.f64 B))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (neg.f64 (/.f64 1 (sin.f64 B))) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (*.f64 (cos.f64 B) x) (sin.f64 B))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 (*.f64 (cos.f64 B) x) (sin.f64 B))) (neg.f64 (/.f64 1 (sin.f64 B))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= sub-neg_binary64 (-.f64 (*.f64 -1 (/.f64 (*.f64 (cos.f64 B) x) (sin.f64 B))) (/.f64 1 (sin.f64 B)))): 0 points increase in error, 0 points decrease in error

    if -0.0235 < F < 16

    1. Initial program 0.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. Applied egg-rr0.3

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

    if 16 < F

    1. Initial program 24.7

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

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

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

Alternatives

Alternative 1
Error0.7
Cost20552
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -0.0235:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 0.0215:\\ \;\;\;\;t_0 + \frac{F}{\frac{\sin B}{\sqrt{\frac{1}{2 + x \cdot 2}}}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1}{\sin B}\\ \end{array} \]
Alternative 2
Error0.7
Cost20424
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -0.0235:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 0.0215:\\ \;\;\;\;t_0 + \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1}{\sin B}\\ \end{array} \]
Alternative 3
Error6.1
Cost19908
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -1.3 \cdot 10^{+26}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 16:\\ \;\;\;\;t_0 + {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1}{\sin B}\\ \end{array} \]
Alternative 4
Error8.1
Cost14480
\[\begin{array}{l} t_0 := \frac{F}{\sin B}\\ \mathbf{if}\;F \leq -1.6 \cdot 10^{-9}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.7 \cdot 10^{-102}:\\ \;\;\;\;t_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-216}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 16:\\ \;\;\;\;t_0 \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 5
Error8.1
Cost14480
\[\begin{array}{l} t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -1.6 \cdot 10^{-9}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.7 \cdot 10^{-102}:\\ \;\;\;\;t_0 \cdot \left(F \cdot t_1\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-216}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 16:\\ \;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + t_1\\ \end{array} \]
Alternative 6
Error6.1
Cost14344
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -2.75 \cdot 10^{+26}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 16:\\ \;\;\;\;t_0 + {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1}{\sin B}\\ \end{array} \]
Alternative 7
Error8.2
Cost14288
\[\begin{array}{l} t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{if}\;F \leq -1.6 \cdot 10^{-9}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.7 \cdot 10^{-102}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-216}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 0.0215:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 8
Error10.9
Cost13640
\[\begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{-69}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 10^{-26}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 9
Error23.2
Cost13580
\[\begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{-x}{\frac{\sin B}{\cos B}}\\ t_2 := \frac{F}{F \cdot \sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -9.162288303520634 \cdot 10^{+277}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -6.1 \cdot 10^{+29}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 10^{-25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.4247828272718251 \cdot 10^{+264}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.3378151227472054 \cdot 10^{+297}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 10
Error23.2
Cost13580
\[\begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{F}{F \cdot \sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -9.162288303520634 \cdot 10^{+277}:\\ \;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq -6.1 \cdot 10^{+29}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 10^{-25}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.4247828272718251 \cdot 10^{+264}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.3378151227472054 \cdot 10^{+297}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Error15.8
Cost13572
\[\begin{array}{l} t_0 := \frac{F}{F \cdot \sin B} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{1}{B} - t_1\\ \mathbf{if}\;F \leq -1 \cdot 10^{-69}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - t_1\\ \mathbf{elif}\;F \leq 10^{-25}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.4247828272718251 \cdot 10^{+264}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.3378151227472054 \cdot 10^{+297}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error16.1
Cost13508
\[\begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{F}{F \cdot \sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -1 \cdot 10^{-103}:\\ \;\;\;\;\frac{-1}{\sin B} \cdot \left(1 + x \cdot \cos B\right)\\ \mathbf{elif}\;F \leq 10^{-25}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.4247828272718251 \cdot 10^{+264}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.3378151227472054 \cdot 10^{+297}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 13
Error29.0
Cost8080
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{B} - t_0\\ \mathbf{if}\;F \leq -9.162288303520634 \cdot 10^{+277}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -6.1 \cdot 10^{+29}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-227}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - t_0\\ \mathbf{elif}\;F \leq 16:\\ \;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{elif}\;F \leq 1.4247828272718251 \cdot 10^{+264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.3378151227472054 \cdot 10^{+297}:\\ \;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error30.9
Cost8032
\[\begin{array}{l} t_0 := \frac{F}{F \cdot \sin B} - \frac{x}{B}\\ t_1 := \frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -9.162288303520634 \cdot 10^{+277}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -6.1 \cdot 10^{+29}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-82}:\\ \;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{-41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.4247828272718251 \cdot 10^{+264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.3378151227472054 \cdot 10^{+297}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error30.3
Cost8032
\[\begin{array}{l} t_0 := \frac{F}{F \cdot \sin B} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{1}{B} - t_1\\ \mathbf{if}\;F \leq -9.162288303520634 \cdot 10^{+277}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -6.1 \cdot 10^{+29}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{-187}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - t_1\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-82}:\\ \;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{-41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.4247828272718251 \cdot 10^{+264}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.3378151227472054 \cdot 10^{+297}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error31.2
Cost7904
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -9.162288303520634 \cdot 10^{+277}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -6.1 \cdot 10^{+29}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-82}:\\ \;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 0.021:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.4247828272718251 \cdot 10^{+264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.3378151227472054 \cdot 10^{+297}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error34.0
Cost6920
\[\begin{array}{l} \mathbf{if}\;F \leq -3.6 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 0.021:\\ \;\;\;\;\frac{-x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 18
Error37.3
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-27}:\\ \;\;\;\;\left(B \cdot \left(x \cdot 0.3333333333333333 + -0.16666666666666666\right) - \frac{x}{B}\right) + \frac{-1}{B}\\ \mathbf{elif}\;F \leq 0.021:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 19
Error34.9
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -3.6 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 0.021:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 20
Error39.7
Cost1092
\[\begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-27}:\\ \;\;\;\;\left(B \cdot \left(x \cdot 0.3333333333333333 + -0.16666666666666666\right) - \frac{x}{B}\right) + \frac{-1}{B}\\ \mathbf{elif}\;F \leq 10^{-22}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 21
Error42.0
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -1.55 \cdot 10^{-9}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 10^{-22}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 22
Error39.9
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{-103}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 10^{-22}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 23
Error48.4
Cost520
\[\begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;x \leq -7.52882514038502 \cdot 10^{-171}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 3.2740796393739156 \cdot 10^{-117}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 24
Error44.5
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -1.55 \cdot 10^{-9}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 0.021:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 25
Error56.8
Cost192
\[\frac{-1}{B} \]

Error

Reproduce

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