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

Error

Bits error versus r

Bits error versus a

Bits error versus b

Derivation

  1. Initial program 14.5

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

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

    \[\leadsto \frac{r \cdot \sin b}{\color{blue}{(\left(\cos a\right) \cdot \left(\cos b\right) + \left(-\sin a \cdot \sin b\right))_*}}\]
  6. Using strategy rm
  7. Applied *-un-lft-identity0.3

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

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

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

Runtime

Time bar (total: 36.3s)Debug logProfile

herbie shell --seed '#(1070258749 1877548225 2229079127 1588002776 3179087814 1886870650)' +o rules:numerics
(FPCore (r a b)
  :name "r*sin(b)/cos(a+b), A"
  (/ (* r (sin b)) (cos (+ a b))))