?

Average Error: 14.4 → 0.3
Time: 40.6s
Precision: binary64
Cost: 20680

?

\[\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} t_0 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{+23}:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{+57}:\\ \;\;\;\;t_0 + \frac{{\left(2 + \left(F \cdot F + \left(x + x\right)\right)\right)}^{-0.5}}{\frac{\sin B}{F}}\\ \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
 (let* ((t_0 (/ (- x) (tan B))))
   (if (<= F -2e+23)
     (+ t_0 (/ -1.0 (sin B)))
     (if (<= F 4e+57)
       (+ t_0 (/ (pow (+ 2.0 (+ (* F F) (+ x x))) -0.5) (/ (sin B) F)))
       (+ (* 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 t_0 = -x / tan(B);
	double tmp;
	if (F <= -2e+23) {
		tmp = t_0 + (-1.0 / sin(B));
	} else if (F <= 4e+57) {
		tmp = t_0 + (pow((2.0 + ((F * F) + (x + x))), -0.5) / (sin(B) / F));
	} 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) :: t_0
    real(8) :: tmp
    t_0 = -x / tan(b)
    if (f <= (-2d+23)) then
        tmp = t_0 + ((-1.0d0) / sin(b))
    else if (f <= 4d+57) then
        tmp = t_0 + (((2.0d0 + ((f * f) + (x + x))) ** (-0.5d0)) / (sin(b) / f))
    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 t_0 = -x / Math.tan(B);
	double tmp;
	if (F <= -2e+23) {
		tmp = t_0 + (-1.0 / Math.sin(B));
	} else if (F <= 4e+57) {
		tmp = t_0 + (Math.pow((2.0 + ((F * F) + (x + x))), -0.5) / (Math.sin(B) / F));
	} 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):
	t_0 = -x / math.tan(B)
	tmp = 0
	if F <= -2e+23:
		tmp = t_0 + (-1.0 / math.sin(B))
	elif F <= 4e+57:
		tmp = t_0 + (math.pow((2.0 + ((F * F) + (x + x))), -0.5) / (math.sin(B) / F))
	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)
	t_0 = Float64(Float64(-x) / tan(B))
	tmp = 0.0
	if (F <= -2e+23)
		tmp = Float64(t_0 + Float64(-1.0 / sin(B)));
	elseif (F <= 4e+57)
		tmp = Float64(t_0 + Float64((Float64(2.0 + Float64(Float64(F * F) + Float64(x + x))) ^ -0.5) / Float64(sin(B) / F)));
	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)
	t_0 = -x / tan(B);
	tmp = 0.0;
	if (F <= -2e+23)
		tmp = t_0 + (-1.0 / sin(B));
	elseif (F <= 4e+57)
		tmp = t_0 + (((2.0 + ((F * F) + (x + x))) ^ -0.5) / (sin(B) / F));
	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_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+23], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e+57], N[(t$95$0 + N[(N[Power[N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $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}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+23}:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\

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

\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 < -1.9999999999999998e23

    1. Initial program 28.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. Simplified28.5

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

      [Start]28.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)} \]

      rational.json-simplify-10 [=>]28.5

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

      rational.json-simplify-2 [=>]28.5

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

      rational.json-simplify-49 [=>]28.5

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

      rational.json-simplify-44 [=>]28.5

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

      metadata-eval [=>]28.5

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

      rational.json-simplify-2 [=>]28.5

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

      metadata-eval [=>]28.5

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

      metadata-eval [=>]28.5

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

      \[\leadsto x \cdot \frac{-1}{\tan B} + \color{blue}{\frac{-1}{\sin B}} \]
    4. Applied egg-rr0.1

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

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

      [Start]0.1

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

      rational.json-simplify-4 [=>]0.1

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

      rational.json-simplify-12 [=>]0.1

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

      rational.json-simplify-50 [=>]0.1

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

      rational.json-simplify-5 [=>]0.1

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

    if -1.9999999999999998e23 < F < 4.00000000000000019e57

    1. Initial program 0.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. Simplified0.5

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

      [Start]0.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)} \]

      rational.json-simplify-10 [=>]0.5

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

      rational.json-simplify-2 [=>]0.5

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

      rational.json-simplify-49 [=>]0.5

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

      rational.json-simplify-44 [=>]0.5

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

      metadata-eval [=>]0.5

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

      rational.json-simplify-2 [=>]0.5

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

      metadata-eval [=>]0.5

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

      metadata-eval [=>]0.5

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

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

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

      [Start]0.4

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

      rational.json-simplify-61 [=>]0.5

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

      \[\leadsto \color{blue}{\left(\frac{x}{-\tan B} + 0\right)} + \frac{{\left(2 + \left(F \cdot F + \left(x + x\right)\right)\right)}^{-0.5}}{\frac{\sin B}{F}} \]
    6. Simplified0.4

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

      [Start]0.4

      \[ \left(\frac{x}{-\tan B} + 0\right) + \frac{{\left(2 + \left(F \cdot F + \left(x + x\right)\right)\right)}^{-0.5}}{\frac{\sin B}{F}} \]

      rational.json-simplify-4 [=>]0.4

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

      rational.json-simplify-12 [=>]0.4

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

      rational.json-simplify-50 [=>]0.4

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

      rational.json-simplify-5 [=>]0.4

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

    if 4.00000000000000019e57 < F

    1. Initial program 29.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. Simplified29.9

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

      [Start]29.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)} \]

      rational.json-simplify-10 [=>]29.9

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

      rational.json-simplify-2 [=>]29.9

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

      rational.json-simplify-49 [=>]29.9

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

      rational.json-simplify-44 [=>]29.9

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

      metadata-eval [=>]29.9

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

      rational.json-simplify-2 [=>]29.9

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

      metadata-eval [=>]29.9

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

      metadata-eval [=>]29.9

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

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

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

Alternatives

Alternative 1
Error0.4
Cost20680
\[\begin{array}{l} t_0 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{+55}:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{+57}:\\ \;\;\;\;t_0 + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 2
Error0.7
Cost20488
\[\begin{array}{l} t_0 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -1.5:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.2:\\ \;\;\;\;t_0 + \sqrt{\frac{1}{2 + 2 \cdot x}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 3
Error0.7
Cost20488
\[\begin{array}{l} t_0 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.8:\\ \;\;\;\;t_0 + \frac{\sqrt{\frac{1}{2 \cdot x + 2}}}{\frac{\sin B}{F}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 4
Error0.7
Cost20424
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -1.45:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.2:\\ \;\;\;\;t_0 + \frac{F}{\sin B \cdot \sqrt{2 \cdot x + 2}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1}{\sin B}\\ \end{array} \]
Alternative 5
Error5.8
Cost14280
\[\begin{array}{l} t_0 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -340:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 17000:\\ \;\;\;\;t_0 + \frac{{\left(2 + \left(F \cdot F + \left(x + x\right)\right)\right)}^{-0.5}}{\frac{B}{F}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 6
Error11.3
Cost14168
\[\begin{array}{l} t_0 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -2.7 \cdot 10^{-12}:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -1.75 \cdot 10^{-71}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-x\right)}{B}\\ \mathbf{elif}\;F \leq -2.2 \cdot 10^{-118}:\\ \;\;\;\;t_0 + \frac{1}{B}\\ \mathbf{elif}\;F \leq -6 \cdot 10^{-148}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\frac{B}{{\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5}}}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-108}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-27}:\\ \;\;\;\;\left(\frac{x}{-B} + B \cdot \left(x \cdot 0.3333333333333333\right)\right) + \frac{{\left(2 + \left(F \cdot F + \left(x + x\right)\right)\right)}^{-0.5}}{\frac{B}{F}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 7
Error8.3
Cost14088
\[\begin{array}{l} t_0 := \frac{x}{-B}\\ \mathbf{if}\;F \leq -6 \cdot 10^{-11}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -4.6 \cdot 10^{-148}:\\ \;\;\;\;t_0 + \frac{F}{\frac{\sin B}{\sqrt{\frac{1}{x + \left(2 + x\right)}}}}\\ \mathbf{elif}\;F \leq 1.22 \cdot 10^{-105}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-27}:\\ \;\;\;\;t_0 + \frac{\sqrt{0.5} \cdot F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 8
Error6.0
Cost14088
\[\begin{array}{l} t_0 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -0.19:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 0.3:\\ \;\;\;\;t_0 + \frac{\sqrt{\frac{1}{2 \cdot x + 2}}}{\frac{B}{F}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 9
Error21.6
Cost13976
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ t_1 := -\frac{x}{B}\\ t_2 := t_1 + \frac{-1}{\sin B}\\ \mathbf{if}\;F \leq -9.6 \cdot 10^{+264}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -2.8 \cdot 10^{+152}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.1 \cdot 10^{+30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -1.18 \cdot 10^{-120}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.3 \cdot 10^{-148}:\\ \;\;\;\;t_1 + \frac{F}{\frac{B}{{\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5}}}\\ \mathbf{elif}\;F \leq 3.8 \cdot 10^{-106}:\\ \;\;\;\;x \cdot \left(-\frac{\cos B}{\sin B}\right)\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-27}:\\ \;\;\;\;\left(\frac{x}{-B} + B \cdot \left(x \cdot 0.3333333333333333\right)\right) + \frac{{\left(2 + \left(F \cdot F + \left(x + x\right)\right)\right)}^{-0.5}}{\frac{B}{F}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{1}{B}\\ \end{array} \]
Alternative 10
Error21.5
Cost13976
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ t_1 := -\frac{x}{B}\\ t_2 := t_1 + \frac{-1}{\sin B}\\ \mathbf{if}\;F \leq -1.2 \cdot 10^{+266}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -8.1 \cdot 10^{+151}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -3.35 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -1.65 \cdot 10^{-118}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -3.4 \cdot 10^{-149}:\\ \;\;\;\;t_1 + \frac{F}{\frac{B}{{\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5}}}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-106}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-27}:\\ \;\;\;\;\left(\frac{x}{-B} + B \cdot \left(x \cdot 0.3333333333333333\right)\right) + \frac{{\left(2 + \left(F \cdot F + \left(x + x\right)\right)\right)}^{-0.5}}{\frac{B}{F}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{1}{B}\\ \end{array} \]
Alternative 11
Error8.3
Cost13968
\[\begin{array}{l} t_0 := \frac{x}{-B} + F \cdot \frac{\sqrt{0.5}}{\sin B}\\ \mathbf{if}\;F \leq -6 \cdot 10^{-11}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -3.4 \cdot 10^{-150}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-105}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-27}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 12
Error8.3
Cost13968
\[\begin{array}{l} t_0 := \frac{x}{-B}\\ \mathbf{if}\;F \leq -6 \cdot 10^{-11}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -1.25 \cdot 10^{-148}:\\ \;\;\;\;t_0 + F \cdot \frac{\sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-106}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-27}:\\ \;\;\;\;t_0 + \frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 13
Error8.2
Cost13968
\[\begin{array}{l} t_0 := \frac{x}{-B}\\ \mathbf{if}\;F \leq -6 \cdot 10^{-11}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -4.7 \cdot 10^{-149}:\\ \;\;\;\;t_0 + F \cdot \frac{\sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 4.3 \cdot 10^{-106}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-27}:\\ \;\;\;\;t_0 + \frac{\sqrt{0.5} \cdot F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 14
Error16.6
Cost13844
\[\begin{array}{l} t_0 := \frac{-x}{\tan B}\\ t_1 := t_0 + \frac{1}{B}\\ \mathbf{if}\;F \leq -5.1 \cdot 10^{-11}:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -4.6 \cdot 10^{-72}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-x\right)}{B}\\ \mathbf{elif}\;F \leq -4.7 \cdot 10^{-120}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -2.85 \cdot 10^{-148}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\frac{B}{{\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5}}}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{-113}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-27}:\\ \;\;\;\;\left(\frac{x}{-B} + B \cdot \left(x \cdot 0.3333333333333333\right)\right) + \frac{{\left(2 + \left(F \cdot F + \left(x + x\right)\right)\right)}^{-0.5}}{\frac{B}{F}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error26.1
Cost8220
\[\begin{array}{l} t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(-x\right)}{B}\\ t_1 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ t_2 := \left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ t_3 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -1.6 \cdot 10^{+265}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3.2 \cdot 10^{+152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -5.8 \cdot 10^{+22}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 2.7 \cdot 10^{-295}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-221}:\\ \;\;\;\;t_3 + \frac{\frac{-1}{F}}{\frac{B}{F}}\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-27}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_3 + \frac{1}{B}\\ \end{array} \]
Alternative 16
Error27.7
Cost7960
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ t_1 := \frac{-x}{\tan B}\\ t_2 := \left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ \mathbf{if}\;F \leq -1.75 \cdot 10^{+266}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -6.5 \cdot 10^{+152}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -2.1 \cdot 10^{+22}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -9 \cdot 10^{-171}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{-299}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{elif}\;F \leq 6.6 \cdot 10^{-102}:\\ \;\;\;\;t_1 + \frac{\frac{-1}{F}}{\frac{B}{F}}\\ \mathbf{else}:\\ \;\;\;\;t_1 + \frac{1}{B}\\ \end{array} \]
Alternative 17
Error22.8
Cost7880
\[\begin{array}{l} t_0 := \frac{-x}{\tan B} + \frac{\frac{-1}{F}}{\frac{B}{F}}\\ \mathbf{if}\;B \leq -0.0074:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 0.0057:\\ \;\;\;\;\frac{1}{B} \cdot \left(\left(-x\right) + F \cdot {\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 18
Error22.7
Cost7880
\[\begin{array}{l} t_0 := \frac{-x}{\tan B} + \frac{\frac{-1}{F}}{\frac{B}{F}}\\ \mathbf{if}\;B \leq -0.00075:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 0.006:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\frac{B}{{\left(F \cdot F + \left(2 + \left(x + x\right)\right)\right)}^{-0.5}}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 19
Error28.3
Cost7572
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ t_1 := \left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ \mathbf{if}\;F \leq -1.25 \cdot 10^{+265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{+153}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -4 \cdot 10^{-166}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 5 \cdot 10^{-172}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{1}{B}\\ \end{array} \]
Alternative 20
Error27.7
Cost7308
\[\begin{array}{l} t_0 := \frac{-x}{\tan B} + \frac{1}{B}\\ \mathbf{if}\;F \leq -0.000155:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -1.7 \cdot 10^{-212}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.2 \cdot 10^{-166}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 21
Error32.2
Cost7112
\[\begin{array}{l} \mathbf{if}\;F \leq -2.55 \cdot 10^{-54}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 7 \cdot 10^{-92}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 22
Error29.9
Cost7112
\[\begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-130}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 23
Error37.5
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -1.22 \cdot 10^{-60}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-92}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\left(0.16666666666666666 \cdot B + \frac{1}{B}\right) - \frac{x}{B}\\ \end{array} \]
Alternative 24
Error40.3
Cost968
\[\begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-130}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{-94}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\left(0.16666666666666666 \cdot B + \frac{1}{B}\right) - \frac{x}{B}\\ \end{array} \]
Alternative 25
Error40.3
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-130}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 6.2 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 26
Error45.2
Cost452
\[\begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-130}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{-B}\\ \end{array} \]
Alternative 27
Error47.6
Cost388
\[\begin{array}{l} \mathbf{if}\;F \leq -2.6 \cdot 10^{-54}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{-B}\\ \end{array} \]
Alternative 28
Error56.8
Cost192
\[\frac{-1}{B} \]

Error

Reproduce?

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