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

Error

Bits error versus r

Bits error versus a

Bits error versus b

Derivation

  1. Initial program 15.3

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

    \[\leadsto r \cdot \frac{\sin b}{\color{blue}{\cos a \cdot \cos b - \sin a \cdot \sin b}}\]
  4. Using strategy rm
  5. Applied add-log-exp0.4

    \[\leadsto r \cdot \frac{\sin b}{\cos a \cdot \cos b - \color{blue}{\log \left(e^{\sin a \cdot \sin b}\right)}}\]
  6. Taylor expanded around inf 0.4

    \[\leadsto r \cdot \frac{\sin b}{\cos a \cdot \cos b - \log \left(e^{\color{blue}{\sin b \cdot \sin a}}\right)}\]
  7. Applied simplify0.4

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

Runtime

Time bar (total: 43.8s)Debug logProfile

herbie shell --seed '#(1070960995 739739648 2531964651 3069671617 351857262 3877178482)' +o rules:numerics
(FPCore (r a b)
  :name "r*sin(b)/cos(a+b), B"
  (* r (/ (sin b) (cos (+ a b)))))