Average Error: 13.3 → 0.3
Time: 51.1s
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 -7.5 \cdot 10^{+21}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 12500000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\frac{\sin B}{\cos 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 -7.5e+21)
   (+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
   (if (<= F 12500000.0)
     (-
      (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
      (/ x (tan B)))
     (- (/ 1.0 (sin B)) (/ x (/ (sin B) (cos 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 <= -7.5e+21) {
		tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
	} else if (F <= 12500000.0) {
		tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / tan(B));
	} else {
		tmp = (1.0 / sin(B)) - (x / (sin(B) / cos(B)));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    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 <= (-7.5d+21)) then
        tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
    else if (f <= 12500000.0d0) then
        tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / tan(b))
    else
        tmp = (1.0d0 / sin(b)) - (x / (sin(b) / cos(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 <= -7.5e+21) {
		tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
	} else if (F <= 12500000.0) {
		tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / Math.tan(B));
	} else {
		tmp = (1.0 / Math.sin(B)) - (x / (Math.sin(B) / Math.cos(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 <= -7.5e+21:
		tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B))
	elif F <= 12500000.0:
		tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / math.tan(B))
	else:
		tmp = (1.0 / math.sin(B)) - (x / (math.sin(B) / math.cos(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 <= -7.5e+21)
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B)));
	elseif (F <= 12500000.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(1.0 / sin(B)) - Float64(x / Float64(sin(B) / cos(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 <= -7.5e+21)
		tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
	elseif (F <= 12500000.0)
		tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / tan(B));
	else
		tmp = (1.0 / sin(B)) - (x / (sin(B) / cos(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, -7.5e+21], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 12500000.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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $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 -7.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\frac{\sin B}{\cos 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 < -7.5e21

    1. Initial program 26.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. Applied egg-rr26.0

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

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

    if -7.5e21 < F < 1.25e7

    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 1.25e7 < F

    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))))): 30 points increase in error, 14 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.2

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

      \[\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 1 (sin.f64 B)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 x (cos.f64 B)) (sin.f64 B)))): 13 points increase in error, 13 points decrease in error
      (-.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 (/.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 (/.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
  3. Recombined 3 regimes into one program.
  4. Final simplification0.3

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

Alternatives

Alternative 1
Error1.2
Cost20552
\[\begin{array}{l} \mathbf{if}\;F \leq -9.2 \cdot 10^{-8}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 7 \cdot 10^{-20}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 2
Error8.0
Cost14480
\[\begin{array}{l} t_0 := \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{if}\;F \leq -7.5 \cdot 10^{+21}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -6.2 \cdot 10^{-171}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-168}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-32}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 3
Error6.3
Cost14480
\[\begin{array}{l} t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\ t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ \mathbf{if}\;F \leq -7.5 \cdot 10^{+21}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-102}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 10^{-168}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 4
Error6.3
Cost14480
\[\begin{array}{l} t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\ \mathbf{if}\;F \leq -7.5 \cdot 10^{+21}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-102}:\\ \;\;\;\;t_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 10^{-168}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-32}:\\ \;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 5
Error6.3
Cost14480
\[\begin{array}{l} t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\ t_1 := \frac{-1}{\frac{\tan B}{x}}\\ \mathbf{if}\;F \leq -7.5 \cdot 10^{+21}:\\ \;\;\;\;t_1 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-102}:\\ \;\;\;\;t_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 10^{-168}:\\ \;\;\;\;t_1 + t_0 \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-32}:\\ \;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 6
Error23.4
Cost13844
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{if}\;F \leq -7.7 \cdot 10^{-16}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{B}\\ \mathbf{elif}\;F \leq -8.8 \cdot 10^{-123}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 12200000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.6011810901602162 \cdot 10^{+109}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.5348602930244563 \cdot 10^{+181}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error18.7
Cost13844
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{if}\;F \leq -1.4 \cdot 10^{-23}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -8.8 \cdot 10^{-123}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 12200000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.6011810901602162 \cdot 10^{+109}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.5348602930244563 \cdot 10^{+181}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error11.0
Cost13644
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4 \cdot 10^{-23}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -8.8 \cdot 10^{-123}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-17}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 9
Error11.0
Cost13644
\[\begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{-23}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -8.8 \cdot 10^{-123}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-17}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 10
Error29.7
Cost7636
\[\begin{array}{l} t_0 := \frac{-1}{\frac{\tan B}{x}} + \frac{-1}{B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -7.7 \cdot 10^{-16}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -5 \cdot 10^{-124}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 12200000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.6011810901602162 \cdot 10^{+109}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 2.652142846827889 \cdot 10^{+186}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error29.7
Cost7636
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-1}{\frac{\tan B}{x}} + \frac{-1}{B}\\ \mathbf{if}\;F \leq -7.7 \cdot 10^{-16}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -5 \cdot 10^{-124}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 12200000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.6011810901602162 \cdot 10^{+109}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.652142846827889 \cdot 10^{+186}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 12
Error30.7
Cost7240
\[\begin{array}{l} t_0 := \frac{-1}{\frac{\tan B}{x}} + \frac{-1}{B}\\ \mathbf{if}\;x \leq -5.860745021609714 \cdot 10^{-131}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.821847386013864 \cdot 10^{-123}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 13
Error35.8
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -6.4 \cdot 10^{-84}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 12500000:\\ \;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 14
Error38.5
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -6.4 \cdot 10^{-84}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} - x}{B}\\ \end{array} \]
Alternative 15
Error40.3
Cost1220
\[\begin{array}{l} \mathbf{if}\;F \leq -8 \cdot 10^{-101}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} - x}{B}\\ \end{array} \]
Alternative 16
Error40.0
Cost1220
\[\begin{array}{l} t_0 := \frac{2 + x \cdot 2}{F}\\ \mathbf{if}\;F \leq -5 \cdot 10^{-123}:\\ \;\;\;\;\frac{\frac{F}{-0.5 \cdot t_0 - F} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{F}{F + 0.5 \cdot t_0} - x}{B}\\ \end{array} \]
Alternative 17
Error48.6
Cost584
\[\begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;x \leq -1.4055324728939558 \cdot 10^{-95}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 6.307687634846034 \cdot 10^{-49}:\\ \;\;\;\;-1 + \frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 18
Error43.3
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -6.4 \cdot 10^{-84}:\\ \;\;\;\;-1 + \frac{-1}{B}\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{-137}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 19
Error40.7
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -8 \cdot 10^{-101}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{-137}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 20
Error48.3
Cost388
\[\begin{array}{l} \mathbf{if}\;F \leq -8 \cdot 10^{-101}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
Alternative 21
Error57.1
Cost192
\[\frac{-1}{B} \]

Error

Reproduce

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