Average Error: 0.2 → 0.2
Time: 9.8s
Precision: binary64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B} \]
\[{\sin B}^{-1} - \frac{x}{\tan B} \]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
{\sin B}^{-1} - \frac{x}{\tan B}
(FPCore (B x)
 :precision binary64
 (+ (- (* x (/ 1.0 (tan B)))) (/ 1.0 (sin B))))
(FPCore (B x) :precision binary64 (- (pow (sin B) -1.0) (/ x (tan B))))
double code(double B, double x) {
	return -(x * (1.0 / tan(B))) + (1.0 / sin(B));
}
double code(double B, double x) {
	return pow(sin(B), -1.0) - (x / tan(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. Simplified0.2

    \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{\tan B}} \]
  3. Applied pow1_binary640.2

    \[\leadsto \frac{1}{\color{blue}{{\sin B}^{1}}} - \frac{x}{\tan B} \]
  4. Applied pow-flip_binary640.2

    \[\leadsto \color{blue}{{\sin B}^{\left(-1\right)}} - \frac{x}{\tan B} \]
  5. Final simplification0.2

    \[\leadsto {\sin B}^{-1} - \frac{x}{\tan B} \]

Reproduce

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