Average Error: 14.1 → 0.2
Time: 17.1s
Precision: binary64
Cost: 21122
\[\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 -2.957723683841436 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 97778852.442119:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5}}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\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 \leq -2.957723683841436 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 97778852.442119:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5}}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan 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 -2.957723683841436e+47)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 97778852.442119)
(-
(/ 1.0 (/ (sin B) (* F (pow (+ (* x 2.0) (+ 2.0 (* F F))) -0.5))))
(/ x (tan B)))
(- (/ 1.0 (sin B)) (/ x (tan 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 <= -2.957723683841436e+47) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 97778852.442119) {
tmp = (1.0 / (sin(B) / (F * pow(((x * 2.0) + (2.0 + (F * F))), -0.5)))) - (x / tan(B));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
Try it out
Enter valid numbers for all inputs
Alternatives
| Alternative 1 |
|---|
| Error | 50.6 |
|---|
| Cost | 72512 |
|---|
\[\left({\left(\sqrt{2 \cdot x + \left(2 + F \cdot F\right)}\right)}^{-0.5} \cdot \frac{\sqrt{F}}{\sqrt{\sin B}}\right) \cdot \left({\left(\sqrt{2 \cdot x + \left(2 + F \cdot F\right)}\right)}^{-0.5} \cdot \frac{\sqrt{F}}{\sqrt{\sin B}}\right) - \frac{x}{\tan B}\]
| Alternative 2 |
|---|
| Error | 14.7 |
|---|
| Cost | 72064 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{\tan B} \cdot \sqrt[3]{\tan B}} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{\tan B}}\]
| Alternative 3 |
|---|
| Error | 14.3 |
|---|
| Cost | 67072 |
|---|
\[\sqrt[3]{\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}} \cdot \left(\sqrt[3]{\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}} \cdot \sqrt[3]{\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}}\right) - \frac{x}{\tan B}\]
| Alternative 4 |
|---|
| Error | 34.4 |
|---|
| Cost | 65536 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{\sqrt{x}}{\sqrt[3]{\tan B} \cdot \sqrt[3]{\tan B}} \cdot \frac{\sqrt{x}}{\sqrt[3]{\tan B}}\]
| Alternative 5 |
|---|
| Error | 50.6 |
|---|
| Cost | 59712 |
|---|
\[\left({\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25} \cdot \frac{\sqrt{F}}{\sqrt{\sin B}}\right) \cdot \left({\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25} \cdot \frac{\sqrt{F}}{\sqrt{\sin B}}\right) - \frac{x}{\tan B}\]
| Alternative 6 |
|---|
| Error | 39.4 |
|---|
| Cost | 59712 |
|---|
\[\left(\sqrt{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}} \cdot \sqrt{\frac{F}{\sin B}}\right) \cdot \left(\sqrt{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}} \cdot \sqrt{\frac{F}{\sin B}}\right) - \frac{x}{\tan B}\]
| Alternative 7 |
|---|
| Error | 37.2 |
|---|
| Cost | 59136 |
|---|
\[\frac{\sqrt[3]{F} \cdot \sqrt[3]{F}}{\sqrt{\sin B}} \cdot \left({\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} \cdot \frac{\sqrt[3]{F}}{\sqrt{\sin B}}\right) - \frac{x}{\tan B}\]
| Alternative 8 |
|---|
| Error | 14.3 |
|---|
| Cost | 53760 |
|---|
\[\frac{F}{\sin B} \cdot \left(\sqrt[3]{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}} \cdot \left(\sqrt[3]{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}} \cdot \sqrt[3]{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}}\right)\right) - \frac{x}{\tan B}\]
| Alternative 9 |
|---|
| Error | 14.5 |
|---|
| Cost | 52864 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \sqrt[3]{\frac{x}{\tan B}} \cdot \left(\sqrt[3]{\frac{x}{\tan B}} \cdot \sqrt[3]{\frac{x}{\tan B}}\right)\]
| Alternative 10 |
|---|
| Error | 14.6 |
|---|
| Cost | 52736 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{1}{\sqrt[3]{\tan B} \cdot \sqrt[3]{\tan B}} \cdot \frac{x}{\sqrt[3]{\tan B}}\]
| Alternative 11 |
|---|
| Error | 11.7 |
|---|
| Cost | 52736 |
|---|
\[\frac{1}{\sqrt[3]{\sin B} \cdot \sqrt[3]{\sin B}} \cdot \left({\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} \cdot \frac{F}{\sqrt[3]{\sin B}}\right) - \frac{x}{\tan B}\]
| Alternative 12 |
|---|
| Error | 14.6 |
|---|
| Cost | 52608 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{\frac{x}{\sqrt[3]{\tan B} \cdot \sqrt[3]{\tan B}}}{\sqrt[3]{\tan B}}\]
| Alternative 13 |
|---|
| Error | 49.3 |
|---|
| Cost | 52608 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{\sqrt{x}}{\sqrt{\tan B}} \cdot \frac{\sqrt{x}}{\sqrt{\tan B}}\]
| Alternative 14 |
|---|
| Error | 50.6 |
|---|
| Cost | 52608 |
|---|
\[\frac{\sqrt{F}}{\sqrt{\sin B}} \cdot \left({\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} \cdot \frac{\sqrt{F}}{\sqrt{\sin B}}\right) - \frac{x}{\tan B}\]
| Alternative 15 |
|---|
| Error | 14.3 |
|---|
| Cost | 47296 |
|---|
\[\frac{F}{\sin B} \cdot \left({\left(\sqrt[3]{2 \cdot x + \left(2 + F \cdot F\right)} \cdot \sqrt[3]{2 \cdot x + \left(2 + F \cdot F\right)}\right)}^{-0.5} \cdot {\left(\sqrt[3]{2 \cdot x + \left(2 + F \cdot F\right)}\right)}^{-0.5}\right) - \frac{x}{\tan B}\]
| Alternative 16 |
|---|
| Error | 35.5 |
|---|
| Cost | 46912 |
|---|
\[\sqrt{\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}} \cdot \sqrt{\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}} - \frac{x}{\tan B}\]
| Alternative 17 |
|---|
| Error | 14.2 |
|---|
| Cost | 40256 |
|---|
\[\frac{F}{\sin B} \cdot \left(\sqrt{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}} \cdot \sqrt{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}}\right) - \frac{x}{\tan B}\]
| Alternative 18 |
|---|
| Error | 14.1 |
|---|
| Cost | 40256 |
|---|
\[\frac{F}{\sin B} \cdot \left({\left(\sqrt{2 \cdot x + \left(2 + F \cdot F\right)}\right)}^{-0.5} \cdot {\left(\sqrt{2 \cdot x + \left(2 + F \cdot F\right)}\right)}^{-0.5}\right) - \frac{x}{\tan B}\]
| Alternative 19 |
|---|
| Error | 14.1 |
|---|
| Cost | 40256 |
|---|
\[{\left(\sqrt{2 \cdot x + \left(2 + F \cdot F\right)}\right)}^{-0.5} \cdot \left(\frac{F}{\sin B} \cdot {\left(\sqrt{2 \cdot x + \left(2 + F \cdot F\right)}\right)}^{-0.5}\right) - \frac{x}{\tan B}\]
| Alternative 20 |
|---|
| Error | 38.8 |
|---|
| Cost | 39808 |
|---|
\[\left(\frac{1}{\sqrt{\sin B}} \cdot \frac{F}{\sqrt{\sin B}}\right) \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{x}{\tan B}\]
| Alternative 21 |
|---|
| Error | 14.5 |
|---|
| Cost | 39808 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \frac{\sqrt[3]{x}}{\tan B}\]
| Alternative 22 |
|---|
| Error | 39.3 |
|---|
| Cost | 39808 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \sqrt{\frac{x}{\tan B}} \cdot \sqrt{\frac{x}{\tan B}}\]
| Alternative 23 |
|---|
| Error | 33.0 |
|---|
| Cost | 39488 |
|---|
\[\log \left({\left(e^{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}}\right)}^{\left(\frac{F}{\sin B}\right)}\right) - \frac{x}{\tan B}\]
| Alternative 24 |
|---|
| Error | 34.1 |
|---|
| Cost | 33280 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \sqrt{x} \cdot \frac{\sqrt{x}}{\tan B}\]
| Alternative 25 |
|---|
| Error | 37.8 |
|---|
| Cost | 33280 |
|---|
\[\sqrt{F} \cdot \left({\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} \cdot \frac{\sqrt{F}}{\sin B}\right) - \frac{x}{\tan B}\]
| Alternative 26 |
|---|
| Error | 22.6 |
|---|
| Cost | 33216 |
|---|
\[\sqrt[3]{{\left(\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}\right)}^{3}} - \frac{x}{\tan B}\]
| Alternative 27 |
|---|
| Error | 16.6 |
|---|
| Cost | 33216 |
|---|
\[\frac{F}{\sin B} \cdot \sqrt[3]{{\left({\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}\right)}^{3}} - \frac{x}{\tan B}\]
| Alternative 28 |
|---|
| Error | 34.1 |
|---|
| Cost | 33216 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \sqrt[3]{{\left(\frac{x}{\tan B}\right)}^{3}}\]
| Alternative 29 |
|---|
| Error | 36.0 |
|---|
| Cost | 33152 |
|---|
\[e^{\log \left(\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}\right)} - \frac{x}{\tan B}\]
| Alternative 30 |
|---|
| Error | 46.5 |
|---|
| Cost | 33152 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \log \left(e^{\frac{x}{\tan B}}\right)\]
| Alternative 31 |
|---|
| Error | 40.5 |
|---|
| Cost | 33152 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - e^{\log \left(\frac{x}{\tan B}\right)}\]
| Alternative 32 |
|---|
| Error | 14.1 |
|---|
| Cost | 27456 |
|---|
\[\frac{F}{\sin B} \cdot \left({\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25}\right) - \frac{x}{\tan B}\]
| Alternative 33 |
|---|
| Error | 14.1 |
|---|
| Cost | 27456 |
|---|
\[{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25} \cdot \left(\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25}\right) - \frac{x}{\tan B}\]
| Alternative 34 |
|---|
| Error | 10.8 |
|---|
| Cost | 27456 |
|---|
\[\left(F \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25}\right) \cdot \frac{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25}}{\sin B} - \frac{x}{\tan B}\]
| Alternative 35 |
|---|
| Error | 10.8 |
|---|
| Cost | 27456 |
|---|
\[F \cdot \frac{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25}}{\sin B} - \frac{x}{\tan B}\]
| Alternative 36 |
|---|
| Error | 14.0 |
|---|
| Cost | 26880 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{x}{\sin B} \cdot \cos B\]
| Alternative 37 |
|---|
| Error | 10.8 |
|---|
| Cost | 26816 |
|---|
\[F \cdot \frac{{\left({\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.25}\right)}^{2}}{\sin B} - \frac{x}{\tan B}\]
| Alternative 38 |
|---|
| Error | 14.1 |
|---|
| Cost | 20480 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - x \cdot \frac{1}{\tan B}\]
| Alternative 39 |
|---|
| Error | 10.8 |
|---|
| Cost | 20480 |
|---|
\[\frac{1}{\sin B} \cdot \left(F \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}\right) - \frac{x}{\tan B}\]
| Alternative 40 |
|---|
| Error | 14.0 |
|---|
| Cost | 20480 |
|---|
\[{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} \cdot \left(F \cdot \frac{1}{\sin B}\right) - \frac{x}{\tan B}\]
| Alternative 41 |
|---|
| Error | 14.1 |
|---|
| Cost | 20480 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{1}{\frac{\tan B}{x}}\]
| Alternative 42 |
|---|
| Error | 14.0 |
|---|
| Cost | 20480 |
|---|
\[{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{\tan B}\]
| Alternative 43 |
|---|
| Error | 10.8 |
|---|
| Cost | 20480 |
|---|
\[\frac{1}{\frac{\sin B}{F \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}}} - \frac{x}{\tan B}\]
| Alternative 44 |
|---|
| Error | 10.8 |
|---|
| Cost | 20480 |
|---|
\[F \cdot \left({\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} \cdot \frac{1}{\sin B}\right) - \frac{x}{\tan B}\]
| Alternative 45 |
|---|
| Error | 10.8 |
|---|
| Cost | 20352 |
|---|
\[F \cdot \frac{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}\]
| Alternative 46 |
|---|
| Error | 14.0 |
|---|
| Cost | 20352 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{x}{\tan B}\]
| Alternative 47 |
|---|
| Error | 10.7 |
|---|
| Cost | 20352 |
|---|
\[\frac{F \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}\]
| Alternative 48 |
|---|
| Error | 30.1 |
|---|
| Cost | 20160 |
|---|
\[\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - \frac{x}{\tan B}\]
| Alternative 49 |
|---|
| Error | 10.8 |
|---|
| Cost | 20160 |
|---|
\[\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B} - \frac{x}{\tan B}\]
| Alternative 50 |
|---|
| Error | 14.0 |
|---|
| Cost | 20160 |
|---|
\[\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + F \cdot F}} - \frac{x}{\tan B}\]
| Alternative 51 |
|---|
| Error | 30.0 |
|---|
| Cost | 20160 |
|---|
\[F \cdot \frac{\sqrt{\frac{1}{2 + 2 \cdot x}}}{\sin B} - \frac{x}{\tan B}\]
| Alternative 52 |
|---|
| Error | 30.0 |
|---|
| Cost | 20160 |
|---|
\[\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}}{\sin B} - \frac{x}{\tan B}\]
| Alternative 53 |
|---|
| Error | 47.7 |
|---|
| Cost | 19968 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x\right)}^{-0.5} - \frac{x}{\tan B}\]
| Alternative 54 |
|---|
| Error | 27.5 |
|---|
| Cost | 14400 |
|---|
\[F \cdot \left(\sqrt{\frac{1}{2 \cdot x + \left(2 + F \cdot F\right)}} \cdot \left(\frac{1}{B} + B \cdot 0.16666666666666666\right)\right) - \frac{x}{\tan B}\]
| Alternative 55 |
|---|
| Error | 24.9 |
|---|
| Cost | 14016 |
|---|
\[\frac{F}{B} \cdot \sqrt{\frac{1}{2 \cdot x + \left(2 + F \cdot F\right)}} - \frac{x}{\tan B}\]
| Alternative 56 |
|---|
| Error | 33.0 |
|---|
| Cost | 13952 |
|---|
\[\frac{F}{\sin B} \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{x}{B}\]
| Alternative 57 |
|---|
| Error | 24.9 |
|---|
| Cost | 13952 |
|---|
\[{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\]
| Alternative 58 |
|---|
| Error | 29.8 |
|---|
| Cost | 13952 |
|---|
\[F \cdot \frac{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\]
| Alternative 59 |
|---|
| Error | 29.8 |
|---|
| Cost | 13952 |
|---|
\[\frac{F \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\]
| Alternative 60 |
|---|
| Error | 35.6 |
|---|
| Cost | 13504 |
|---|
\[\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{\tan B}\]
| Alternative 61 |
|---|
| Error | 36.0 |
|---|
| Cost | 13504 |
|---|
\[\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{\tan B}\]
| Alternative 62 |
|---|
| Error | 32.6 |
|---|
| Cost | 13504 |
|---|
\[F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{\tan B}\]
| Alternative 63 |
|---|
| Error | 31.1 |
|---|
| Cost | 13248 |
|---|
\[\frac{-1}{\sin B} - \frac{x}{\tan B}\]
| Alternative 64 |
|---|
| Error | 31.4 |
|---|
| Cost | 13248 |
|---|
\[\frac{1}{\sin B} - \frac{x}{\tan B}\]
| Alternative 65 |
|---|
| Error | 60.9 |
|---|
| Cost | 64 |
|---|
\[1\]
| Alternative 66 |
|---|
| Error | 62.2 |
|---|
| Cost | 64 |
|---|
\[0\]
| Alternative 67 |
|---|
| Error | 60.9 |
|---|
| Cost | 64 |
|---|
\[-1\]
Error

Derivation
- Split input into 3 regimes
if F < -2.9577236838414358e47
Initial program 28.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)}\]
Simplified28.6
\[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\tan B}}\]
Taylor expanded around -inf 0.2
\[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B}\]
Simplified0.2
\[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}}\]
if -2.9577236838414358e47 < F < 97778852.442119002
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)}\]
Simplified0.4
\[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\tan B}}\]
- Using strategy
rm Applied associate-*l/_binary640.3
\[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}}{\sin B}} - \frac{x}{\tan B}\]
Simplified0.3
\[\leadsto \frac{\color{blue}{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{-0.5}}}{\sin B} - \frac{x}{\tan B}\]
- Using strategy
rm Applied clear-num_binary640.3
\[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{-0.5}}}} - \frac{x}{\tan B}\]
Simplified0.3
\[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F \cdot {\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{-0.5}}} - \frac{x}{\tan B}}\]
if 97778852.442119002 < F
Initial program 25.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)}\]
Simplified25.6
\[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\tan B}}\]
Taylor expanded around inf 0.1
\[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B}\]
Simplified0.1
\[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{\tan B}}\]
- Recombined 3 regimes into one program.
Final simplification0.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;F \leq -2.957723683841436 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 97778852.442119:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5}}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}\]
Reproduce
herbie shell --seed 2021042
(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))))))