\[\left(-x \cdot \cot B\right) + \frac{1}{\sin B}\]
Test:
VandenBroeck and Keller, Equation (24)
Bits:
128 bits
Bits error versus B
Bits error versus x
Time: 7.5 s
Input Error: 0.2
Output Error: 0.2
Log:
Profile: 🕒
\(\left(-\frac{x \cdot \cos B}{\sin B}\right) + \frac{1}{\sin B}\)
  1. Started with
    \[\left(-x \cdot \cot B\right) + \frac{1}{\sin B}\]
    0.2
  2. Using strategy rm
    0.2
  3. Applied cotan-quot to get
    \[\left(-x \cdot \color{red}{\cot B}\right) + \frac{1}{\sin B} \leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin B}}\right) + \frac{1}{\sin B}\]
    0.2
  4. Applied associate-*r/ to get
    \[\left(-\color{red}{x \cdot \frac{\cos B}{\sin B}}\right) + \frac{1}{\sin B} \leadsto \left(-\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) + \frac{1}{\sin B}\]
    0.2

  5. Removed slow pow expressions

Original test:


(lambda ((B default) (x default))
  #:name "VandenBroeck and Keller, Equation (24)"
  (+ (- (* x (cotan B))) (/ 1 (sin B))))