Average Error: 0.2 → 0.6
Time: 36.6s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{1}{\sin B} - \left(\left(\sqrt[3]{\frac{1}{\tan B}} \cdot \sqrt[3]{\frac{1}{\tan B}}\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{\frac{x}{\tan B}}\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\frac{1}{\sin B} - \left(\left(\sqrt[3]{\frac{1}{\tan B}} \cdot \sqrt[3]{\frac{1}{\tan B}}\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{\frac{x}{\tan B}}
double f(double B, double x) {
        double r1646923 = x;
        double r1646924 = 1.0;
        double r1646925 = B;
        double r1646926 = tan(r1646925);
        double r1646927 = r1646924 / r1646926;
        double r1646928 = r1646923 * r1646927;
        double r1646929 = -r1646928;
        double r1646930 = sin(r1646925);
        double r1646931 = r1646924 / r1646930;
        double r1646932 = r1646929 + r1646931;
        return r1646932;
}

double f(double B, double x) {
        double r1646933 = 1.0;
        double r1646934 = B;
        double r1646935 = sin(r1646934);
        double r1646936 = r1646933 / r1646935;
        double r1646937 = tan(r1646934);
        double r1646938 = r1646933 / r1646937;
        double r1646939 = cbrt(r1646938);
        double r1646940 = r1646939 * r1646939;
        double r1646941 = x;
        double r1646942 = cbrt(r1646941);
        double r1646943 = r1646942 * r1646942;
        double r1646944 = r1646940 * r1646943;
        double r1646945 = r1646941 / r1646937;
        double r1646946 = cbrt(r1646945);
        double r1646947 = r1646944 * r1646946;
        double r1646948 = r1646936 - r1646947;
        return r1646948;
}

Error

Bits error versus B

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
  2. Simplified0.2

    \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{\tan B}}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.6

    \[\leadsto \frac{1}{\sin B} - \color{blue}{\left(\sqrt[3]{\frac{x}{\tan B}} \cdot \sqrt[3]{\frac{x}{\tan B}}\right) \cdot \sqrt[3]{\frac{x}{\tan B}}}\]
  5. Using strategy rm
  6. Applied div-inv0.6

    \[\leadsto \frac{1}{\sin B} - \left(\sqrt[3]{\frac{x}{\tan B}} \cdot \sqrt[3]{\color{blue}{x \cdot \frac{1}{\tan B}}}\right) \cdot \sqrt[3]{\frac{x}{\tan B}}\]
  7. Applied cbrt-prod0.6

    \[\leadsto \frac{1}{\sin B} - \left(\sqrt[3]{\frac{x}{\tan B}} \cdot \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{\frac{1}{\tan B}}\right)}\right) \cdot \sqrt[3]{\frac{x}{\tan B}}\]
  8. Applied div-inv0.6

    \[\leadsto \frac{1}{\sin B} - \left(\sqrt[3]{\color{blue}{x \cdot \frac{1}{\tan B}}} \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{\frac{1}{\tan B}}\right)\right) \cdot \sqrt[3]{\frac{x}{\tan B}}\]
  9. Applied cbrt-prod0.6

    \[\leadsto \frac{1}{\sin B} - \left(\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{\frac{1}{\tan B}}\right)} \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{\frac{1}{\tan B}}\right)\right) \cdot \sqrt[3]{\frac{x}{\tan B}}\]
  10. Applied swap-sqr0.6

    \[\leadsto \frac{1}{\sin B} - \color{blue}{\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{\frac{1}{\tan B}} \cdot \sqrt[3]{\frac{1}{\tan B}}\right)\right)} \cdot \sqrt[3]{\frac{x}{\tan B}}\]
  11. Final simplification0.6

    \[\leadsto \frac{1}{\sin B} - \left(\left(\sqrt[3]{\frac{1}{\tan B}} \cdot \sqrt[3]{\frac{1}{\tan B}}\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{\frac{x}{\tan B}}\]

Reproduce

herbie shell --seed 2019139 +o rules:numerics
(FPCore (B x)
  :name "VandenBroeck and Keller, Equation (24)"
  (+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))