Average Error: 15.2 → 0.3
Time: 29.2s
Precision: 64
Internal Precision: 1344
\[\frac{r \cdot \sin b}{\cos \left(a + b\right)}\]
\[\frac{\sin b}{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(-\log_* (1 + (e^{\sin a \cdot \sin b} - 1)^*)\right))_*} \cdot r\]

Error

Bits error versus r

Bits error versus a

Bits error versus b

Derivation

  1. Initial program 15.2

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

    \[\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 *-un-lft-identity0.3

    \[\leadsto \frac{r \cdot \sin b}{\color{blue}{1 \cdot \left(\cos b \cdot \cos a - \sin b \cdot \sin a\right)}}\]
  7. Applied times-frac0.3

    \[\leadsto \color{blue}{\frac{r}{1} \cdot \frac{\sin b}{\cos b \cdot \cos a - \sin b \cdot \sin a}}\]
  8. Simplified0.3

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

    \[\leadsto r \cdot \frac{\sin b}{\color{blue}{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(-\sin b \cdot \sin a\right))_*}}\]
  11. Using strategy rm
  12. Applied log1p-expm1-u0.3

    \[\leadsto r \cdot \frac{\sin b}{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(-\color{blue}{\log_* (1 + (e^{\sin b \cdot \sin a} - 1)^*)}\right))_*}\]
  13. Final simplification0.3

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

Runtime

Time bar (total: 29.2s)Debug logProfile

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