Average Error: 15.0 → 0.5
Time: 48.2s
Precision: 64
Internal Precision: 1344
\[r \cdot \frac{\sin b}{\cos \left(a + b\right)}\]
\[\left(r \cdot \frac{\sin b}{{\left(\cos a \cdot \cos b\right)}^{3} - {\left(\log \left(e^{\sin a \cdot \sin b}\right)\right)}^{3}}\right) \cdot \left(\left(\cos a \cdot \cos b\right) \cdot \left(\cos a \cdot \cos b\right) + \left(\log \left(e^{\sin a \cdot \sin b}\right) \cdot \log \left(e^{\sin a \cdot \sin b}\right) + \left(\cos a \cdot \cos b\right) \cdot \log \left(e^{\sin a \cdot \sin b}\right)\right)\right)\]

Error

Bits error versus r

Bits error versus a

Bits error versus b

Derivation

  1. Initial program 15.0

    \[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. Using strategy rm
  7. Applied flip3--0.5

    \[\leadsto r \cdot \frac{\sin b}{\color{blue}{\frac{{\left(\cos a \cdot \cos b\right)}^{3} - {\left(\log \left(e^{\sin a \cdot \sin b}\right)\right)}^{3}}{\left(\cos a \cdot \cos b\right) \cdot \left(\cos a \cdot \cos b\right) + \left(\log \left(e^{\sin a \cdot \sin b}\right) \cdot \log \left(e^{\sin a \cdot \sin b}\right) + \left(\cos a \cdot \cos b\right) \cdot \log \left(e^{\sin a \cdot \sin b}\right)\right)}}}\]
  8. Applied associate-/r/0.5

    \[\leadsto r \cdot \color{blue}{\left(\frac{\sin b}{{\left(\cos a \cdot \cos b\right)}^{3} - {\left(\log \left(e^{\sin a \cdot \sin b}\right)\right)}^{3}} \cdot \left(\left(\cos a \cdot \cos b\right) \cdot \left(\cos a \cdot \cos b\right) + \left(\log \left(e^{\sin a \cdot \sin b}\right) \cdot \log \left(e^{\sin a \cdot \sin b}\right) + \left(\cos a \cdot \cos b\right) \cdot \log \left(e^{\sin a \cdot \sin b}\right)\right)\right)\right)}\]
  9. Applied associate-*r*0.5

    \[\leadsto \color{blue}{\left(r \cdot \frac{\sin b}{{\left(\cos a \cdot \cos b\right)}^{3} - {\left(\log \left(e^{\sin a \cdot \sin b}\right)\right)}^{3}}\right) \cdot \left(\left(\cos a \cdot \cos b\right) \cdot \left(\cos a \cdot \cos b\right) + \left(\log \left(e^{\sin a \cdot \sin b}\right) \cdot \log \left(e^{\sin a \cdot \sin b}\right) + \left(\cos a \cdot \cos b\right) \cdot \log \left(e^{\sin a \cdot \sin b}\right)\right)\right)}\]

Runtime

Time bar (total: 48.2s)Debug logProfile

herbie shell --seed '#(1071373924 2949776965 1885069702 3247780810 90874544 2263903749)' +o rules:numerics
(FPCore (r a b)
  :name "r*sin(b)/cos(a+b), B"
  (* r (/ (sin b) (cos (+ a b)))))