Average Error: 14.0 → 0.4
Time: 14.1s
Precision: 64
\[\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 \le -1.53027071662928663 \cdot 10^{158}:\\ \;\;\;\;\frac{F}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \left(\sin B \cdot F\right) + 1 \cdot \left({\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1} \cdot \sin B\right)} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\ \mathbf{elif}\;F \le 9.1482776373528414 \cdot 10^{134}:\\ \;\;\;\;\frac{1}{\frac{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}{F}} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left({\left(\frac{1}{F}\right)}^{-1} + 1 \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right)} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\ \end{array}\]
\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 \le -1.53027071662928663 \cdot 10^{158}:\\
\;\;\;\;\frac{F}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \left(\sin B \cdot F\right) + 1 \cdot \left({\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1} \cdot \sin B\right)} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\

\mathbf{elif}\;F \le 9.1482776373528414 \cdot 10^{134}:\\
\;\;\;\;\frac{1}{\frac{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}{F}} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left({\left(\frac{1}{F}\right)}^{-1} + 1 \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right)} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\

\end{array}
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 temp;
	if ((F <= -1.5302707166292866e+158)) {
		temp = ((F / ((pow((1.0 / pow(-1.0, 1.0)), 1.0) * (sin(B) * F)) + (1.0 * (pow((1.0 / (pow(-1.0, 1.0) * pow(F, 1.0))), 1.0) * sin(B))))) - ((sqrt(1.0) * x) / (tan(B) / sqrt(1.0))));
	} else {
		double temp_1;
		if ((F <= 9.148277637352841e+134)) {
			temp_1 = ((1.0 / ((sin(B) * pow((((F * F) + 2.0) + (2.0 * x)), (1.0 / 2.0))) / F)) - ((sqrt(1.0) * x) / (tan(B) / sqrt(1.0))));
		} else {
			temp_1 = ((F / (sin(B) * (pow((1.0 / F), -1.0) + (1.0 * pow((1.0 / pow(F, 1.0)), 1.0))))) - ((sqrt(1.0) * x) / (tan(B) / sqrt(1.0))));
		}
		temp = temp_1;
	}
	return temp;
}

Error

Bits error versus F

Bits error versus B

Bits error versus x

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.5302707166292866e+158

    1. Initial program 42.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. Simplified42.5

      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}}\]
    3. Using strategy rm
    4. Applied pow-neg42.5

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

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

      \[\leadsto \frac{\color{blue}{F}}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - x \cdot \frac{1}{\tan B}\]
    7. Using strategy rm
    8. Applied add-sqr-sqrt36.3

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

      \[\leadsto \frac{F}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - x \cdot \color{blue}{\frac{\sqrt{1}}{\frac{\tan B}{\sqrt{1}}}}\]
    10. Applied associate-*r/36.2

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

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

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

    if -1.5302707166292866e+158 < F < 9.148277637352841e+134

    1. Initial program 2.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. Simplified2.5

      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}}\]
    3. Using strategy rm
    4. Applied pow-neg2.5

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

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

      \[\leadsto \frac{\color{blue}{F}}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - x \cdot \frac{1}{\tan B}\]
    7. Using strategy rm
    8. Applied add-sqr-sqrt0.5

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

      \[\leadsto \frac{F}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - x \cdot \color{blue}{\frac{\sqrt{1}}{\frac{\tan B}{\sqrt{1}}}}\]
    10. Applied associate-*r/0.4

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

      \[\leadsto \frac{F}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - \frac{\color{blue}{\sqrt{1} \cdot x}}{\frac{\tan B}{\sqrt{1}}}\]
    12. Using strategy rm
    13. Applied clear-num0.4

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

    if 9.148277637352841e+134 < F

    1. Initial program 38.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. Simplified38.6

      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}}\]
    3. Using strategy rm
    4. Applied pow-neg38.6

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

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

      \[\leadsto \frac{\color{blue}{F}}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - x \cdot \frac{1}{\tan B}\]
    7. Using strategy rm
    8. Applied add-sqr-sqrt33.2

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

      \[\leadsto \frac{F}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - x \cdot \color{blue}{\frac{\sqrt{1}}{\frac{\tan B}{\sqrt{1}}}}\]
    10. Applied associate-*r/33.2

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -1.53027071662928663 \cdot 10^{158}:\\ \;\;\;\;\frac{F}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \left(\sin B \cdot F\right) + 1 \cdot \left({\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1} \cdot \sin B\right)} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\ \mathbf{elif}\;F \le 9.1482776373528414 \cdot 10^{134}:\\ \;\;\;\;\frac{1}{\frac{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}{F}} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left({\left(\frac{1}{F}\right)}^{-1} + 1 \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right)} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020066 
(FPCore (F B x)
  :name "VandenBroeck and Keller, Equation (23)"
  :precision binary64
  (+ (- (* x (/ 1 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2) (* 2 x)) (- (/ 1 2))))))