Average Error: 15.5 → 0.4
Time: 52.5s
Precision: 64
Internal Precision: 1344
\[r \cdot \frac{\sin b}{\cos \left(a + b\right)}\]
\[\frac{r}{\frac{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(\left(-\sin a\right) \cdot \sin b\right))_*}{\sin b}}\]

Error

Bits error versus r

Bits error versus a

Bits error versus b

Derivation

  1. Initial program 15.5

    \[r \cdot \frac{\sin b}{\cos \left(a + b\right)}\]
  2. Initial simplification15.5

    \[\leadsto \frac{r \cdot \sin b}{\cos \left(b + a\right)}\]
  3. Using strategy rm
  4. Applied cos-sum0.3

    \[\leadsto \frac{r \cdot \sin b}{\color{blue}{\cos b \cdot \cos a - \sin b \cdot \sin a}}\]
  5. Using strategy rm
  6. Applied fma-neg0.3

    \[\leadsto \frac{r \cdot \sin b}{\color{blue}{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(-\sin b \cdot \sin a\right))_*}}\]
  7. Using strategy rm
  8. Applied associate-/l*0.4

    \[\leadsto \color{blue}{\frac{r}{\frac{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(-\sin b \cdot \sin a\right))_*}{\sin b}}}\]
  9. Final simplification0.4

    \[\leadsto \frac{r}{\frac{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(\left(-\sin a\right) \cdot \sin b\right))_*}{\sin b}}\]

Runtime

Time bar (total: 52.5s)Debug logProfile

herbie shell --seed 2018248 +o rules:numerics
(FPCore (r a b)
  :name "r*sin(b)/cos(a+b), B"
  (* r (/ (sin b) (cos (+ a b)))))