Average Error: 0.2 → 0.6
Time: 37.1s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{1}{\sin B} - \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \frac{\sqrt[3]{x}}{\tan B}\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\frac{1}{\sin B} - \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \frac{\sqrt[3]{x}}{\tan B}
double f(double B, double x) {
        double r510171 = x;
        double r510172 = 1.0;
        double r510173 = B;
        double r510174 = tan(r510173);
        double r510175 = r510172 / r510174;
        double r510176 = r510171 * r510175;
        double r510177 = -r510176;
        double r510178 = sin(r510173);
        double r510179 = r510172 / r510178;
        double r510180 = r510177 + r510179;
        return r510180;
}

double f(double B, double x) {
        double r510181 = 1.0;
        double r510182 = B;
        double r510183 = sin(r510182);
        double r510184 = r510181 / r510183;
        double r510185 = x;
        double r510186 = cbrt(r510185);
        double r510187 = r510186 * r510186;
        double r510188 = tan(r510182);
        double r510189 = r510186 / r510188;
        double r510190 = r510187 * r510189;
        double r510191 = r510184 - r510190;
        return r510191;
}

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 *-un-lft-identity0.2

    \[\leadsto \frac{1}{\sin B} - \frac{x}{\color{blue}{1 \cdot \tan B}}\]
  5. Applied add-cube-cbrt0.6

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

    \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1} \cdot \frac{\sqrt[3]{x}}{\tan B}}\]
  7. Simplified0.6

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

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

Reproduce

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