Average Error: 0.2 → 0.2
Time: 11.9s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\left(-\frac{\sqrt{1} \cdot x}{\sin B} \cdot \left(\sqrt{1} \cdot \cos B\right)\right) + \frac{1}{\sin B}\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\left(-\frac{\sqrt{1} \cdot x}{\sin B} \cdot \left(\sqrt{1} \cdot \cos B\right)\right) + \frac{1}{\sin B}
double code(double B, double x) {
	return ((double) (((double) -(((double) (x * ((double) (1.0 / ((double) tan(B)))))))) + ((double) (1.0 / ((double) sin(B))))));
}
double code(double B, double x) {
	return ((double) (((double) -(((double) (((double) (((double) (((double) sqrt(1.0)) * x)) / ((double) sin(B)))) * ((double) (((double) sqrt(1.0)) * ((double) cos(B)))))))) + ((double) (1.0 / ((double) sin(B))))));
}

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. Using strategy rm
  3. Applied add-sqr-sqrt0.2

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

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

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

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

    \[\leadsto \left(-\frac{\sqrt{1} \cdot x}{\frac{\color{blue}{\frac{\sin B}{\cos B}}}{\sqrt{1}}}\right) + \frac{1}{\sin B}\]
  9. Applied associate-/l/0.2

    \[\leadsto \left(-\frac{\sqrt{1} \cdot x}{\color{blue}{\frac{\sin B}{\sqrt{1} \cdot \cos B}}}\right) + \frac{1}{\sin B}\]
  10. Applied associate-/r/0.2

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

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

Reproduce

herbie shell --seed 2020113 
(FPCore (B x)
  :name "VandenBroeck and Keller, Equation (24)"
  :precision binary64
  (+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))